From 8297b970bbc4449e51cb0d54b07ddec0285b232d Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Tue, 10 Mar 2026 12:44:00 +0200 Subject: [PATCH 1/8] regenerated ce client --- ce/docs/AdminSettingsId.md | 4 +- ce/docs/AiModelId.md | 4 +- ce/docs/AlarmId.md | 4 +- ce/docs/ApiKeyId.md | 4 +- ce/docs/ApiUsageStateId.md | 25 + ce/docs/AssetId.md | 4 +- ce/docs/AssetProfileId.md | 4 +- ce/docs/AuditLog.md | 2 +- ce/docs/CalculatedFieldId.md | 4 +- ce/docs/CustomerId.md | 4 +- ce/docs/DashboardId.md | 4 +- ce/docs/DeviceApiControllerApi.md | 300 + ce/docs/DeviceId.md | 4 +- ce/docs/DeviceProfileId.md | 4 +- ce/docs/DomainId.md | 4 +- ce/docs/EdgeId.md | 4 +- ce/docs/EntityViewId.md | 4 +- ce/docs/EventInfo.md | 2 +- ce/docs/FeaturesInfo.md | 2 +- ce/docs/JobId.md | 4 +- ce/docs/MobileAppBundleId.md | 4 +- ce/docs/MobileAppId.md | 4 +- ce/docs/NotificationId.md | 4 +- ce/docs/NotificationRequestId.md | 4 +- ce/docs/NotificationRuleId.md | 4 +- ce/docs/NotificationRuleRecipientsConfig.md | 2 +- ce/docs/NotificationTargetExportData.md | 7 +- ce/docs/NotificationTargetId.md | 4 +- ce/docs/NotificationTemplateId.md | 4 +- ce/docs/OAuth2ClientId.md | 4 +- ce/docs/OtaPackageId.md | 4 +- ce/docs/QueueId.md | 4 +- ce/docs/QueueStatsId.md | 4 +- ce/docs/RpcId.md | 4 +- ce/docs/RuleChainId.md | 4 +- ce/docs/RuleNodeId.md | 4 +- ce/docs/TbResource.md | 2 +- ce/docs/TbResourceId.md | 4 +- ce/docs/TbResourceInfo.md | 2 +- ce/docs/TenantId.md | 4 +- ce/docs/TenantProfileId.md | 4 +- ce/docs/UserId.md | 4 +- ce/docs/WidgetTypeId.md | 4 +- ce/docs/WidgetsBundleId.md | 4 +- ce/spec/openapi.json | 10839 +++++++++------- .../client/api/ThingsboardApi.java | 1733 ++- .../client/model/AdminSettingsId.java | 45 +- .../thingsboard/client/model/AiModelId.java | 45 +- .../AlarmAssignmentRecipientsConfig.java | 2 +- .../model/AlarmCommentRecipientsConfig.java | 2 +- .../org/thingsboard/client/model/AlarmId.java | 45 +- .../thingsboard/client/model/ApiKeyId.java | 45 +- .../model/ApiUsageLimitRecipientsConfig.java | 2 +- .../client/model/ApiUsageStateId.java | 208 + .../org/thingsboard/client/model/AssetId.java | 45 +- .../client/model/AssetProfileId.java | 45 +- .../thingsboard/client/model/AuditLog.java | 12 +- .../client/model/CalculatedFieldId.java | 45 +- .../thingsboard/client/model/CustomerId.java | 45 +- .../thingsboard/client/model/DashboardId.java | 45 +- .../model/DeviceActivityRecipientsConfig.java | 2 +- .../thingsboard/client/model/DeviceId.java | 45 +- .../client/model/DeviceProfileId.java | 45 +- .../thingsboard/client/model/DomainId.java | 47 +- ...eCommunicationFailureRecipientsConfig.java | 2 +- .../model/EdgeConnectionRecipientsConfig.java | 2 +- .../org/thingsboard/client/model/EdgeId.java | 45 +- .../model/EntitiesLimitRecipientsConfig.java | 2 +- .../model/EntityActionRecipientsConfig.java | 2 +- .../thingsboard/client/model/EntityId.java | 90 + .../client/model/EntityViewId.java | 45 +- ...latedNotificationRuleRecipientsConfig.java | 2 +- .../thingsboard/client/model/EventInfo.java | 14 +- .../client/model/FeaturesInfo.java | 78 +- .../org/thingsboard/client/model/JobId.java | 45 +- .../client/model/MobileAppBundleId.java | 47 +- .../thingsboard/client/model/MobileAppId.java | 47 +- .../NewPlatformVersionRecipientsConfig.java | 2 +- .../client/model/NotificationId.java | 45 +- .../client/model/NotificationRequestId.java | 45 +- .../client/model/NotificationRuleId.java | 45 +- .../NotificationRuleRecipientsConfig.java | 16 +- .../model/NotificationTargetExportData.java | 205 +- .../client/model/NotificationTargetId.java | 45 +- .../client/model/NotificationTemplateId.java | 45 +- .../client/model/OAuth2ClientId.java | 47 +- .../client/model/OtaPackageId.java | 45 +- .../org/thingsboard/client/model/QueueId.java | 45 +- .../client/model/QueueStatsId.java | 45 +- .../model/RateLimitsRecipientsConfig.java | 2 +- .../ResourceShortageRecipientsConfig.java | 2 +- .../org/thingsboard/client/model/RpcId.java | 45 +- .../thingsboard/client/model/RuleChainId.java | 45 +- ...mponentLifecycleEventRecipientsConfig.java | 2 +- .../thingsboard/client/model/RuleNodeId.java | 45 +- ...TaskProcessingFailureRecipientsConfig.java | 2 +- .../thingsboard/client/model/TbResource.java | 56 +- .../client/model/TbResourceId.java | 45 +- .../client/model/TbResourceInfo.java | 56 +- .../thingsboard/client/model/TenantId.java | 45 +- .../client/model/TenantProfileId.java | 45 +- .../org/thingsboard/client/model/UserId.java | 45 +- .../client/model/WidgetTypeId.java | 45 +- .../client/model/WidgetsBundleId.java | 45 +- .../thingsboard/client/api/AlarmApiTest.java | 5 +- .../client/api/AlarmCommentApiTest.java | 5 +- .../client/api/CalculatedFieldApiTest.java | 16 +- .../client/api/EntityRelationApiTest.java | 24 +- .../client/api/EntityViewApiTest.java | 8 +- .../client/api/OtaPackageApiTest.java | 4 +- 110 files changed, 10091 insertions(+), 5373 deletions(-) create mode 100644 ce/docs/ApiUsageStateId.md create mode 100644 ce/docs/DeviceApiControllerApi.md create mode 100644 ce/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java diff --git a/ce/docs/AdminSettingsId.md b/ce/docs/AdminSettingsId.md index 873cea5a..475ce6cd 100644 --- a/ce/docs/AdminSettingsId.md +++ b/ce/docs/AdminSettingsId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.AdminSettingsId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/AiModelId.md b/ce/docs/AiModelId.md index 18147752..69b11b5d 100644 --- a/ce/docs/AiModelId.md +++ b/ce/docs/AiModelId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.AiModelId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | Entity type of the AI model | | +| **entityType** | **EntityType** | Entity type of the AI model | [readonly] | diff --git a/ce/docs/AlarmId.md b/ce/docs/AlarmId.md index f8b26b96..a6b2af56 100644 --- a/ce/docs/AlarmId.md +++ b/ce/docs/AlarmId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.AlarmId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/ApiKeyId.md b/ce/docs/ApiKeyId.md index bd96b4b7..e27c198e 100644 --- a/ce/docs/ApiKeyId.md +++ b/ce/docs/ApiKeyId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.ApiKeyId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/ApiUsageStateId.md b/ce/docs/ApiUsageStateId.md new file mode 100644 index 00000000..62bb3071 --- /dev/null +++ b/ce/docs/ApiUsageStateId.md @@ -0,0 +1,25 @@ + +# ApiUsageStateId + +`org.thingsboard.client.model.ApiUsageStateId` + +**Extends:** **EntityId** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **id** | **UUID** | ID of the entity, time-based UUID v1 | | +| **entityType** | **EntityType** | string | [readonly] | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/AssetId.md b/ce/docs/AssetId.md index 3b5d5d84..927dcf6c 100644 --- a/ce/docs/AssetId.md +++ b/ce/docs/AssetId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.AssetId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/AssetProfileId.md b/ce/docs/AssetProfileId.md index 3033f4e6..a6ae3a70 100644 --- a/ce/docs/AssetProfileId.md +++ b/ce/docs/AssetProfileId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.AssetProfileId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/AuditLog.md b/ce/docs/AuditLog.md index 06d9da33..27d4f603 100644 --- a/ce/docs/AuditLog.md +++ b/ce/docs/AuditLog.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the auditLog creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **entityId** | **EntityId** | JSON object with Entity id | [optional] [readonly] | +| **entityId** | **EntityId** | JSON object with Entity id | [optional] | | **entityName** | **String** | Name of the logged entity | [optional] [readonly] | | **userId** | **UserId** | JSON object with User id. | [optional] [readonly] | | **userName** | **String** | Unique user name(email) of the user that performed some action on logged entity | [optional] [readonly] | diff --git a/ce/docs/CalculatedFieldId.md b/ce/docs/CalculatedFieldId.md index 3ef8e84f..4cc72d87 100644 --- a/ce/docs/CalculatedFieldId.md +++ b/ce/docs/CalculatedFieldId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.CalculatedFieldId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/CustomerId.md b/ce/docs/CustomerId.md index bccf998e..75f233a2 100644 --- a/ce/docs/CustomerId.md +++ b/ce/docs/CustomerId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.CustomerId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/DashboardId.md b/ce/docs/DashboardId.md index 0cdebef3..7e0facb9 100644 --- a/ce/docs/DashboardId.md +++ b/ce/docs/DashboardId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.DashboardId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/DeviceApiControllerApi.md b/ce/docs/DeviceApiControllerApi.md new file mode 100644 index 00000000..ad70f8db --- /dev/null +++ b/ce/docs/DeviceApiControllerApi.md @@ -0,0 +1,300 @@ +# DeviceApiControllerApi + +`ThingsboardClient` methods: + +``` +String getDeviceAttributes(@Nonnull String deviceToken, @Nonnull String clientKeys, @Nonnull String sharedKeys) // Get attributes (getDeviceAttributes) +String getFirmware(@Nonnull String deviceToken, @Nonnull String title, @Nonnull String version, @Nullable Integer size, @Nullable Integer chunk) // Get Device Firmware (getFirmware) +String getSoftware(@Nonnull String deviceToken, @Nonnull String title, @Nonnull String version, @Nullable Integer size, @Nullable Integer chunk) // Get Device Software (getSoftware) +String postDeviceAttributes(@Nonnull String deviceToken, @Nonnull String body) // Post attributes (postDeviceAttributes) +String postRpcRequest(@Nonnull String deviceToken, @Nonnull String body) // Send the RPC command (postRpcRequest) +String postTelemetry(@Nonnull String deviceToken, @Nonnull String body) // Post time series data (postTelemetry) +String provisionDevice(@Nonnull String body) // Provision new device (provisionDevice) +String replyToCommand(@Nonnull String deviceToken, @Nonnull String requestId, @Nonnull String body) // Reply to RPC commands (replyToCommand) +String saveClaimingInfo(@Nonnull String deviceToken, @Nullable String body) // Save claiming information (saveClaimingInfo) +String subscribeToAttributes(@Nonnull String deviceToken, @Nullable Long timeout) // Subscribe to attribute updates (subscribeToAttributes) (Deprecated) +String subscribeToCommands(@Nonnull String deviceToken, @Nullable Long timeout) // Subscribe to RPC commands (subscribeToCommands) (Deprecated) +``` + + +## getDeviceAttributes + +``` +String getDeviceAttributes(@Nonnull String deviceToken, @Nonnull String clientKeys, @Nonnull String sharedKeys) +``` + +**GET** `/api/v1/{deviceToken}/attributes` + +Get attributes (getDeviceAttributes) + +Returns all attributes that belong to device. Use optional 'clientKeys' and/or 'sharedKeys' parameter to return specific attributes. Example of the result: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **clientKeys** | **String** | Comma separated key names for attribute with client scope | | +| **sharedKeys** | **String** | Comma separated key names for attribute with shared scope | | + +### Return type + +**String** + + +## getFirmware + +``` +String getFirmware(@Nonnull String deviceToken, @Nonnull String title, @Nonnull String version, @Nullable Integer size, @Nullable Integer chunk) +``` + +**GET** `/api/v1/{deviceToken}/firmware` + +Get Device Firmware (getFirmware) + +Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **title** | **String** | Title of the firmware, corresponds to the value of 'fw_title' attribute. | | +| **version** | **String** | Version of the firmware, corresponds to the value of 'fw_version' attribute. | | +| **size** | **Integer** | Size of the chunk. Optional. Omit to download the entire file without chunks. | [optional] [default to 0] | +| **chunk** | **Integer** | Index of the chunk. Optional. Omit to download the entire file without chunks. | [optional] [default to 0] | + +### Return type + +**String** + + +## getSoftware + +``` +String getSoftware(@Nonnull String deviceToken, @Nonnull String title, @Nonnull String version, @Nullable Integer size, @Nullable Integer chunk) +``` + +**GET** `/api/v1/{deviceToken}/software` + +Get Device Software (getSoftware) + +Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **title** | **String** | Title of the software, corresponds to the value of 'sw_title' attribute. | | +| **version** | **String** | Version of the software, corresponds to the value of 'sw_version' attribute. | | +| **size** | **Integer** | Size of the chunk. Optional. Omit to download the entire file without using chunks. | [optional] [default to 0] | +| **chunk** | **Integer** | Index of the chunk. Optional. Omit to download the entire file without using chunks. | [optional] [default to 0] | + +### Return type + +**String** + + +## postDeviceAttributes + +``` +String postDeviceAttributes(@Nonnull String deviceToken, @Nonnull String body) +``` + +**POST** `/api/v1/{deviceToken}/attributes` + +Post attributes (postDeviceAttributes) + +Post client attribute updates on behalf of device. Example of the request: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **body** | **String** | JSON with attribute key-value pairs. See API call description for example. | | + +### Return type + +**String** + + +## postRpcRequest + +``` +String postRpcRequest(@Nonnull String deviceToken, @Nonnull String body) +``` + +**POST** `/api/v1/{deviceToken}/rpc` + +Send the RPC command (postRpcRequest) + +Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **body** | **String** | The RPC request JSON | | + +### Return type + +**String** + + +## postTelemetry + +``` +String postTelemetry(@Nonnull String deviceToken, @Nonnull String body) +``` + +**POST** `/api/v1/{deviceToken}/telemetry` + +Post time series data (postTelemetry) + +Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **body** | **String** | | | + +### Return type + +**String** + + +## provisionDevice + +``` +String provisionDevice(@Nonnull String body) +``` + +**POST** `/api/v1/provision` + +Provision new device (provisionDevice) + +Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String** | JSON with provision request. See API call description for example. | | + +### Return type + +**String** + + +## replyToCommand + +``` +String replyToCommand(@Nonnull String deviceToken, @Nonnull String requestId, @Nonnull String body) +``` + +**POST** `/api/v1/{deviceToken}/rpc/{requestId}` + +Reply to RPC commands (replyToCommand) + +Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **requestId** | **String** | RPC request id from the incoming RPC request | | +| **body** | **String** | Reply to the RPC request, JSON. For example: {\"status\":\"success\"} | | + +### Return type + +**String** + + +## saveClaimingInfo + +``` +String saveClaimingInfo(@Nonnull String deviceToken, @Nullable String body) +``` + +**POST** `/api/v1/{deviceToken}/claim` + +Save claiming information (saveClaimingInfo) + +Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **body** | **String** | | [optional] | + +### Return type + +**String** + + +## subscribeToAttributes + +``` +String subscribeToAttributes(@Nonnull String deviceToken, @Nullable Long timeout) +``` + +**GET** `/api/v1/{deviceToken}/attributes/updates` + +Subscribe to attribute updates (subscribeToAttributes) (Deprecated) + +Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **timeout** | **Long** | Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. | [optional] [default to 0] | + +### Return type + +**String** + + +## subscribeToCommands + +``` +String subscribeToCommands(@Nonnull String deviceToken, @Nullable Long timeout) +``` + +**GET** `/api/v1/{deviceToken}/rpc` + +Subscribe to RPC commands (subscribeToCommands) (Deprecated) + +Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **timeout** | **Long** | Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. | [optional] [default to 0] | + +### Return type + +**String** + diff --git a/ce/docs/DeviceId.md b/ce/docs/DeviceId.md index b282757b..d38b321b 100644 --- a/ce/docs/DeviceId.md +++ b/ce/docs/DeviceId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.DeviceId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/DeviceProfileId.md b/ce/docs/DeviceProfileId.md index 6d554c70..a9c229df 100644 --- a/ce/docs/DeviceProfileId.md +++ b/ce/docs/DeviceProfileId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.DeviceProfileId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/DomainId.md b/ce/docs/DomainId.md index a7406eb1..8a0c0b02 100644 --- a/ce/docs/DomainId.md +++ b/ce/docs/DomainId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.DomainId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/EdgeId.md b/ce/docs/EdgeId.md index 6cb962d7..026a4029 100644 --- a/ce/docs/EdgeId.md +++ b/ce/docs/EdgeId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.EdgeId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/EntityViewId.md b/ce/docs/EntityViewId.md index 2ac79613..f57fd80e 100644 --- a/ce/docs/EntityViewId.md +++ b/ce/docs/EntityViewId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.EntityViewId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/EventInfo.md b/ce/docs/EventInfo.md index 2af98e01..f9940f61 100644 --- a/ce/docs/EventInfo.md +++ b/ce/docs/EventInfo.md @@ -12,7 +12,7 @@ | **tenantId** | **TenantId** | JSON object with Tenant Id. | [optional] [readonly] | | **type** | **String** | Event type | [optional] | | **uid** | **String** | string | [optional] | -| **entityId** | **EntityId** | JSON object with Entity Id for which event is created. | [optional] [readonly] | +| **entityId** | **EntityId** | JSON object with Entity Id for which event is created. | [optional] | | **body** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | diff --git a/ce/docs/FeaturesInfo.md b/ce/docs/FeaturesInfo.md index 9a479905..ebf4ca82 100644 --- a/ce/docs/FeaturesInfo.md +++ b/ce/docs/FeaturesInfo.md @@ -9,9 +9,9 @@ |------------ | ------------- | ------------- | -------------| | **smsEnabled** | **Boolean** | | [optional] | | **oauthEnabled** | **Boolean** | | [optional] | +| **notificationEnabled** | **Boolean** | | [optional] | | **twoFaEnabled** | **Boolean** | | [optional] | | **emailEnabled** | **Boolean** | | [optional] | -| **notificationEnabled** | **Boolean** | | [optional] | diff --git a/ce/docs/JobId.md b/ce/docs/JobId.md index 6b5e3cb4..494c217f 100644 --- a/ce/docs/JobId.md +++ b/ce/docs/JobId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.JobId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/MobileAppBundleId.md b/ce/docs/MobileAppBundleId.md index bfa901f8..502f44e1 100644 --- a/ce/docs/MobileAppBundleId.md +++ b/ce/docs/MobileAppBundleId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.MobileAppBundleId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/MobileAppId.md b/ce/docs/MobileAppId.md index 4b205e54..4b804e2f 100644 --- a/ce/docs/MobileAppId.md +++ b/ce/docs/MobileAppId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.MobileAppId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/NotificationId.md b/ce/docs/NotificationId.md index c3fa9b64..ba02ca47 100644 --- a/ce/docs/NotificationId.md +++ b/ce/docs/NotificationId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.NotificationId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/NotificationRequestId.md b/ce/docs/NotificationRequestId.md index d532018f..cf36da50 100644 --- a/ce/docs/NotificationRequestId.md +++ b/ce/docs/NotificationRequestId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.NotificationRequestId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/NotificationRuleId.md b/ce/docs/NotificationRuleId.md index ed79e89b..25827842 100644 --- a/ce/docs/NotificationRuleId.md +++ b/ce/docs/NotificationRuleId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.NotificationRuleId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/NotificationRuleRecipientsConfig.md b/ce/docs/NotificationRuleRecipientsConfig.md index 14e18a09..84f99173 100644 --- a/ce/docs/NotificationRuleRecipientsConfig.md +++ b/ce/docs/NotificationRuleRecipientsConfig.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **triggerType** | **NotificationRuleTriggerType** | | | +| **triggerType** | **NotificationRuleTriggerType** | | [optional] | diff --git a/ce/docs/NotificationTargetExportData.md b/ce/docs/NotificationTargetExportData.md index d3c84c5d..81e2f9d5 100644 --- a/ce/docs/NotificationTargetExportData.md +++ b/ce/docs/NotificationTargetExportData.md @@ -3,15 +3,12 @@ `org.thingsboard.client.model.NotificationTargetExportData` +**Extends:** **EntityExportData** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **entity** | **ExportableEntity** | | [optional] | -| **entityType** | **EntityType** | | | -| **relations** | **List\** | | [optional] | -| **attributes** | **Map\\>** | Map of attributes where key is the scope of attributes and value is the list of attributes for that scope | [optional] | -| **calculatedFields** | **List\** | | [optional] | diff --git a/ce/docs/NotificationTargetId.md b/ce/docs/NotificationTargetId.md index 4863df8b..7715bb60 100644 --- a/ce/docs/NotificationTargetId.md +++ b/ce/docs/NotificationTargetId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.NotificationTargetId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/NotificationTemplateId.md b/ce/docs/NotificationTemplateId.md index fce9b549..4011f2cb 100644 --- a/ce/docs/NotificationTemplateId.md +++ b/ce/docs/NotificationTemplateId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.NotificationTemplateId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/OAuth2ClientId.md b/ce/docs/OAuth2ClientId.md index 67682a4f..0cc854af 100644 --- a/ce/docs/OAuth2ClientId.md +++ b/ce/docs/OAuth2ClientId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.OAuth2ClientId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/OtaPackageId.md b/ce/docs/OtaPackageId.md index a8f7df30..d12ea0bc 100644 --- a/ce/docs/OtaPackageId.md +++ b/ce/docs/OtaPackageId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.OtaPackageId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/QueueId.md b/ce/docs/QueueId.md index 8b3e898c..27746333 100644 --- a/ce/docs/QueueId.md +++ b/ce/docs/QueueId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.QueueId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/QueueStatsId.md b/ce/docs/QueueStatsId.md index 9d169464..531de89b 100644 --- a/ce/docs/QueueStatsId.md +++ b/ce/docs/QueueStatsId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.QueueStatsId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/RpcId.md b/ce/docs/RpcId.md index 1cf525b7..dd5a301f 100644 --- a/ce/docs/RpcId.md +++ b/ce/docs/RpcId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.RpcId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/RuleChainId.md b/ce/docs/RuleChainId.md index 80204725..85cf6ea8 100644 --- a/ce/docs/RuleChainId.md +++ b/ce/docs/RuleChainId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.RuleChainId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/RuleNodeId.md b/ce/docs/RuleNodeId.md index 910349c1..a7de366f 100644 --- a/ce/docs/RuleNodeId.md +++ b/ce/docs/RuleNodeId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.RuleNodeId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/TbResource.md b/ce/docs/TbResource.md index e0042cae..9d107784 100644 --- a/ce/docs/TbResource.md +++ b/ce/docs/TbResource.md @@ -24,8 +24,8 @@ A JSON value representing the Resource. | **preview** | **String** | | [optional] | | **name** | **String** | | [optional] [readonly] | | **_public** | **Boolean** | | [optional] | -| **link** | **String** | | [optional] [readonly] | | **publicLink** | **String** | | [optional] [readonly] | +| **link** | **String** | | [optional] [readonly] | diff --git a/ce/docs/TbResourceId.md b/ce/docs/TbResourceId.md index f0463682..f424273e 100644 --- a/ce/docs/TbResourceId.md +++ b/ce/docs/TbResourceId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.TbResourceId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/TbResourceInfo.md b/ce/docs/TbResourceInfo.md index fe6ef5bc..4a87a800 100644 --- a/ce/docs/TbResourceInfo.md +++ b/ce/docs/TbResourceInfo.md @@ -22,8 +22,8 @@ A JSON value representing the Resource Info. | **descriptor** | **com.fasterxml.jackson.databind.JsonNode** | Resource descriptor. | [optional] | | **name** | **String** | | [optional] [readonly] | | **_public** | **Boolean** | | [optional] | -| **link** | **String** | | [optional] [readonly] | | **publicLink** | **String** | | [optional] [readonly] | +| **link** | **String** | | [optional] [readonly] | diff --git a/ce/docs/TenantId.md b/ce/docs/TenantId.md index 40a30843..2ded2f60 100644 --- a/ce/docs/TenantId.md +++ b/ce/docs/TenantId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.TenantId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/TenantProfileId.md b/ce/docs/TenantProfileId.md index 828eb872..44448d1d 100644 --- a/ce/docs/TenantProfileId.md +++ b/ce/docs/TenantProfileId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.TenantProfileId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/UserId.md b/ce/docs/UserId.md index 8cca6337..2f238158 100644 --- a/ce/docs/UserId.md +++ b/ce/docs/UserId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.UserId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/WidgetTypeId.md b/ce/docs/WidgetTypeId.md index 0e778035..1ff11711 100644 --- a/ce/docs/WidgetTypeId.md +++ b/ce/docs/WidgetTypeId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.WidgetTypeId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/WidgetsBundleId.md b/ce/docs/WidgetsBundleId.md index b798823e..9765a2d4 100644 --- a/ce/docs/WidgetsBundleId.md +++ b/ce/docs/WidgetsBundleId.md @@ -3,12 +3,14 @@ `org.thingsboard.client.model.WidgetsBundleId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | +| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/spec/openapi.json b/ce/spec/openapi.json index 0a0508ce..ebd46f3c 100644 --- a/ce/spec/openapi.json +++ b/ce/spec/openapi.json @@ -73,6 +73,10 @@ "name": "dashboard-controller", "description": "Dashboard Controller" }, + { + "name": "device-api-controller", + "description": "Device Api Controller" + }, { "name": "device-connectivity-controller", "description": "Device Connectivity Controller" @@ -7494,7 +7498,7 @@ "api-key-controller" ], "summary": "Save API key for user (saveApiKey)", - "description": "Creates an API key for the given user and returns the token ONCE as 'ApiKey '.\n\nAvailable for any authorized user. ", + "description": "Creates an API key for the given user and returns the token ONCE as 'ApiKey \u003Cvalue\u003E'.\n\nAvailable for any authorized user. ", "operationId": "saveApiKey", "requestBody": { "content": { @@ -22017,33 +22021,32 @@ ] } }, - "/api/device-connectivity/gateway-launch/{deviceId}/docker-compose/download": { - "get": { + "/api/v1/provision": { + "post": { "tags": [ - "device-connectivity-controller" + "device-api-controller" ], - "summary": "Download generated docker-compose.yml file for gateway (downloadGatewayDockerCompose)", - "description": "Download generated docker-compose.yml for gateway.", - "operationId": "downloadGatewayDockerCompose", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Provision new device (provisionDevice)", + "description": "Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: \n\n```json\n{\n \"deviceName\": \"NEW_DEVICE_NAME\",\n \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\",\n \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\"\n}\n```\n\nWhere 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials:\n\n```json\n{\n \"credentialsType\":\"ACCESS_TOKEN\",\n \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\",\n \"status\":\"SUCCESS\"\n}\n```\n\n", + "operationId": "provisionDevice", + "requestBody": { + "description": "JSON with provision request. See API call description for example.", + "content": { + "application/json": { + "schema": { + "type": "string" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "string" } } } @@ -22060,7 +22063,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -22153,30 +22156,40 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/device-connectivity/{deviceId}": { + "/api/v1/{deviceToken}/attributes": { "get": { "tags": [ - "device-connectivity-controller" + "device-api-controller" ], - "summary": "Get commands to publish device telemetry (getDevicePublishTelemetryCommands)", - "description": "Fetch the list of commands to publish device telemetry based on device profile If the user has the authority of 'Tenant Administrator', the server checks that the device is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the device is assigned to the same customer. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDevicePublishTelemetryCommands", + "summary": "Get attributes (getDeviceAttributes)", + "description": "Returns all attributes that belong to device. Use optional 'clientKeys' and/or 'sharedKeys' parameter to return specific attributes. \n Example of the result: \n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "getDeviceAttributes", "parameters": [ { - "name": "deviceId", + "name": "deviceToken", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Your device access token.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "clientKeys", + "in": "query", + "description": "Comma separated key names for attribute with client scope", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sharedKeys", + "in": "query", + "description": "Comma separated key names for attribute with shared scope", "required": true, "schema": { "type": "string" @@ -22189,21 +22202,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" - }, - "examples": { - "http": { - "description": "http", - "value": "curl -v -X POST http://localhost:8080/api/v1/0ySs4FTOn5WU15XLmal8/telemetry --header Content-Type:application/json --data {temperature:25}" - }, - "mqtt": { - "description": "mqtt", - "value": "mosquitto_pub -d -q 1 -h localhost -t v1/devices/me/telemetry -i myClient1 -u myUsername1 -P myPassword -m {temperature:25}" - }, - "coap": { - "description": "coap", - "value": "coap-client -m POST coap://localhost:5683/api/v1/0ySs4FTOn5WU15XLmal8/telemetry -t json -e {temperature:25}" - } + "type": "string" } } } @@ -22313,44 +22312,44 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/device-connectivity/{protocol}/certificate/download": { - "get": { + } + }, + "post": { "tags": [ - "device-connectivity-controller" + "device-api-controller" ], - "summary": "Download server certificate using file path defined in device.connectivity properties (downloadServerCertificate)", - "description": "Download server certificate.", - "operationId": "downloadServerCertificate", + "summary": "Post attributes (postDeviceAttributes)", + "description": "Post client attribute updates on behalf of device. \n Example of the request: \n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "postDeviceAttributes", "parameters": [ { - "name": "protocol", + "name": "deviceToken", "in": "path", - "description": "A string value representing the device connectivity protocol. Possible values: 'mqtt', 'mqtts', 'http', 'https', 'coap', 'coaps'", + "description": "Your device access token.", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "description": "JSON with attribute key-value pairs. See API call description for example.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "string" } } } @@ -22367,7 +22366,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -22460,34 +22459,37 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/customer/device/{deviceId}": { - "delete": { + "/api/v1/{deviceToken}/attributes/updates": { + "get": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Unassign device from customer (unassignDeviceFromCustomer)", - "description": "Clears assignment of the device to customer. Customer will not be able to query device afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "unassignDeviceFromCustomer", + "summary": "Subscribe to attribute updates (subscribeToAttributes) (Deprecated)", + "description": "Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. \n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "subscribeToAttributes", "parameters": [ { - "name": "deviceId", + "name": "deviceToken", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Your device access token.", "required": true, "schema": { "type": "string" } + }, + { + "name": "timeout", + "in": "query", + "description": "Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side.", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } } ], "responses": { @@ -22496,7 +22498,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "string" } } } @@ -22606,30 +22608,22 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/customer/device/{deviceName}/claim": { + "/api/v1/{deviceToken}/claim": { "post": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Claim device (claimDevice)", - "description": "Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. \nIn order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. \nSee official documentation for more details regarding claiming.\n\nAvailable for users with 'CUSTOMER_USER' authority.", - "operationId": "claimDevice", + "summary": "Save claiming information (saveClaimingInfo)", + "description": "Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation.\n Example of the request payload: \n\n```json\n{\"secretKey\":\"value\", \"durationMs\":60000}\n```\n\nNote: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used.\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "saveClaimingInfo", "parameters": [ { - "name": "deviceName", + "name": "deviceToken", "in": "path", - "description": "Unique name of the device which is going to be claimed", + "description": "Your device access token.", "required": true, "schema": { "type": "string" @@ -22640,7 +22634,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ClaimRequest" + "type": "string" } } } @@ -22761,32 +22755,66 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - }, - "delete": { + } + } + }, + "/api/v1/{deviceToken}/firmware": { + "get": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Reclaim device (reClaimDevice)", - "description": "Reclaiming means the device will be unassigned from the customer and the device will be available for claiming again.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "reClaimDevice", + "summary": "Get Device Firmware (getFirmware)", + "description": "Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. \n\nOptional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. \n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "getFirmware", "parameters": [ { - "name": "deviceName", + "name": "deviceToken", "in": "path", - "description": "Unique name of the device which is going to be reclaimed", + "description": "Your device access token.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "title", + "in": "query", + "description": "Title of the firmware, corresponds to the value of 'fw_title' attribute.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "query", + "description": "Version of the firmware, corresponds to the value of 'fw_version' attribute.", "required": true, "schema": { "type": "string" } + }, + { + "name": "size", + "in": "query", + "description": "Size of the chunk. Optional. Omit to download the entire file without chunks.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "name": "chunk", + "in": "query", + "description": "Index of the chunk. Optional. Omit to download the entire file without chunks.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } } ], "responses": { @@ -22905,34 +22933,37 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/customer/public/device/{deviceId}": { - "post": { + "/api/v1/{deviceToken}/rpc": { + "get": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Make device publicly available (assignDeviceToPublicCustomer)", - "description": "Device will be available for non-authorized (not logged-in) users. This is useful to create dashboards that you plan to share/embed on a publicly available website. However, users that are logged-in and belong to different tenant will not be able to access the device.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignDeviceToPublicCustomer", + "summary": "Subscribe to RPC commands (subscribeToCommands) (Deprecated)", + "description": "Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. \n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "subscribeToCommands", "parameters": [ { - "name": "deviceId", + "name": "deviceToken", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Your device access token.", "required": true, "schema": { "type": "string" } + }, + { + "name": "timeout", + "in": "query", + "description": "Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side.", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } } ], "responses": { @@ -22941,7 +22972,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "string" } } } @@ -22958,7 +22989,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -23051,73 +23082,64 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/customer/{customerId}/device/{deviceId}": { + } + }, "post": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Assign device to customer (assignDeviceToCustomer)", - "description": "Creates assignment of the device to customer. Customer will be able to query device afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignDeviceToCustomer", + "summary": "Send the RPC command (postRpcRequest)", + "description": "Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example:\n\n```json\n{\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}}\n```\n\nThe response contains arbitrary JSON with the RPC reply. For example: \n\n```json\n{\"result\": 4}\n```\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "postRpcRequest", "parameters": [ { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "deviceId", + "name": "deviceToken", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Your device access token.", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "description": "The RPC request JSON", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "OK", + "description": "RPC request to server was sent to Rule Engine.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "string" } } } }, "400": { - "description": "Bad Request", + "description": "Invalid structure of the request.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid request body", - "errorCode": 31, - "timestamp": 1609459200000 - } - } + "type": "string" + } + } + } + }, + "413": { + "description": "Request payload too large.", + "content": { + "application/json": { + "schema": { + "type": "string" } } } @@ -23206,149 +23228,75 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/customer/{customerId}/deviceInfos": { - "get": { + "/api/v1/{deviceToken}/rpc/{requestId}": { + "post": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Get Customer Device Infos (getCustomerDeviceInfos)", - "description": "Returns a page of devices info objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerDeviceInfos", + "summary": "Reply to RPC commands (replyToCommand)", + "description": "Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON.\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "replyToCommand", "parameters": [ { - "name": "customerId", + "name": "deviceToken", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Your device access token.", "required": true, "schema": { "type": "string" } }, { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "requestId", + "in": "path", + "description": "RPC request id from the incoming RPC request", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "Device type as the name of the device profile", - "required": false, "schema": { "type": "string" } - }, - { - "name": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "active", - "in": "query", - "description": "A boolean value representing the device active flag.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], + "requestBody": { + "description": "Reply to the RPC request, JSON. For example: {\"status\":\"success\"}", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "OK", + "description": "RPC reply to command request was sent to Core.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceInfo" + "type": "string" } } } }, "400": { - "description": "Bad Request", + "description": "Invalid structure of the request.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } + "type": "string" + } + } + } + }, + "413": { + "description": "Request payload is too large.", + "content": { + "application/json": { + "schema": { + "type": "string" } } } @@ -23437,100 +23385,65 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/customer/{customerId}/devices": { + "/api/v1/{deviceToken}/software": { "get": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Get Customer Devices (getCustomerDevices)", - "description": "Returns a page of devices objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerDevices", + "summary": "Get Device Software (getSoftware)", + "description": "Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. \n\nOptional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. \n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "getSoftware", "parameters": [ { - "name": "customerId", + "name": "deviceToken", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Your device access token.", "required": true, "schema": { "type": "string" } }, { - "name": "pageSize", + "name": "title", "in": "query", - "description": "Maximum amount of entities in a one page", + "description": "Title of the software, corresponds to the value of 'sw_title' attribute.", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "Device type as the name of the device profile", - "required": false, "schema": { "type": "string" } }, { - "name": "textSearch", + "name": "version", "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, + "description": "Version of the software, corresponds to the value of 'sw_version' attribute.", + "required": true, "schema": { "type": "string" } }, { - "name": "sortProperty", + "name": "size", "in": "query", - "description": "Property of entity to sort by", + "description": "Size of the chunk. Optional. Omit to download the entire file without using chunks.", "required": false, "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] + "type": "integer", + "format": "int32", + "default": 0 } }, { - "name": "sortOrder", + "name": "chunk", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Index of the chunk. Optional. Omit to download the entire file without using chunks.", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "integer", + "format": "int32", + "default": 0 } } ], @@ -23540,7 +23453,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "type": "string" } } } @@ -23650,72 +23563,33 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/device": { + "/api/v1/{deviceToken}/telemetry": { "post": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Create Or Update Device (saveDevice)", - "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error.\n\nDevice name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveDevice", + "summary": "Post time series data (postTelemetry)", + "description": "Post time series data on behalf of device. \n Example of the request: The request payload is a JSON document with three possible formats:\n\nSimple format without timestamp. In such a case, current server time will be used: \n\n\n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\n\n\n\n Single JSON object with timestamp: \n\n\n\n```json\n{\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}\n```\n\n\n\n JSON array with timestamps: \n\n\n\n```json\n[\n{\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, \n{\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}}\n]\n```\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "postTelemetry", "parameters": [ { - "name": "accessToken", - "in": "query", - "description": "Optional value of the device credentials to be used during device creation. If omitted, access token will be auto-generated.", - "required": false, + "name": "deviceToken", + "in": "path", + "description": "Your device access token.", + "required": true, "schema": { "type": "string" } - }, - { - "name": "nameConflictPolicy", - "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", - "required": false, - "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" - } - }, - { - "name": "uniquifySeparator", - "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", - "required": false, - "schema": { - "type": "string", - "default": "_" - } - }, - { - "name": "uniquifyStrategy", - "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", - "required": false, - "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" - } } ], "requestBody": { - "description": "A JSON value representing the device.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "string" } } }, @@ -23727,7 +23601,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "string" } } } @@ -23837,74 +23711,36 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/device-with-credentials": { - "post": { + "/api/device-connectivity/gateway-launch/{deviceId}/docker-compose/download": { + "get": { "tags": [ - "device-controller" + "device-connectivity-controller" ], - "summary": "Create Device (saveDevice) with credentials ", - "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \"Access token\" with device profile ID below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: \"Access token\" with device profile default below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: \"X509\" with device profile ID below: \n\nNote: credentialsId - format Sha3Hash, certificateValue - format PEM (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: \"MQTT_BASIC\" with device profile ID below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of LwM2M device and RPK credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveDeviceWithCredentials", + "summary": "Download generated docker-compose.yml file for gateway (downloadGatewayDockerCompose)", + "description": "Download generated docker-compose.yml for gateway.", + "operationId": "downloadGatewayDockerCompose", "parameters": [ { - "name": "nameConflictPolicy", - "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", - "required": false, - "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" - } - }, - { - "name": "uniquifySeparator", - "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", - "required": false, - "schema": { - "type": "string", - "default": "_" - } - }, - { - "name": "uniquifyStrategy", - "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", - "required": false, + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SaveDeviceWithCredentialsRequest" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "string", + "format": "binary" } } } @@ -23921,7 +23757,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -24025,31 +23861,46 @@ ] } }, - "/api/device/bulk_import": { - "post": { + "/api/device-connectivity/{deviceId}": { + "get": { "tags": [ - "device-controller" + "device-connectivity-controller" ], - "summary": "Import the bulk of devices (processDevicesBulkImport)", - "description": "There's an ability to import the bulk of devices using the only .csv file.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "processDevicesBulkImport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkImportRequest" - } + "summary": "Get commands to publish device telemetry (getDevicePublishTelemetryCommands)", + "description": "Fetch the list of commands to publish device telemetry based on device profile If the user has the authority of 'Tenant Administrator', the server checks that the device is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the device is assigned to the same customer. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDevicePublishTelemetryCommands", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkImportResultDevice" + "$ref": "#/components/schemas/JsonNode" + }, + "examples": { + "http": { + "description": "http", + "value": "curl -v -X POST http://localhost:8080/api/v1/0ySs4FTOn5WU15XLmal8/telemetry --header Content-Type:application/json --data {temperature:25}" + }, + "mqtt": { + "description": "mqtt", + "value": "mosquitto_pub -d -q 1 -h localhost -t v1/devices/me/telemetry -i myClient1 -u myUsername1 -P myPassword -m {temperature:25}" + }, + "coap": { + "description": "coap", + "value": "coap-client -m POST coap://localhost:5683/api/v1/0ySs4FTOn5WU15XLmal8/telemetry -t json -e {temperature:25}" + } } } } @@ -24066,7 +23917,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -24170,31 +24021,33 @@ ] } }, - "/api/device/credentials": { - "post": { + "/api/device-connectivity/{protocol}/certificate/download": { + "get": { "tags": [ - "device-controller" + "device-connectivity-controller" ], - "summary": "Update device credentials (updateDeviceCredentials)", - "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials. \" +\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \"Access token\" with device ID and with device ID below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: \"X509\" with device profile ID below: \n\nNote: credentialsId - format Sha3Hash, certificateValue - format PEM (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: \"MQTT_BASIC\" with device profile ID below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of LwM2M device and RPK credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "updateDeviceCredentials", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceCredentials" - } + "summary": "Download server certificate using file path defined in device.connectivity properties (downloadServerCertificate)", + "description": "Download server certificate.", + "operationId": "downloadServerCertificate", + "parameters": [ + { + "name": "protocol", + "in": "path", + "description": "A string value representing the device connectivity protocol. Possible values: 'mqtt', 'mqtts', 'http', 'https', 'coap', 'coaps'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "$ref": "#/components/schemas/DeviceCredentials" + "type": "string", + "format": "binary" } } } @@ -24211,7 +24064,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -24315,14 +24168,14 @@ ] } }, - "/api/device/info/{deviceId}": { - "get": { + "/api/customer/device/{deviceId}": { + "delete": { "tags": [ "device-controller" ], - "summary": "Get Device Info (getDeviceInfoById)", - "description": "Fetch the Device Info object based on the provided Device Id. If the user has the authority of 'Tenant Administrator', the server checks that the device is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the device is assigned to the same customer. Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceInfoById", + "summary": "Unassign device from customer (unassignDeviceFromCustomer)", + "description": "Clears assignment of the device to customer. Customer will not be able to query device afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unassignDeviceFromCustomer", "parameters": [ { "name": "deviceId", @@ -24340,7 +24193,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceInfo" + "$ref": "#/components/schemas/Device" } } } @@ -24461,24 +24314,41 @@ ] } }, - "/api/device/types": { - "get": { + "/api/customer/device/{deviceName}/claim": { + "post": { "tags": [ "device-controller" ], - "summary": "Get Device Types (getDeviceTypes)", - "description": "Deprecated. See 'getDeviceProfileNames' API from Device Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceTypes", + "summary": "Claim device (claimDevice)", + "description": "Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. \nIn order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. \nSee official documentation for more details regarding claiming.\n\nAvailable for users with 'CUSTOMER_USER' authority.", + "operationId": "claimDevice", + "parameters": [ + { + "name": "deviceName", + "in": "path", + "description": "Unique name of the device which is going to be claimed", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClaimRequest" + } + } + } + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitySubtype" - } + "type": "string" } } } @@ -24495,7 +24365,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -24589,7 +24459,6 @@ } } }, - "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -24598,21 +24467,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/device/{deviceId}": { - "get": { + }, + "delete": { "tags": [ "device-controller" ], - "summary": "Get Device (getDeviceById)", - "description": "Fetch the Device object based on the provided Device Id. If the user has the authority of 'TENANT_ADMIN', the server checks that the device is owned by the same tenant. If the user has the authority of 'CUSTOMER_USER', the server checks that the device is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceById", + "summary": "Reclaim device (reClaimDevice)", + "description": "Reclaiming means the device will be unassigned from the customer and the device will be available for claiming again.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "reClaimDevice", "parameters": [ { - "name": "deviceId", + "name": "deviceName", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Unique name of the device which is going to be reclaimed", "required": true, "schema": { "type": "string" @@ -24625,7 +24492,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "string" } } } @@ -24744,14 +24611,16 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/customer/public/device/{deviceId}": { + "post": { "tags": [ "device-controller" ], - "summary": "Delete device (deleteDevice)", - "description": "Deletes the device, it's credentials and all the relations (from and to the device). Referencing non-existing device Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteDevice", + "summary": "Make device publicly available (assignDeviceToPublicCustomer)", + "description": "Device will be available for non-authorized (not logged-in) users. This is useful to create dashboards that you plan to share/embed on a publicly available website. However, users that are logged-in and belong to different tenant will not be able to access the device.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignDeviceToPublicCustomer", "parameters": [ { "name": "deviceId", @@ -24765,7 +24634,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + } }, "400": { "description": "Bad Request", @@ -24779,7 +24655,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -24883,15 +24759,24 @@ ] } }, - "/api/device/{deviceId}/credentials": { - "get": { + "/api/customer/{customerId}/device/{deviceId}": { + "post": { "tags": [ "device-controller" ], - "summary": "Get Device Credentials (getDeviceCredentialsByDeviceId)", - "description": "If during device creation there wasn't specified any credentials, platform generates random 'ACCESS_TOKEN' credentials.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceCredentialsByDeviceId", + "summary": "Assign device to customer (assignDeviceToCustomer)", + "description": "Creates assignment of the device to customer. Customer will be able to query device afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignDeviceToCustomer", "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "deviceId", "in": "path", @@ -24908,7 +24793,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceCredentials" + "$ref": "#/components/schemas/Device" } } } @@ -24925,7 +24810,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -25029,25 +24914,107 @@ ] } }, - "/api/devices": { + "/api/customer/{customerId}/deviceInfos": { "get": { "tags": [ "device-controller" ], - "summary": "Get Devices By Ids (getDevicesByIds)", - "description": "Requested devices must be owned by tenant or assigned to customer which user is performing the request. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDevicesByIds", + "summary": "Get Customer Device Infos (getCustomerDeviceInfos)", + "description": "Returns a page of devices info objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerDeviceInfos", "parameters": [ { - "name": "deviceIds", + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", "in": "query", - "description": "A list of devices ids, separated by comma ','", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "Device type as the name of the device profile", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "active", + "in": "query", + "description": "A boolean value representing the device active flag.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -25057,10 +25024,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } + "$ref": "#/components/schemas/PageDataDeviceInfo" } } } @@ -25179,34 +25143,101 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/customer/{customerId}/devices": { + "get": { "tags": [ "device-controller" ], - "summary": "Find related devices (findDevicesByQuery)", - "description": "Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findDevicesByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceSearchQuery" - } + "summary": "Get Customer Devices (getCustomerDevices)", + "description": "Returns a page of devices objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerDevices", + "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "Device type as the name of the device profile", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -25223,7 +25254,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -25327,46 +25358,73 @@ ] } }, - "/api/devices/count/{otaPackageType}/{deviceProfileId}": { - "get": { + "/api/device": { + "post": { "tags": [ "device-controller" ], - "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", - "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "countByDeviceProfileAndEmptyOtaPackage", + "summary": "Create Or Update Device (saveDevice)", + "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error.\n\nDevice name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveDevice", "parameters": [ { - "name": "otaPackageType", - "in": "path", - "description": "OTA package type", - "required": true, + "name": "accessToken", + "in": "query", + "description": "Optional value of the device credentials to be used during device creation. If omitted, access token will be auto-generated.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "nameConflictPolicy", + "in": "query", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", + "required": false, + "schema": { + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" + } + }, + { + "name": "uniquifySeparator", + "in": "query", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", + "required": false, "schema": { "type": "string", - "enum": [ - "FIRMWARE", - "SOFTWARE" - ] + "default": "_" } }, { - "name": "deviceProfileId", - "in": "path", - "description": "Device Profile Id. I.g. '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "uniquifyStrategy", + "in": "query", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" } } ], + "requestBody": { + "description": "A JSON value representing the device.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/Device" } } } @@ -25383,7 +25441,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -25487,34 +25545,56 @@ ] } }, - "/api/edge/{edgeId}/device/{deviceId}": { + "/api/device-with-credentials": { "post": { "tags": [ "device-controller" ], - "summary": "Assign device to edge (assignDeviceToEdge)", - "description": "Creates assignment of an existing device to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment device (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once device will be delivered to edge service, it's going to be available for usage on remote edge instance.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignDeviceToEdge", + "summary": "Create Device (saveDevice) with credentials ", + "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile default\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"X509\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\nNote: \u003Cb\u003EcredentialsId\u003C/b\u003E - format \u003Cb\u003ESha3Hash\u003C/b\u003E, \u003Cb\u003EcertificateValue\u003C/b\u003E - format \u003Cb\u003EPEM\u003C/b\u003E (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"MQTT_BASIC\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of \u003Cb\u003ELwM2M\u003C/b\u003E device and \u003Cb\u003ERPK\u003C/b\u003E credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveDeviceWithCredentials", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "nameConflictPolicy", + "in": "query", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", + "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" } }, { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "uniquifySeparator", + "in": "query", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", + "required": false, "schema": { - "type": "string" + "type": "string", + "default": "_" + } + }, + { + "name": "uniquifyStrategy", + "in": "query", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "required": false, + "schema": { + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SaveDeviceWithCredentialsRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -25640,41 +25720,33 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/device/bulk_import": { + "post": { "tags": [ "device-controller" ], - "summary": "Unassign device from edge (unassignDeviceFromEdge)", - "description": "Clears assignment of the device to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove device (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove device locally.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "unassignDeviceFromEdge", - "parameters": [ - { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Import the bulk of devices (processDevicesBulkImport)", + "description": "There's an ability to import the bulk of devices using the only .csv file.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "processDevicesBulkImport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkImportRequest" + } } }, - { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "$ref": "#/components/schemas/BulkImportResultDevice" } } } @@ -25691,7 +25763,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -25795,137 +25867,31 @@ ] } }, - "/api/edge/{edgeId}/devices": { - "get": { + "/api/device/credentials": { + "post": { "tags": [ "device-controller" ], - "summary": "Get devices assigned to edge (getEdgeDevices)", - "description": "Returns a page of devices assigned to edge. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeDevices", - "parameters": [ - { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "Device type as the name of the device profile", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "active", - "in": "query", - "description": "A boolean value representing the device active flag.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Devices with creation time before it won't be queried", - "required": false, - "schema": { - "type": "integer", - "format": "int64" + "summary": "Update device credentials (updateDeviceCredentials)", + "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials. \" +\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice ID\u003C/b\u003E and with \u003Cb\u003Edevice ID\u003C/b\u003E below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: \u003Cb\u003E\"X509\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\nNote: \u003Cb\u003EcredentialsId\u003C/b\u003E - format \u003Cb\u003ESha3Hash\u003C/b\u003E, \u003Cb\u003EcertificateValue\u003C/b\u003E - format \u003Cb\u003EPEM\u003C/b\u003E (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: \u003Cb\u003E\"MQTT_BASIC\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of \u003Cb\u003ELwM2M\u003C/b\u003E device and \u003Cb\u003ERPK\u003C/b\u003E credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -\u003E \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "updateDeviceCredentials", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceCredentials" + } } }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Devices with creation time after it won't be queried", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceInfo" + "$ref": "#/components/schemas/DeviceCredentials" } } } @@ -25942,7 +25908,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -26046,19 +26012,19 @@ ] } }, - "/api/tenant/device": { + "/api/device/info/{deviceId}": { "get": { "tags": [ "device-controller" ], - "summary": "Get Tenant Device (getTenantDeviceByName)", - "description": "Requested device must be owned by tenant that the user belongs to. Device name is an unique property of device. So it can be used to identify the device.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantDeviceByName", + "summary": "Get Device Info (getDeviceInfoById)", + "description": "Fetch the Device Info object based on the provided Device Id. If the user has the authority of 'Tenant Administrator', the server checks that the device is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the device is assigned to the same customer. Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceInfoById", "parameters": [ { - "name": "deviceName", - "in": "query", - "description": "A string value representing the Device name.", + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -26071,7 +26037,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "$ref": "#/components/schemas/DeviceInfo" } } } @@ -26192,108 +26158,24 @@ ] } }, - "/api/tenant/deviceInfos": { + "/api/device/types": { "get": { "tags": [ "device-controller" ], - "summary": "Get Tenant Device Infos (getTenantDeviceInfos)", - "description": "Returns a page of devices info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantDeviceInfos", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "Device type as the name of the device profile", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "active", - "in": "query", - "description": "A boolean value representing the device active flag.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "summary": "Get Device Types (getDeviceTypes)", + "description": "Deprecated. See 'getDeviceProfileNames' API from Device Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -26404,6 +26286,7 @@ } } }, + "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -26414,81 +26297,23 @@ ] } }, - "/api/tenant/devices": { + "/api/device/{deviceId}": { "get": { "tags": [ "device-controller" ], - "summary": "Get Tenant Devices (getTenantDevices)", - "description": "Returns a page of devices owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantDevices", + "summary": "Get Device (getDeviceById)", + "description": "Fetch the Device object based on the provided Device Id. If the user has the authority of 'TENANT_ADMIN', the server checks that the device is owned by the same tenant. If the user has the authority of 'CUSTOMER_USER', the server checks that the device is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceById", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "Device type as the name of the device profile", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -26497,7 +26322,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "$ref": "#/components/schemas/Device" } } } @@ -26616,26 +26441,15 @@ "ApiKeyForm": [] } ] - } - }, - "/api/tenant/{tenantId}/device/{deviceId}": { - "post": { + }, + "delete": { "tags": [ "device-controller" ], - "summary": "Assign device to tenant (assignDeviceToTenant)", - "description": "Creates assignment of the device to tenant. Thereafter tenant will be able to reassign the device to a customer.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignDeviceToTenant", + "summary": "Delete device (deleteDevice)", + "description": "Deletes the device, it's credentials and all the relations (from and to the device). Referencing non-existing device Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteDevice", "parameters": [ - { - "name": "tenantId", - "in": "path", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "deviceId", "in": "path", @@ -26648,14 +26462,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Device" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -26669,7 +26476,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -26773,31 +26580,32 @@ ] } }, - "/api/deviceProfile": { - "post": { + "/api/device/{deviceId}/credentials": { + "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Create Or Update Device Profile (saveDeviceProfile)", - "description": "Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. \n\nDevice profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant.\n\n# Device profile data definition\n\nDevice profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. \n\n```json\n{\n \"alarms\":[\n ],\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"DISABLED\",\n \"provisionDeviceSecret\":null\n },\n \"transportConfiguration\":{\n \"type\":\"DEFAULT\"\n }\n}\n```\n\n```json\n{\n \"alarms\":[\n {\n \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\",\n \"alarmType\":\"Temperature Alarm\",\n \"clearRule\":{\n \"schedule\":null,\n \"condition\":{\n \"spec\":{\n \"type\":\"SIMPLE\"\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":30.0,\n \"dynamicValue\":null\n },\n \"operation\":\"LESS\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"propagate\":false,\n \"createRules\":{\n \"MAJOR\":{\n \"schedule\":{\n \"type\":\"SPECIFIC_TIME\",\n \"endsOn\":64800000,\n \"startsOn\":43200000,\n \"timezone\":\"Europe/Kiev\",\n \"daysOfWeek\":[\n 1,\n 3,\n 5\n ]\n },\n \"condition\":{\n \"spec\":{\n \"type\":\"DURATION\",\n \"unit\":\"MINUTES\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":30,\n \"dynamicValue\":null\n }\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"COMPLEX\",\n \"operation\":\"OR\",\n \"predicates\":[\n {\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":50.0,\n \"dynamicValue\":null\n },\n \"operation\":\"LESS_OR_EQUAL\"\n },\n {\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":30.0,\n \"dynamicValue\":null\n },\n \"operation\":\"GREATER\"\n }\n ]\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"WARNING\":{\n \"schedule\":{\n \"type\":\"CUSTOM\",\n \"items\":[\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":1\n },\n {\n \"endsOn\":64800000,\n \"enabled\":true,\n \"startsOn\":43200000,\n \"dayOfWeek\":2\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":3\n },\n {\n \"endsOn\":57600000,\n \"enabled\":true,\n \"startsOn\":36000000,\n \"dayOfWeek\":4\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":5\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":6\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":7\n }\n ],\n \"timezone\":\"Europe/Kiev\"\n },\n \"condition\":{\n \"spec\":{\n \"type\":\"REPEATING\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":5,\n \"dynamicValue\":null\n }\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"tempConstant\",\n \"type\":\"CONSTANT\"\n },\n \"value\":30,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":0.0,\n \"dynamicValue\":{\n \"inherit\":false,\n \"sourceType\":\"CURRENT_DEVICE\",\n \"sourceAttribute\":\"tempThreshold\"\n }\n },\n \"operation\":\"EQUAL\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"CRITICAL\":{\n \"schedule\":null,\n \"condition\":{\n \"spec\":{\n \"type\":\"SIMPLE\"\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":50.0,\n \"dynamicValue\":null\n },\n \"operation\":\"GREATER\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n }\n },\n \"propagateRelationTypes\":null\n }\n ],\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"ALLOW_CREATE_NEW_DEVICES\",\n \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\"\n },\n \"transportConfiguration\":{\n \"type\":\"MQTT\",\n \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\",\n \"deviceAttributesTopic\":\"v1/devices/me/attributes\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"PROTOBUF\",\n \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\",\n \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\",\n \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\",\n \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\"\n }\n }\n}\n```\n\nLet's review some specific objects examples related to the device profile configuration:\n\n# Alarm Schedule\n\nAlarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, \n\n```json\n\"schedule\": null\n```\n\nmeans alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week:\n\n## Specific Time Schedule\n\n```json\n{\n \"schedule\":{\n \"type\":\"SPECIFIC_TIME\",\n \"endsOn\":64800000,\n \"startsOn\":43200000,\n \"timezone\":\"Europe/Kiev\",\n \"daysOfWeek\":[\n 1,\n 3,\n 5\n ]\n }\n}\n```\n\n## Custom Schedule\n\n```json\n{\n \"schedule\":{\n \"type\":\"CUSTOM\",\n \"items\":[\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":1\n },\n {\n \"endsOn\":64800000,\n \"enabled\":true,\n \"startsOn\":43200000,\n \"dayOfWeek\":2\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":3\n },\n {\n \"endsOn\":57600000,\n \"enabled\":true,\n \"startsOn\":36000000,\n \"dayOfWeek\":4\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":5\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":6\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":7\n }\n ],\n \"timezone\":\"Europe/Kiev\"\n }\n}\n```\n\n# Alarm condition type (**'spec'**)\n\nAlarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes.\n\nNote, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent).\n\n**'sourceType'** of the **'sourceAttribute'** can be: \n * 'CURRENT_DEVICE';\n * 'CURRENT_CUSTOMER';\n * 'CURRENT_TENANT'.\n\n**'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER).\n\n## Repeating alarm condition\n\n```json\n{\n \"spec\":{\n \"type\":\"REPEATING\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":5,\n \"dynamicValue\":{\n \"inherit\":true,\n \"sourceType\":\"CURRENT_DEVICE\",\n \"sourceAttribute\":\"tempAttr\"\n }\n }\n }\n}\n```\n\n## Duration alarm condition\n\n```json\n{\n \"spec\":{\n \"type\":\"DURATION\",\n \"unit\":\"MINUTES\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":30,\n \"dynamicValue\":null\n }\n }\n}\n```\n\n**'unit'** can be: \n * 'SECONDS';\n * 'MINUTES';\n * 'HOURS';\n * 'DAYS'.\n\n# Key Filters\n\nKey filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object:\n\n## Alarm Filter Key\n\nFilter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported:\n * 'ATTRIBUTE' - used for attributes values;\n * 'TIME_SERIES' - used for time series values;\n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type;\n * 'CONSTANT' - constant value specified.\n\nLet's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value < 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value < 10 or value > 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\nYou may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below:\n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"inherit\": false,\n \"sourceType\": \"CURRENT_TENANT\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nNote that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true.\n\n# Provision Configuration\n\nThere are 3 types of device provision configuration for the device profile: \n * 'DISABLED';\n * 'ALLOW_CREATE_NEW_DEVICES';\n * 'CHECK_PRE_PROVISIONED_DEVICES'.\n\nPlease refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details.\n\n# Transport Configuration\n\n5 transport configuration types are available:\n * 'DEFAULT';\n * 'MQTT';\n * 'LWM2M';\n * 'COAP';\n * 'SNMP'.\n\nDefault type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types.\n\nSee another example of COAP transport configuration below:\n\n```json\n{\n \"type\":\"COAP\",\n \"clientSettings\":{\n \"edrxCycle\":null,\n \"powerMode\":\"DRX\",\n \"psmActivityTimer\":null,\n \"pagingTransmissionWindow\":null\n },\n \"coapDeviceTypeConfiguration\":{\n \"coapDeviceType\":\"DEFAULT\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"JSON\"\n }\n }\n}\n```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveDeviceProfile", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceProfile" - } + "summary": "Get Device Credentials (getDeviceCredentialsByDeviceId)", + "description": "If during device creation there wasn't specified any credentials, platform generates random 'ACCESS_TOKEN' credentials.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceCredentialsByDeviceId", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfile" + "$ref": "#/components/schemas/DeviceCredentials" } } } @@ -26814,7 +26622,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -26918,22 +26726,25 @@ ] } }, - "/api/deviceProfile/devices/keys/attributes": { + "/api/devices": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get attribute keys (getAttributesKeys)", - "description": "Get a set of unique attribute keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAttributesKeys", + "summary": "Get Devices By Ids (getDevicesByIds)", + "description": "Requested devices must be owned by tenant or assigned to customer which user is performing the request. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDevicesByIds", "parameters": [ { - "name": "deviceProfileId", + "name": "deviceIds", "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, + "description": "A list of devices ids, separated by comma ','", + "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -26945,7 +26756,7 @@ "schema": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/Device" } } } @@ -27065,22 +26876,181 @@ "ApiKeyForm": [] } ] + }, + "post": { + "tags": [ + "device-controller" + ], + "summary": "Find related devices (findDevicesByQuery)", + "description": "Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findDevicesByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceSearchQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid request body", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/deviceProfile/devices/keys/timeseries": { + "/api/devices/count/{otaPackageType}/{deviceProfileId}": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get time series keys (getDeviceProfileTimeseriesKeys)", - "description": "Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getDeviceProfileTimeseriesKeys", + "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", + "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "countByDeviceProfileAndEmptyOtaPackage", "parameters": [ + { + "name": "otaPackageType", + "in": "path", + "description": "OTA package type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] + } + }, { "name": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, + "in": "path", + "description": "Device Profile Id. I.g. '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } @@ -27092,10 +27062,8 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "integer", + "format": "int64" } } } @@ -27216,23 +27184,31 @@ ] } }, - "/api/deviceProfile/names": { - "get": { + "/api/edge/{edgeId}/device/{deviceId}": { + "post": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get Device Profile names (getDeviceProfileNames)", - "description": "Returns a set of unique device profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceProfileNames", + "summary": "Assign device to edge (assignDeviceToEdge)", + "description": "Creates assignment of an existing device to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment device (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once device will be delivered to edge service, it's going to be available for usage on remote edge instance.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignDeviceToEdge", "parameters": [ { - "name": "activeOnly", - "in": "query", - "description": "Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices.", - "required": false, + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "boolean", - "default": false + "type": "string" + } + }, + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } } ], @@ -27242,10 +27218,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityInfo" - } + "$ref": "#/components/schemas/Device" } } } @@ -27262,7 +27235,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -27364,33 +27337,31 @@ "ApiKeyForm": [] } ] - } - }, - "/api/deviceProfile/{deviceProfileId}": { - "get": { + }, + "delete": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get Device Profile (getDeviceProfileById)", - "description": "Fetch the Device Profile object based on the provided Device Profile Id. The server checks that the device profile is owned by the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getDeviceProfileById", + "summary": "Unassign device from edge (unassignDeviceFromEdge)", + "description": "Clears assignment of the device to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove device (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove device locally.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unassignDeviceFromEdge", "parameters": [ { - "name": "deviceProfileId", + "name": "edgeId", "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "inlineImages", - "in": "query", - "description": "Inline images as a data URL (Base64)", - "required": false, + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "boolean" + "type": "string" } } ], @@ -27400,7 +27371,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfile" + "$ref": "#/components/schemas/Device" } } } @@ -27519,161 +27490,129 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/edge/{edgeId}/devices": { + "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Delete device profile (deleteDeviceProfile)", - "description": "Deletes the device profile. Referencing non-existing device profile Id will cause an error. Can't delete the device profile if it is referenced by existing devices.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteDeviceProfile", + "summary": "Get devices assigned to edge (getEdgeDevices)", + "description": "Returns a page of devices assigned to edge. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeDevices", "parameters": [ { - "name": "deviceProfileId", + "name": "edgeId", "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "OK" }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "type", + "in": "query", + "description": "Device type as the name of the device profile", + "required": false, + "schema": { + "type": "string" } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "deviceProfileId", + "in": "query", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" } }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "active", + "in": "query", + "description": "A boolean value representing the device active flag.", + "required": false, + "schema": { + "type": "boolean" } - } - }, - "security": [ + }, { - "HttpLoginForm": [] + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, + "schema": { + "type": "string" + } }, { - "ApiKeyForm": [] - } - ] - } - }, - "/api/deviceProfile/{deviceProfileId}/default": { - "post": { - "tags": [ - "device-profile-controller" - ], - "summary": "Make Device Profile Default (setDefaultDeviceProfile)", - "description": "Marks device profile as default within a tenant scope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setDefaultDeviceProfile", - "parameters": [ + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, { - "name": "deviceProfileId", - "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "Timestamp. Devices with creation time before it won't be queried", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Devices with creation time after it won't be queried", + "required": false, + "schema": { + "type": "integer", + "format": "int64" } } ], @@ -27683,7 +27622,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfile" + "$ref": "#/components/schemas/PageDataDeviceInfo" } } } @@ -27700,7 +27639,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -27804,21 +27743,32 @@ ] } }, - "/api/deviceProfileInfo/default": { + "/api/tenant/device": { "get": { "tags": [ - "device-profile-controller" + "device-controller" + ], + "summary": "Get Tenant Device (getTenantDeviceByName)", + "description": "Requested device must be owned by tenant that the user belongs to. Device name is an unique property of device. So it can be used to identify the device.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantDeviceByName", + "parameters": [ + { + "name": "deviceName", + "in": "query", + "description": "A string value representing the Device name.", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Get Default Device Profile (getDefaultDeviceProfileInfo)", - "description": "Fetch the Default Device Profile Info object. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDefaultDeviceProfileInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfileInfo" + "$ref": "#/components/schemas/Device" } } } @@ -27939,23 +27889,99 @@ ] } }, - "/api/deviceProfileInfo/{deviceProfileId}": { + "/api/tenant/deviceInfos": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get Device Profile Info (getDeviceProfileInfoById)", - "description": "Fetch the Device Profile Info object based on the provided Device Profile Id. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceProfileInfoById", + "summary": "Get Tenant Device Infos (getTenantDeviceInfos)", + "description": "Returns a page of devices info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantDeviceInfos", "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "Device type as the name of the device profile", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "deviceProfileId", - "in": "path", + "in": "query", "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "required": false, "schema": { "type": "string" } + }, + { + "name": "active", + "in": "query", + "description": "A boolean value representing the device active flag.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -27964,7 +27990,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfileInfo" + "$ref": "#/components/schemas/PageDataDeviceInfo" } } } @@ -28085,14 +28111,14 @@ ] } }, - "/api/deviceProfileInfos": { + "/api/tenant/devices": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get Device Profiles for transport type (getDeviceProfileInfos)", - "description": "Returns a page of devices profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceProfileInfos", + "summary": "Get Tenant Devices (getTenantDevices)", + "description": "Returns a page of devices owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantDevices", "parameters": [ { "name": "pageSize", @@ -28114,10 +28140,19 @@ "format": "int32" } }, + { + "name": "type", + "in": "query", + "description": "Device type as the name of the device profile", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the device profile name.", + "description": "The case insensitive 'substring' filter based on the device name.", "required": false, "schema": { "type": "string" @@ -28133,10 +28168,9 @@ "enum": [ "createdTime", "name", - "type", - "transportType", - "description", - "isDefault" + "deviceProfileName", + "label", + "customerTitle" ] } }, @@ -28152,22 +28186,6 @@ "DESC" ] } - }, - { - "name": "transportType", - "in": "query", - "description": "Type of the transport", - "required": false, - "schema": { - "type": "string", - "enum": [ - "DEFAULT", - "MQTT", - "COAP", - "LWM2M", - "SNMP" - ] - } } ], "responses": { @@ -28176,7 +28194,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceProfileInfo" + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -28297,25 +28315,31 @@ ] } }, - "/api/deviceProfileInfos/list": { - "get": { + "/api/tenant/{tenantId}/device/{deviceId}": { + "post": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get Device Profile Infos By Ids (getDeviceProfileInfosByIds)", - "description": "Requested device profiles must be owned by tenant which is performing the request. \n\n", - "operationId": "getDeviceProfileInfosByIds", + "summary": "Assign device to tenant (assignDeviceToTenant)", + "description": "Creates assignment of the device to tenant. Thereafter tenant will be able to reassign the device to a customer.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignDeviceToTenant", "parameters": [ { - "name": "deviceProfileIds", - "in": "query", - "description": "A list of device profile ids, separated by comma ','", + "name": "tenantId", + "in": "path", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" + } + }, + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } } ], @@ -28325,10 +28349,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceProfileInfo" - } + "$ref": "#/components/schemas/Device" } } } @@ -28345,7 +28366,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -28449,82 +28470,31 @@ ] } }, - "/api/deviceProfiles": { - "get": { + "/api/deviceProfile": { + "post": { "tags": [ "device-profile-controller" ], - "summary": "Get Device Profiles (getDeviceProfiles)", - "description": "Returns a page of devices profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getDeviceProfiles", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device profile name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "transportType", - "description", - "isDefault" - ] + "summary": "Create Or Update Device Profile (saveDeviceProfile)", + "description": "Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. \n\nDevice profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant.\n\n# Device profile data definition\n\nDevice profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. \n\n```json\n{\n \"alarms\":[\n ],\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"DISABLED\",\n \"provisionDeviceSecret\":null\n },\n \"transportConfiguration\":{\n \"type\":\"DEFAULT\"\n }\n}\n```\n\n```json\n{\n \"alarms\":[\n {\n \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\",\n \"alarmType\":\"Temperature Alarm\",\n \"clearRule\":{\n \"schedule\":null,\n \"condition\":{\n \"spec\":{\n \"type\":\"SIMPLE\"\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":30.0,\n \"dynamicValue\":null\n },\n \"operation\":\"LESS\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"propagate\":false,\n \"createRules\":{\n \"MAJOR\":{\n \"schedule\":{\n \"type\":\"SPECIFIC_TIME\",\n \"endsOn\":64800000,\n \"startsOn\":43200000,\n \"timezone\":\"Europe/Kiev\",\n \"daysOfWeek\":[\n 1,\n 3,\n 5\n ]\n },\n \"condition\":{\n \"spec\":{\n \"type\":\"DURATION\",\n \"unit\":\"MINUTES\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":30,\n \"dynamicValue\":null\n }\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"COMPLEX\",\n \"operation\":\"OR\",\n \"predicates\":[\n {\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":50.0,\n \"dynamicValue\":null\n },\n \"operation\":\"LESS_OR_EQUAL\"\n },\n {\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":30.0,\n \"dynamicValue\":null\n },\n \"operation\":\"GREATER\"\n }\n ]\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"WARNING\":{\n \"schedule\":{\n \"type\":\"CUSTOM\",\n \"items\":[\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":1\n },\n {\n \"endsOn\":64800000,\n \"enabled\":true,\n \"startsOn\":43200000,\n \"dayOfWeek\":2\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":3\n },\n {\n \"endsOn\":57600000,\n \"enabled\":true,\n \"startsOn\":36000000,\n \"dayOfWeek\":4\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":5\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":6\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":7\n }\n ],\n \"timezone\":\"Europe/Kiev\"\n },\n \"condition\":{\n \"spec\":{\n \"type\":\"REPEATING\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":5,\n \"dynamicValue\":null\n }\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"tempConstant\",\n \"type\":\"CONSTANT\"\n },\n \"value\":30,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":0.0,\n \"dynamicValue\":{\n \"inherit\":false,\n \"sourceType\":\"CURRENT_DEVICE\",\n \"sourceAttribute\":\"tempThreshold\"\n }\n },\n \"operation\":\"EQUAL\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"CRITICAL\":{\n \"schedule\":null,\n \"condition\":{\n \"spec\":{\n \"type\":\"SIMPLE\"\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":50.0,\n \"dynamicValue\":null\n },\n \"operation\":\"GREATER\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n }\n },\n \"propagateRelationTypes\":null\n }\n ],\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"ALLOW_CREATE_NEW_DEVICES\",\n \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\"\n },\n \"transportConfiguration\":{\n \"type\":\"MQTT\",\n \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\",\n \"deviceAttributesTopic\":\"v1/devices/me/attributes\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"PROTOBUF\",\n \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\",\n \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\",\n \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\",\n \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\"\n }\n }\n}\n```\n\nLet's review some specific objects examples related to the device profile configuration:\n\n# Alarm Schedule\n\nAlarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, \n\n```json\n\"schedule\": null\n```\n\nmeans alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week:\n\n## Specific Time Schedule\n\n```json\n{\n \"schedule\":{\n \"type\":\"SPECIFIC_TIME\",\n \"endsOn\":64800000,\n \"startsOn\":43200000,\n \"timezone\":\"Europe/Kiev\",\n \"daysOfWeek\":[\n 1,\n 3,\n 5\n ]\n }\n}\n```\n\n## Custom Schedule\n\n```json\n{\n \"schedule\":{\n \"type\":\"CUSTOM\",\n \"items\":[\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":1\n },\n {\n \"endsOn\":64800000,\n \"enabled\":true,\n \"startsOn\":43200000,\n \"dayOfWeek\":2\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":3\n },\n {\n \"endsOn\":57600000,\n \"enabled\":true,\n \"startsOn\":36000000,\n \"dayOfWeek\":4\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":5\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":6\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":7\n }\n ],\n \"timezone\":\"Europe/Kiev\"\n }\n}\n```\n\n# Alarm condition type (**'spec'**)\n\nAlarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes.\n\nNote, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent).\n\n**'sourceType'** of the **'sourceAttribute'** can be: \n * 'CURRENT_DEVICE';\n * 'CURRENT_CUSTOMER';\n * 'CURRENT_TENANT'.\n\n**'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER).\n\n## Repeating alarm condition\n\n```json\n{\n \"spec\":{\n \"type\":\"REPEATING\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":5,\n \"dynamicValue\":{\n \"inherit\":true,\n \"sourceType\":\"CURRENT_DEVICE\",\n \"sourceAttribute\":\"tempAttr\"\n }\n }\n }\n}\n```\n\n## Duration alarm condition\n\n```json\n{\n \"spec\":{\n \"type\":\"DURATION\",\n \"unit\":\"MINUTES\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":30,\n \"dynamicValue\":null\n }\n }\n}\n```\n\n**'unit'** can be: \n * 'SECONDS';\n * 'MINUTES';\n * 'HOURS';\n * 'DAYS'.\n\n# Key Filters\n\nKey filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object:\n\n## Alarm Filter Key\n\nFilter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported:\n * 'ATTRIBUTE' - used for attributes values;\n * 'TIME_SERIES' - used for time series values;\n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type;\n * 'CONSTANT' - constant value specified.\n\nLet's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value \u003C 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value \u003C 10 or value \u003E 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value \u003C 10 or (value \u003E 50 && value \u003C 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\nYou may also want to replace hardcoded values (for example, temperature \u003E 20) with the more dynamic expression (for example, temperature \u003E value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below:\n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"inherit\": false,\n \"sourceType\": \"CURRENT_TENANT\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nNote that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true.\n\n# Provision Configuration\n\nThere are 3 types of device provision configuration for the device profile: \n * 'DISABLED';\n * 'ALLOW_CREATE_NEW_DEVICES';\n * 'CHECK_PRE_PROVISIONED_DEVICES'.\n\nPlease refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details.\n\n# Transport Configuration\n\n5 transport configuration types are available:\n * 'DEFAULT';\n * 'MQTT';\n * 'LWM2M';\n * 'COAP';\n * 'SNMP'.\n\nDefault type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types.\n\nSee another example of COAP transport configuration below:\n\n```json\n{\n \"type\":\"COAP\",\n \"clientSettings\":{\n \"edrxCycle\":null,\n \"powerMode\":\"DRX\",\n \"psmActivityTimer\":null,\n \"pagingTransmissionWindow\":null\n },\n \"coapDeviceTypeConfiguration\":{\n \"coapDeviceType\":\"DEFAULT\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"JSON\"\n }\n }\n}\n```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveDeviceProfile", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceProfile" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceProfile" + "$ref": "#/components/schemas/DeviceProfile" } } } @@ -28541,7 +28511,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -28645,45 +28615,35 @@ ] } }, - "/api/domain": { - "post": { + "/api/deviceProfile/devices/keys/attributes": { + "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Save or Update Domain (saveDomain)", - "description": "Create or update the Domain. When creating domain, platform generates Domain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Domain Id will be present in the response. Specify existing Domain Id to update the domain. Referencing non-existing Domain Id will cause 'Not Found' error.\n\nDomain name is unique for entire platform setup.\n\n\n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "saveDomain", + "summary": "Get attribute keys (getAttributesKeys)", + "description": "Get a set of unique attribute keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAttributesKeys", "parameters": [ { - "name": "oauth2ClientIds", + "name": "deviceProfileId", "in": "query", - "description": "A list of oauth2 client registration ids, separated by comma ','", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Domain" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Domain" + "type": "array", + "items": { + "type": "string" + } } } } @@ -28700,7 +28660,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -28804,22 +28764,22 @@ ] } }, - "/api/domain/info/{id}": { + "/api/deviceProfile/devices/keys/timeseries": { "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Get Domain info by Id (getDomainInfoById)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "getDomainInfoById", + "summary": "Get time series keys (getDeviceProfileTimeseriesKeys)", + "description": "Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getDeviceProfileTimeseriesKeys", "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "deviceProfileId", + "in": "query", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], @@ -28829,7 +28789,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DomainInfo" + "type": "array", + "items": { + "type": "string" + } } } } @@ -28950,60 +28913,23 @@ ] } }, - "/api/domain/infos": { + "/api/deviceProfile/names": { "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Get Domain infos (getTenantDomainInfos)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "getTenantDomainInfos", + "summary": "Get Device Profile names (getDeviceProfileNames)", + "description": "Returns a set of unique device profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileNames", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on domain's name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", + "name": "activeOnly", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices.", "required": false, "schema": { - "type": "string" + "type": "boolean", + "default": false } } ], @@ -29013,7 +28939,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDomainInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityInfo" + } } } } @@ -29134,28 +29063,44 @@ ] } }, - "/api/domain/{id}": { - "delete": { + "/api/deviceProfile/{deviceProfileId}": { + "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Delete Domain by ID (deleteDomain)", - "description": "Deletes Domain by ID. Referencing non-existing domain Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "deleteDomain", + "summary": "Get Device Profile (getDeviceProfileById)", + "description": "Fetch the Device Profile object based on the provided Device Profile Id. The server checks that the device profile is owned by the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getDeviceProfileById", "parameters": [ { - "name": "id", + "name": "deviceProfileId", "in": "path", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" + } + }, + { + "name": "inlineImages", + "in": "query", + "description": "Inline images as a data URL (Base64)", + "required": false, + "schema": { + "type": "boolean" } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceProfile" + } + } + } }, "400": { "description": "Bad Request", @@ -29271,41 +29216,25 @@ "ApiKeyForm": [] } ] - } - }, - "/api/domain/{id}/oauth2Clients": { - "put": { + }, + "delete": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Update oauth2 clients (updateDomainOauth2Clients)", - "description": "Update oauth2 clients for the specified domain. ", - "operationId": "updateDomainOauth2Clients", + "summary": "Delete device profile (deleteDeviceProfile)", + "description": "Deletes the device profile. Referencing non-existing device profile Id will cause an error. Can't delete the device profile if it is referenced by existing devices.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteDeviceProfile", "parameters": [ { - "name": "id", + "name": "deviceProfileId", "in": "path", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK" @@ -29426,19 +29355,19 @@ ] } }, - "/api/customer/edge/{edgeId}": { - "delete": { + "/api/deviceProfile/{deviceProfileId}/default": { + "post": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Unassign edge from customer (unassignEdgeFromCustomer)", - "description": "Clears assignment of the edge to customer. Customer will not be able to query edge afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "unassignEdgeFromCustomer", + "summary": "Make Device Profile Default (setDefaultDeviceProfile)", + "description": "Marks device profile as default within a tenant scope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setDefaultDeviceProfile", "parameters": [ { - "name": "edgeId", + "name": "deviceProfileId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -29451,7 +29380,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/DeviceProfile" } } } @@ -29468,7 +29397,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -29572,32 +29501,21 @@ ] } }, - "/api/customer/public/edge/{edgeId}": { - "post": { + "/api/deviceProfileInfo/default": { + "get": { "tags": [ - "edge-controller" - ], - "summary": "Make edge publicly available (assignEdgeToPublicCustomer)", - "description": "Edge will be available for non-authorized (not logged-in) users. This is useful to create dashboards that you plan to share/embed on a publicly available website. However, users that are logged-in and belong to different tenant will not be able to access the edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignEdgeToPublicCustomer", - "parameters": [ - { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "device-profile-controller" ], + "summary": "Get Default Device Profile (getDefaultDeviceProfileInfo)", + "description": "Fetch the Default Device Profile Info object. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDefaultDeviceProfileInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/DeviceProfileInfo" } } } @@ -29614,7 +29532,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -29718,28 +29636,19 @@ ] } }, - "/api/customer/{customerId}/edge/{edgeId}": { - "post": { + "/api/deviceProfileInfo/{deviceProfileId}": { + "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Assign edge to customer (assignEdgeToCustomer)", - "description": "Creates assignment of the edge to customer. Customer will be able to query edge afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignEdgeToCustomer", + "summary": "Get Device Profile Info (getDeviceProfileInfoById)", + "description": "Fetch the Device Profile Info object based on the provided Device Profile Id. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileInfoById", "parameters": [ { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "edgeId", + "name": "deviceProfileId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -29752,7 +29661,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/DeviceProfileInfo" } } } @@ -29769,7 +29678,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -29873,24 +29782,15 @@ ] } }, - "/api/customer/{customerId}/edgeInfos": { + "/api/deviceProfileInfos": { "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Get Customer Edge Infos (getCustomerEdgeInfos)", - "description": "Returns a page of edges info objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Edge Info is an extension of the default Edge object that contains information about the assigned customer name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerEdgeInfos", + "summary": "Get Device Profiles for transport type (getDeviceProfileInfos)", + "description": "Returns a page of devices profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileInfos", "parameters": [ - { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pageSize", "in": "query", @@ -29911,19 +29811,10 @@ "format": "int32" } }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", + "description": "The case insensitive 'substring' filter based on the device profile name.", "required": false, "schema": { "type": "string" @@ -29940,8 +29831,9 @@ "createdTime", "name", "type", - "label", - "customerTitle" + "transportType", + "description", + "isDefault" ] } }, @@ -29957,6 +29849,22 @@ "DESC" ] } + }, + { + "name": "transportType", + "in": "query", + "description": "Type of the transport", + "required": false, + "schema": { + "type": "string", + "enum": [ + "DEFAULT", + "MQTT", + "COAP", + "LWM2M", + "SNMP" + ] + } } ], "responses": { @@ -29965,7 +29873,159 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdgeInfo" + "$ref": "#/components/schemas/PageDataDeviceProfileInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/deviceProfileInfos/list": { + "get": { + "tags": [ + "device-profile-controller" + ], + "summary": "Get Device Profile Infos By Ids (getDeviceProfileInfosByIds)", + "description": "Requested device profiles must be owned by tenant which is performing the request. \n\n", + "operationId": "getDeviceProfileInfosByIds", + "parameters": [ + { + "name": "deviceProfileIds", + "in": "query", + "description": "A list of device profile ids, separated by comma ','", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceProfileInfo" + } } } } @@ -30086,24 +30146,15 @@ ] } }, - "/api/customer/{customerId}/edges": { + "/api/deviceProfiles": { "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Get Customer Edges (getCustomerEdges)", - "description": "Returns a page of edges objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerEdges", + "summary": "Get Device Profiles (getDeviceProfiles)", + "description": "Returns a page of devices profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getDeviceProfiles", "parameters": [ - { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pageSize", "in": "query", @@ -30124,19 +30175,10 @@ "format": "int32" } }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", + "description": "The case insensitive 'substring' filter based on the device profile name.", "required": false, "schema": { "type": "string" @@ -30153,8 +30195,9 @@ "createdTime", "name", "type", - "label", - "customerTitle" + "transportType", + "description", + "isDefault" ] } }, @@ -30178,7 +30221,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "$ref": "#/components/schemas/PageDataDeviceProfile" } } } @@ -30299,19 +30342,33 @@ ] } }, - "/api/edge": { + "/api/domain": { "post": { "tags": [ - "edge-controller" + "domain-controller" + ], + "summary": "Save or Update Domain (saveDomain)", + "description": "Create or update the Domain. When creating domain, platform generates Domain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Domain Id will be present in the response. Specify existing Domain Id to update the domain. Referencing non-existing Domain Id will cause 'Not Found' error.\n\nDomain name is unique for entire platform setup.\n\n\n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "saveDomain", + "parameters": [ + { + "name": "oauth2ClientIds", + "in": "query", + "description": "A list of oauth2 client registration ids, separated by comma ','", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } ], - "summary": "Create Or Update Edge (saveEdge)", - "description": "Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error.\n\nEdge name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the edge names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Edge entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveEdge", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/Domain" } } }, @@ -30323,7 +30380,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/Domain" } } } @@ -30444,31 +30501,32 @@ ] } }, - "/api/edge/bulk_import": { - "post": { + "/api/domain/info/{id}": { + "get": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Import the bulk of edges (processEdgesBulkImport)", - "description": "There's an ability to import the bulk of edges using the only .csv file.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "processEdgesBulkImport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkImportRequest" - } + "summary": "Get Domain info by Id (getDomainInfoById)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getDomainInfoById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkImportResultEdge" + "$ref": "#/components/schemas/DomainInfo" } } } @@ -30485,7 +30543,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -30589,20 +30647,58 @@ ] } }, - "/api/edge/info/{edgeId}": { + "/api/domain/infos": { "get": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Get Edge Info (getEdgeInfoById)", - "description": "Get the Edge Info object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeInfoById", + "summary": "Get Domain infos (getTenantDomainInfos)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getTenantDomainInfos", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on domain's name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, "schema": { "type": "string" } @@ -30614,7 +30710,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdgeInfo" + "$ref": "#/components/schemas/PageDataDomainInfo" } } } @@ -30735,49 +30831,28 @@ ] } }, - "/api/edge/instructions/install/{edgeId}/{method}": { - "get": { + "/api/domain/{id}": { + "delete": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Get Edge Install Instructions (getEdgeInstallInstructions)", - "description": "Get an install instructions for provided edge id.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEdgeInstallInstructions", + "summary": "Delete Domain by ID (deleteDomain)", + "description": "Deletes Domain by ID. Referencing non-existing domain Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "deleteDomain", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "method", + "name": "id", "in": "path", - "description": "Installation method ('docker', 'ubuntu' or 'centos')", "required": true, "schema": { "type": "string", - "enum": [ - "docker", - "ubuntu", - "centos" - ] + "format": "uuid" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EdgeInstructions" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -30895,50 +30970,43 @@ ] } }, - "/api/edge/instructions/upgrade/{edgeVersion}/{method}": { - "get": { + "/api/domain/{id}/oauth2Clients": { + "put": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Get Edge Upgrade Instructions (getEdgeUpgradeInstructions)", - "description": "Get an upgrade instructions for provided edge version.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEdgeUpgradeInstructions", + "summary": "Update oauth2 clients (updateDomainOauth2Clients)", + "description": "Update oauth2 clients for the specified domain. ", + "operationId": "updateDomainOauth2Clients", "parameters": [ { - "name": "edgeVersion", - "in": "path", - "description": "Edge version", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "method", + "name": "id", "in": "path", - "description": "Upgrade method ('docker', 'ubuntu' or 'centos')", "required": true, "schema": { "type": "string", - "enum": [ - "docker", - "ubuntu", - "centos" - ] + "format": "uuid" } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EdgeInstructions" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" } } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -31055,14 +31123,14 @@ ] } }, - "/api/edge/missingToRelatedRuleChains/{edgeId}": { - "get": { + "/api/customer/edge/{edgeId}": { + "delete": { "tags": [ "edge-controller" ], - "summary": "Find missing rule chains (findMissingToRelatedRuleChains)", - "description": "Returns list of rule chains ids that are not assigned to particular edge, but these rule chains are present in the already assigned rule chains to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "findMissingToRelatedRuleChains", + "summary": "Unassign edge from customer (unassignEdgeFromCustomer)", + "description": "Clears assignment of the edge to customer. Customer will not be able to query edge afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unassignEdgeFromCustomer", "parameters": [ { "name": "edgeId", @@ -31080,7 +31148,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Edge" } } } @@ -31201,14 +31269,14 @@ ] } }, - "/api/edge/sync/{edgeId}": { + "/api/customer/public/edge/{edgeId}": { "post": { "tags": [ "edge-controller" ], - "summary": "Sync edge (syncEdge)", - "description": "Starts synchronization process between edge and cloud. \nAll entities that are assigned to particular edge are going to be send to remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "syncEdge", + "summary": "Make edge publicly available (assignEdgeToPublicCustomer)", + "description": "Edge will be available for non-authorized (not logged-in) users. This is useful to create dashboards that you plan to share/embed on a publicly available website. However, users that are logged-in and belong to different tenant will not be able to access the edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignEdgeToPublicCustomer", "parameters": [ { "name": "edgeId", @@ -31226,7 +31294,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Edge" } } } @@ -31347,24 +31415,41 @@ ] } }, - "/api/edge/types": { - "get": { + "/api/customer/{customerId}/edge/{edgeId}": { + "post": { "tags": [ "edge-controller" ], - "summary": "Get Edge Types (getEdgeTypes)", - "description": "Returns a set of unique edge types based on edges that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeTypes", + "summary": "Assign edge to customer (assignEdgeToCustomer)", + "description": "Creates assignment of the edge to customer. Customer will be able to query edge afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignEdgeToCustomer", + "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitySubtype" - } + "$ref": "#/components/schemas/Edge" } } } @@ -31381,7 +31466,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -31485,23 +31570,90 @@ ] } }, - "/api/edge/{edgeId}": { + "/api/customer/{customerId}/edgeInfos": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Edge (getEdgeById)", - "description": "Get the Edge object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeById", + "summary": "Get Customer Edge Infos (getCustomerEdgeInfos)", + "description": "Returns a page of edges info objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Edge Info is an extension of the default Edge object that contains information about the assigned customer name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerEdgeInfos", "parameters": [ { - "name": "edgeId", + "name": "customerId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -31510,7 +31662,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/PageDataEdgeInfo" } } } @@ -31629,28 +31781,104 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/customer/{customerId}/edges": { + "get": { "tags": [ "edge-controller" ], - "summary": "Delete edge (deleteEdge)", - "description": "Deletes the edge. Referencing non-existing edge Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteEdge", + "summary": "Get Customer Edges (getCustomerEdges)", + "description": "Returns a page of edges objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerEdges", "parameters": [ { - "name": "edgeId", + "name": "customerId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEdge" + } + } + } }, "400": { "description": "Bad Request", @@ -31768,32 +31996,31 @@ ] } }, - "/api/edge/{edgeId}/upgrade/available": { - "get": { + "/api/edge": { + "post": { "tags": [ "edge-controller" ], - "summary": "Is edge upgrade enabled (isEdgeUpgradeAvailable)", - "description": "Returns 'true' if upgrade available for connected edge, 'false' - otherwise.", - "operationId": "isEdgeUpgradeAvailable", - "parameters": [ - { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Create Or Update Edge (saveEdge)", + "description": "Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error.\n\nEdge name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the edge names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Edge entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveEdge", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Edge" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/Edge" } } } @@ -31810,7 +32037,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -31914,41 +32141,31 @@ ] } }, - "/api/edge/{edgeId}/{ruleChainId}/root": { + "/api/edge/bulk_import": { "post": { "tags": [ "edge-controller" ], - "summary": "Set root rule chain for provided edge (setEdgeRootRuleChain)", - "description": "Change root rule chain of the edge to the new provided rule chain. \nThis operation will send a notification to update root rule chain on remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setEdgeRootRuleChain", - "parameters": [ - { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Import the bulk of edges (processEdgesBulkImport)", + "description": "There's an ability to import the bulk of edges using the only .csv file.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "processEdgesBulkImport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkImportRequest" + } } }, - { - "name": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/BulkImportResultEdge" } } } @@ -32069,72 +32286,23 @@ ] } }, - "/api/edges": { + "/api/edge/info/{edgeId}": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edges (getEdges)", - "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEdges", + "summary": "Get Edge Info (getEdgeInfoById)", + "description": "Get the Edge Info object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeInfoById", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -32143,7 +32311,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "$ref": "#/components/schemas/EdgeInfo" } } } @@ -32262,34 +32430,48 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/edge/instructions/install/{edgeId}/{method}": { + "get": { "tags": [ "edge-controller" ], - "summary": "Find related edges (findEdgesByQuery)", - "description": "Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findEdgesByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EdgeSearchQuery" - } + "summary": "Get Edge Install Instructions (getEdgeInstallInstructions)", + "description": "Get an install instructions for provided edge id.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEdgeInstallInstructions", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "method", + "in": "path", + "description": "Installation method ('docker', 'ubuntu' or 'centos')", + "required": true, + "schema": { + "type": "string", + "enum": [ + "docker", + "ubuntu", + "centos" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Edge" - } + "$ref": "#/components/schemas/EdgeInstructions" } } } @@ -32306,7 +32488,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -32410,21 +32592,46 @@ ] } }, - "/api/edges/enabled": { + "/api/edge/instructions/upgrade/{edgeVersion}/{method}": { "get": { "tags": [ "edge-controller" ], - "summary": "Is edges support enabled (isEdgesSupportEnabled)", - "description": "Returns 'true' if edges support enabled on server, 'false' - otherwise.", - "operationId": "isEdgesSupportEnabled", + "summary": "Get Edge Upgrade Instructions (getEdgeUpgradeInstructions)", + "description": "Get an upgrade instructions for provided edge version.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEdgeUpgradeInstructions", + "parameters": [ + { + "name": "edgeVersion", + "in": "path", + "description": "Edge version", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "method", + "in": "path", + "description": "Upgrade method ('docker', 'ubuntu' or 'centos')", + "required": true, + "schema": { + "type": "string", + "enum": [ + "docker", + "ubuntu", + "centos" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/EdgeInstructions" } } } @@ -32545,25 +32752,22 @@ ] } }, - "/api/edges/list": { + "/api/edge/missingToRelatedRuleChains/{edgeId}": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Edges By Ids (getEdgeList)", - "description": "Requested edges must be owned by tenant or assigned to customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeList", + "summary": "Find missing rule chains (findMissingToRelatedRuleChains)", + "description": "Returns list of rule chains ids that are not assigned to particular edge, but these rule chains are present in the already assigned rule chains to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "findMissingToRelatedRuleChains", "parameters": [ { - "name": "edgeIds", - "in": "query", - "description": "A list of edges ids, separated by comma ','", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -32573,10 +32777,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Edge" - } + "type": "string" } } } @@ -32697,19 +32898,19 @@ ] } }, - "/api/tenant/edge": { - "get": { + "/api/edge/sync/{edgeId}": { + "post": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edge by name (getTenantEdgeByName)", - "description": "Requested edge must be owned by tenant or customer that the user belongs to. Edge name is an unique property of edge. So it can be used to identify the edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEdgeByName", + "summary": "Sync edge (syncEdge)", + "description": "Starts synchronization process between edge and cloud. \nAll entities that are assigned to particular edge are going to be send to remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "syncEdge", "parameters": [ { - "name": "edgeName", - "in": "query", - "description": "Unique name of the edge", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -32722,7 +32923,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "type": "string" } } } @@ -32739,7 +32940,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -32843,90 +33044,24 @@ ] } }, - "/api/tenant/edgeInfos": { + "/api/edge/types": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edge Infos (getTenantEdgeInfos)", - "description": "Returns a page of edges info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Edge Info is an extension of the default Edge object that contains information about the assigned customer name. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEdgeInfos", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "summary": "Get Edge Types (getEdgeTypes)", + "description": "Returns a set of unique edge types based on edges that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdgeInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -33047,81 +33182,23 @@ ] } }, - "/api/tenant/edges": { + "/api/edge/{edgeId}": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edges (getTenantEdges)", - "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEdges", + "summary": "Get Edge (getEdgeById)", + "description": "Get the Edge object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeById", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -33130,7 +33207,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "$ref": "#/components/schemas/Edge" } } } @@ -33249,16 +33326,14 @@ "ApiKeyForm": [] } ] - } - }, - "/api/edge/{edgeId}/events": { - "get": { + }, + "delete": { "tags": [ - "edge-event-controller" + "edge-controller" ], - "summary": "Get Edge Events (getEdgeEvents)", - "description": "Returns a page of edge events for the requested edge. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. ", - "operationId": "getEdgeEvents", + "summary": "Delete edge (deleteEdge)", + "description": "Deletes the edge. Referencing non-existing edge Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteEdge", "parameters": [ { "name": "edgeId", @@ -33268,96 +33343,11 @@ "schema": { "type": "string" } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge event type name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Edge events with creation time before it won't be queried", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Edge events with creation time after it won't be queried", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEdgeEvent" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -33475,24 +33465,32 @@ ] } }, - "/api/entities/vc/branches": { + "/api/edge/{edgeId}/upgrade/available": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" + ], + "summary": "Is edge upgrade enabled (isEdgeUpgradeAvailable)", + "description": "Returns 'true' if upgrade available for connected edge, 'false' - otherwise.", + "operationId": "isEdgeUpgradeAvailable", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "List branches (listBranches)", - "description": "Lists branches available in the remote repository. \n\nResponse example: \n```json\n[\n {\n \"name\": \"master\",\n \"default\": true\n },\n {\n \"name\": \"dev\",\n \"default\": false\n },\n {\n \"name\": \"dev-2\",\n \"default\": false\n }\n]\n```", - "operationId": "listBranches", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BranchInfo" - } + "type": "boolean" } } } @@ -33613,38 +33611,28 @@ ] } }, - "/api/entities/vc/diff/{entityType}/{internalEntityUuid}": { - "get": { + "/api/edge/{edgeId}/{ruleChainId}/root": { + "post": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Compare entity data to version (compareEntityDataToVersion)", - "description": "Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "compareEntityDataToVersion", + "summary": "Set root rule chain for provided edge (setEdgeRootRuleChain)", + "description": "Change root rule chain of the edge to the new provided rule chain. \nThis operation will send a notification to update root rule chain on remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setEdgeRootRuleChain", "parameters": [ { - "name": "entityType", + "name": "edgeId", "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "$ref": "#/components/schemas/EntityType" + "type": "string" } }, { - "name": "internalEntityUuid", + "name": "ruleChainId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "versionId", - "in": "query", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -33657,7 +33645,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityDataDiff" + "$ref": "#/components/schemas/Edge" } } } @@ -33674,7 +33662,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -33778,32 +33766,81 @@ ] } }, - "/api/entities/vc/entity": { - "post": { + "/api/edges": { + "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Load entities version (loadEntitiesVersion)", - "description": "Loads specific version of remote entities (or single entity) by request. Supported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE.\n\nThere are multiple types of request. Each of them requires branch name (`branch`) and version id (`versionId`). Request of type `SINGLE_ENTITY` is needed to restore a concrete version of a specific entity. It contains id of a remote entity (`externalEntityId`) and additional configuration (`config`):\n- `loadRelations` - to update relations list (in case `saveRelations` option was enabled during version creation);\n- `loadAttributes` - to load entity attributes (if `saveAttributes` config option was enabled);\n- `loadCredentials` - to update device credentials (if `saveCredentials` option was enabled during version creation).\n\nAn example of such request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n \n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n \n \"externalEntityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b7944123-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"loadRelations\": false,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n}\n```\n\nAnother request type (`ENTITY_TYPE`) is needed to load specific version of the whole entity types. It contains a structure with entity types to load and configs for each entity type (`entityTypes`). For each specified entity type, the method will load all remote entities of this type that are present at the version. A config for each entity type contains the same options as in `SINGLE_ENTITY` request type, and additionally contains following options:\n- `removeOtherEntities` - to remove local entities that are not present on the remote - basically to overwrite local entity type with the remote one;\n- `findExistingEntityByName` - when you are loading some remote entities that are not yet present at this tenant, try to find existing entity by name and update it rather than create new.\n\nHere is an example of the request to completely restore version of the whole device entity type:\n```json\n{\n \"type\": \"ENTITY_TYPE\",\n\n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n\n \"entityTypes\": {\n \"DEVICE\": {\n \"removeOtherEntities\": true,\n \"findExistingEntityByName\": false,\n \"loadRelations\": true,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n }\n}\n```\n\nThe response will contain generated request UUID that is to be used to check the status of operation via `getVersionLoadRequestStatus`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "loadEntitiesVersion", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionLoadRequest" - } + "summary": "Get Tenant Edges (getEdges)", + "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEdges", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -33820,7 +33857,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -33922,36 +33959,24 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entities/vc/entity/{entityType}/{versionId}": { - "get": { + }, + "post": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "List entities at version (listEntitiesAtVersion)", - "description": "Returns a list of remote entities of a specific entity type that are available at a concrete version. \nEach entity item in the result has `externalId` property. Entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listEntitiesAtVersion", - "parameters": [ - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" + "summary": "Find related edges (findEdgesByQuery)", + "description": "Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findEdgesByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EdgeSearchQuery" + } } }, - { - "name": "versionId", - "in": "path", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", @@ -33960,7 +33985,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/VersionedEntityInfo" + "$ref": "#/components/schemas/Edge" } } } @@ -33978,7 +34003,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -34082,33 +34107,21 @@ ] } }, - "/api/entities/vc/entity/{requestId}/status": { + "/api/edges/enabled": { "get": { "tags": [ - "entities-version-control-controller" - ], - "summary": "Get version load request status (getVersionLoadRequestStatus)", - "description": "Returns the status of previously made version load request. The structure contains following parameters:\n- `done` - if the request was successfully processed;\n- `result` - a list of load results for each entity type:\n - `created` - created entities count;\n - `updated` - updated entities count;\n - `deleted` - removed entities count.\n- `error` - if an error occurred during processing, error info:\n - `type` - error type;\n - `source` - an external id of remote entity;\n - `target` - if failed to find referenced entity by external id - this external id;\n - `message` - error message.\n\nAn example of successfully processed request status:\n```json\n{\n \"done\": true,\n \"result\": [\n {\n \"entityType\": \"DEVICE\",\n \"created\": 10,\n \"updated\": 5,\n \"deleted\": 5\n },\n {\n \"entityType\": \"ASSET\",\n \"created\": 4,\n \"updated\": 0,\n \"deleted\": 8\n }\n ]\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getVersionLoadRequestStatus", - "parameters": [ - { - "name": "requestId", - "in": "path", - "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "edge-controller" ], + "summary": "Is edges support enabled (isEdgesSupportEnabled)", + "description": "Returns 'true' if edges support enabled on server, 'false' - otherwise.", + "operationId": "isEdgesSupportEnabled", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VersionLoadResult" + "type": "boolean" } } } @@ -34229,22 +34242,25 @@ ] } }, - "/api/entities/vc/entity/{versionId}": { + "/api/edges/list": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "List all entities at version (listAllEntitiesAtVersion)", - "description": "Returns a list of all remote entities available in a specific version. Response type is the same as for listAllEntitiesAtVersion API method. \nReturned entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listAllEntitiesAtVersion", + "summary": "Get Edges By Ids (getEdgeList)", + "description": "Requested edges must be owned by tenant or assigned to customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeList", "parameters": [ { - "name": "versionId", - "in": "path", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "name": "edgeIds", + "in": "query", + "description": "A list of edges ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -34256,7 +34272,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/VersionedEntityInfo" + "$ref": "#/components/schemas/Edge" } } } @@ -34378,42 +34394,23 @@ ] } }, - "/api/entities/vc/info/{versionId}/{entityType}/{externalEntityUuid}": { + "/api/tenant/edge": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Get entity data info (getEntityDataInfo)", - "description": "Retrieves short info about the remote entity by external id at a concrete version. \nReturned entity data info contains following properties: `hasRelations` (whether stored entity data contains relations), `hasAttributes` (contains attributes) and `hasCredentials` (whether stored device data has credentials).\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEntityDataInfo", + "summary": "Get Tenant Edge by name (getTenantEdgeByName)", + "description": "Requested edge must be owned by tenant or customer that the user belongs to. Edge name is an unique property of edge. So it can be used to identify the edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEdgeByName", "parameters": [ { - "name": "versionId", - "in": "path", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "name": "edgeName", + "in": "query", + "description": "Unique name of the edge", "required": true, "schema": { "type": "string" } - }, - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "externalEntityUuid", - "in": "path", - "description": "A string value representing external entity id", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } } ], "responses": { @@ -34422,7 +34419,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityDataInfo" + "$ref": "#/components/schemas/Edge" } } } @@ -34543,24 +34540,15 @@ ] } }, - "/api/entities/vc/version": { + "/api/tenant/edgeInfos": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "List all versions (listVersions)", - "description": "Lists all available versions in a branch for all entity types. \nIf specified branch does not exist - empty page data will be returned. The response format is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listVersions", + "summary": "Get Tenant Edge Infos (getTenantEdgeInfos)", + "description": "Returns a page of edges info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Edge Info is an extension of the default Edge object that contains information about the assigned customer name. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEdgeInfos", "parameters": [ - { - "name": "branch", - "in": "query", - "description": "The name of the working branch, for example 'master'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pageSize", "in": "query", @@ -34581,10 +34569,19 @@ "format": "int32" } }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the entity version name.", + "description": "The case insensitive 'substring' filter based on the edge name.", "required": false, "schema": { "type": "string" @@ -34598,7 +34595,11 @@ "schema": { "type": "string", "enum": [ - "timestamp" + "createdTime", + "name", + "type", + "label", + "customerTitle" ] } }, @@ -34622,7 +34623,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityVersion" + "$ref": "#/components/schemas/PageDataEdgeInfo" } } } @@ -34741,32 +34742,92 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/tenant/edges": { + "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Save entities version (saveEntitiesVersion)", - "description": "Creates a new version of entities (or a single entity) by request.\nSupported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE.\n\nThere are two available types of request: `SINGLE_ENTITY` and `COMPLEX`. Each of them contains version name (`versionName`) and name of a branch (`branch`) to create version (commit) in. If specified branch does not exists in a remote repo, then new empty branch will be created. Request of the `SINGLE_ENTITY` type has id of an entity (`entityId`) and additional configuration (`config`) which has following options: \n- `saveRelations` - whether to add inbound and outbound relations of type COMMON to created entity version;\n- `saveAttributes` - to save attributes of server scope (and also shared scope for devices);\n- `saveCredentials` - when saving a version of a device, to add its credentials to the version.\n\nAn example of a `SINGLE_ENTITY` version create request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n\n \"versionName\": \"Version 1.0\",\n \"branch\": \"dev\",\n\n \"entityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": false\n }\n}\n```\n\nSecond request type (`COMPLEX`), additionally to `branch` and `versionName`, contains following properties:\n- `entityTypes` - a structure with entity types to export and configuration for each entity type; this configuration has all the options available for `SINGLE_ENTITY` and additionally has these ones: \n - `allEntities` and `entityIds` - if you want to save the version of all entities of the entity type then set `allEntities` param to true, otherwise set it to false and specify the list of specific entities (`entityIds`);\n - `syncStrategy` - synchronization strategy to use for this entity type: when set to `OVERWRITE` then the list of remote entities of this type will be overwritten by newly added entities. If set to `MERGE` - existing remote entities of this entity type will not be removed, new entities will just be added on top (or existing remote entities will be updated).\n- `syncStrategy` - default synchronization strategy to use when it is not specified for an entity type.\n\nExample for this type of request:\n```json\n{\n \"type\": \"COMPLEX\",\n\n \"versionName\": \"Devices and profiles: release 2\",\n \"branch\": \"master\",\n\n \"syncStrategy\": \"OVERWRITE\",\n \"entityTypes\": {\n \"DEVICE\": {\n \"syncStrategy\": null,\n \"allEntities\": true,\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": true\n },\n \"DEVICE_PROFILE\": {\n \"syncStrategy\": \"MERGE\",\n \"allEntities\": false,\n \"entityIds\": [\n \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n ],\n \"saveRelations\": true\n }\n }\n}\n```\n\nResponse wil contain generated request UUID, that can be then used to retrieve status of operation via `getVersionCreateRequestStatus`.\n\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveEntitiesVersion", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionCreateRequest" - } + "summary": "Get Tenant Edges (getTenantEdges)", + "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEdges", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -34783,7 +34844,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -34887,28 +34948,19 @@ ] } }, - "/api/entities/vc/version/{entityType}": { + "/api/edge/{edgeId}/events": { "get": { "tags": [ - "entities-version-control-controller" + "edge-event-controller" ], - "summary": "List entity type versions (listEntityTypeVersions)", - "description": "Returns list of versions of an entity type in a branch. This is a collected list of versions that were created for entities of this type in a remote branch. \nIf specified branch does not exist - empty page data will be returned. The response structure is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listEntityTypeVersions", + "summary": "Get Edge Events (getEdgeEvents)", + "description": "Returns a page of edge events for the requested edge. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. ", + "operationId": "getEdgeEvents", "parameters": [ { - "name": "entityType", + "name": "edgeId", "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "branch", - "in": "query", - "description": "The name of the working branch, for example 'master'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -34937,7 +34989,7 @@ { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the entity version name.", + "description": "The case insensitive 'substring' filter based on the edge event type name.", "required": false, "schema": { "type": "string" @@ -34951,7 +35003,11 @@ "schema": { "type": "string", "enum": [ - "timestamp" + "createdTime", + "name", + "type", + "label", + "customerTitle" ] } }, @@ -34967,6 +35023,26 @@ "DESC" ] } + }, + { + "name": "startTime", + "in": "query", + "description": "Timestamp. Edge events with creation time before it won't be queried", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Edge events with creation time after it won't be queried", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -34975,7 +35051,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityVersion" + "$ref": "#/components/schemas/PageDataEdgeEvent" } } } @@ -35096,105 +35172,24 @@ ] } }, - "/api/entities/vc/version/{entityType}/{externalEntityUuid}": { + "/api/entities/vc/branches": { "get": { "tags": [ "entities-version-control-controller" ], - "summary": "List entity versions (listEntityVersions)", - "description": "Returns list of versions for a specific entity in a concrete branch. \nYou need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. \nIf specified branch does not exist - empty page data will be returned. \n\nEach version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe \"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe \"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe \"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listEntityVersions", - "parameters": [ - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "externalEntityUuid", - "in": "path", - "description": "A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "branch", - "in": "query", - "description": "The name of the working branch, for example 'master'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity version name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "timestamp" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "summary": "List branches (listBranches)", + "description": "Lists branches available in the remote repository. \n\nResponse example: \n```json\n[\n {\n \"name\": \"master\",\n \"default\": true\n },\n {\n \"name\": \"dev\",\n \"default\": false\n },\n {\n \"name\": \"dev-2\",\n \"default\": false\n }\n]\n```", + "operationId": "listBranches", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityVersion" + "type": "array", + "items": { + "$ref": "#/components/schemas/BranchInfo" + } } } } @@ -35315,24 +35310,42 @@ ] } }, - "/api/entities/vc/version/{requestId}/status": { + "/api/entities/vc/diff/{entityType}/{internalEntityUuid}": { "get": { "tags": [ "entities-version-control-controller" ], - "summary": "Get version create request status (getVersionCreateRequestStatus)", - "description": "Returns the status of previously made version create request. \n\nThis status contains following properties:\n- `done` - whether request processing is finished;\n- `version` - created version info: timestamp, version id (commit hash), commit name and commit author;\n- `added` - count of items that were created in the remote repo;\n- `modified` - modified items count;\n- `removed` - removed items count;\n- `error` - error message, if an error occurred while handling the request.\n\nAn example of successful status:\n```json\n{\n \"done\": true,\n \"added\": 10,\n \"modified\": 2,\n \"removed\": 5,\n \"version\": {\n \"timestamp\": 1655198528000,\n \"id\":\"8a834dd389ed80e0759ba8ee338b3f1fd160a114\",\n \"name\": \"My devices v2.0\",\n \"author\": \"John Doe\"\n },\n \"error\": null\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getVersionCreateRequestStatus", + "summary": "Compare entity data to version (compareEntityDataToVersion)", + "description": "Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "compareEntityDataToVersion", "parameters": [ { - "name": "requestId", + "name": "entityType", "in": "path", - "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "internalEntityUuid", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string", "format": "uuid" } + }, + { + "name": "versionId", + "in": "query", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -35341,7 +35354,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VersionCreationResult" + "$ref": "#/components/schemas/EntityDataDiff" } } } @@ -35462,19 +35475,19 @@ ] } }, - "/api/alarmsQuery/count": { + "/api/entities/vc/entity": { "post": { "tags": [ - "entity-query-controller" + "entities-version-control-controller" ], - "summary": "Count Alarms by Query (countAlarmsByQuery)", - "description": "Returns the number of alarms that match the query definition.", - "operationId": "countAlarmsByQuery", + "summary": "Load entities version (loadEntitiesVersion)", + "description": "Loads specific version of remote entities (or single entity) by request. Supported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE.\n\nThere are multiple types of request. Each of them requires branch name (`branch`) and version id (`versionId`). Request of type `SINGLE_ENTITY` is needed to restore a concrete version of a specific entity. It contains id of a remote entity (`externalEntityId`) and additional configuration (`config`):\n- `loadRelations` - to update relations list (in case `saveRelations` option was enabled during version creation);\n- `loadAttributes` - to load entity attributes (if `saveAttributes` config option was enabled);\n- `loadCredentials` - to update device credentials (if `saveCredentials` option was enabled during version creation).\n\nAn example of such request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n \n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n \n \"externalEntityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b7944123-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"loadRelations\": false,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n}\n```\n\nAnother request type (`ENTITY_TYPE`) is needed to load specific version of the whole entity types. It contains a structure with entity types to load and configs for each entity type (`entityTypes`). For each specified entity type, the method will load all remote entities of this type that are present at the version. A config for each entity type contains the same options as in `SINGLE_ENTITY` request type, and additionally contains following options:\n- `removeOtherEntities` - to remove local entities that are not present on the remote - basically to overwrite local entity type with the remote one;\n- `findExistingEntityByName` - when you are loading some remote entities that are not yet present at this tenant, try to find existing entity by name and update it rather than create new.\n\nHere is an example of the request to completely restore version of the whole device entity type:\n```json\n{\n \"type\": \"ENTITY_TYPE\",\n\n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n\n \"entityTypes\": {\n \"DEVICE\": {\n \"removeOtherEntities\": true,\n \"findExistingEntityByName\": false,\n \"loadRelations\": true,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n }\n}\n```\n\nThe response will contain generated request UUID that is to be used to check the status of operation via `getVersionLoadRequestStatus`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "loadEntitiesVersion", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AlarmCountQuery" + "$ref": "#/components/schemas/VersionLoadRequest" } } }, @@ -35486,8 +35499,8 @@ "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "type": "string", + "format": "uuid" } } } @@ -35608,31 +35621,44 @@ ] } }, - "/api/alarmsQuery/find": { - "post": { + "/api/entities/vc/entity/{entityType}/{versionId}": { + "get": { "tags": [ - "entity-query-controller" + "entities-version-control-controller" ], - "summary": "Find Alarms by Query", - "description": "This method description defines how Alarm Data Query extends the Entity Data Query. See method 'Find Entity Data by Query' first to get the info about 'Entity Data Query'.\n\n The platform will first search the entities that match the entity and key filters. Then, the platform will use 'Alarm Page Link' to filter the alarms related to those entities. Finally, platform fetch the properties of alarm that are defined in the **'alarmFields'** and combine them with the other entity, attribute and latest time series fields to return the result. \n\n See example of the alarm query below. The query will search first 100 active alarms with type 'Temperature Alarm' or 'Fire Alarm' for any device with current temperature > 0. The query will return combination of the entity fields: name of the device, device model and latest temperature reading and alarms fields: createdTime, type, severity and status: \n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 100,\n \"textSearch\": null,\n \"searchPropagatedAlarms\": false,\n \"statusList\": [\n \"ACTIVE\"\n ],\n \"severityList\": [\n \"CRITICAL\",\n \"MAJOR\"\n ],\n \"typeList\": [\n \"Temperature Alarm\",\n \"Fire Alarm\"\n ],\n \"sortOrder\": {\n \"key\": {\n \"key\": \"createdTime\",\n \"type\": \"ALARM_FIELD\"\n },\n \"direction\": \"DESC\"\n },\n \"timeWindow\": 86400000\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"alarmFields\": [\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"createdTime\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"type\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"severity\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"status\"\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ]\n}\n```", - "operationId": "findAlarmDataByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlarmDataQuery" - } + "summary": "List entities at version (listEntitiesAtVersion)", + "description": "Returns a list of remote entities of a specific entity type that are available at a concrete version. \nEach entity item in the result has `externalId` property. Entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntitiesAtVersion", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityType" } }, - "required": true - }, + { + "name": "versionId", + "in": "path", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAlarmData" + "type": "array", + "items": { + "$ref": "#/components/schemas/VersionedEntityInfo" + } } } } @@ -35649,7 +35675,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -35753,20 +35779,33 @@ ] } }, - "/api/edqs/state": { + "/api/entities/vc/entity/{requestId}/status": { "get": { "tags": [ - "entity-query-controller" + "entities-version-control-controller" + ], + "summary": "Get version load request status (getVersionLoadRequestStatus)", + "description": "Returns the status of previously made version load request. The structure contains following parameters:\n- `done` - if the request was successfully processed;\n- `result` - a list of load results for each entity type:\n - `created` - created entities count;\n - `updated` - updated entities count;\n - `deleted` - removed entities count.\n- `error` - if an error occurred during processing, error info:\n - `type` - error type;\n - `source` - an external id of remote entity;\n - `target` - if failed to find referenced entity by external id - this external id;\n - `message` - error message.\n\nAn example of successfully processed request status:\n```json\n{\n \"done\": true,\n \"result\": [\n {\n \"entityType\": \"DEVICE\",\n \"created\": 10,\n \"updated\": 5,\n \"deleted\": 5\n },\n {\n \"entityType\": \"ASSET\",\n \"created\": 4,\n \"updated\": 0,\n \"deleted\": 8\n }\n ]\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getVersionLoadRequestStatus", + "parameters": [ + { + "name": "requestId", + "in": "path", + "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - "summary": "getEdqsState", - "operationId": "getEdqsState", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdqsState" + "$ref": "#/components/schemas/VersionLoadResult" } } } @@ -35887,26 +35926,38 @@ ] } }, - "/api/edqs/system/request": { - "post": { + "/api/entities/vc/entity/{versionId}": { + "get": { "tags": [ - "entity-query-controller" + "entities-version-control-controller" ], - "summary": "processSystemEdqsRequest", - "operationId": "processSystemEdqsRequest", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToCoreEdqsRequest" - } + "summary": "List all entities at version (listAllEntitiesAtVersion)", + "description": "Returns a list of all remote entities available in a specific version. Response type is the same as for listAllEntitiesAtVersion API method. \nReturned entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listAllEntitiesAtVersion", + "parameters": [ + { + "name": "versionId", + "in": "path", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VersionedEntityInfo" + } + } + } + } }, "400": { "description": "Bad Request", @@ -35920,7 +35971,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -36024,32 +36075,51 @@ ] } }, - "/api/entitiesQuery/count": { - "post": { + "/api/entities/vc/info/{versionId}/{entityType}/{externalEntityUuid}": { + "get": { "tags": [ - "entity-query-controller" + "entities-version-control-controller" ], - "summary": "Count Entities by Query", - "description": "Allows to run complex queries to search the count of platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the number of entities that match the query definition.\n\n# Query Definition\n\n\n\nMain **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\"\n\nOptional **key filters** allow to filter results of the entity filter by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\".\n\nLet's review the example:\n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"entityType\": \"DEVICE\"\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"active\"\n },\n \"valueType\": \"BOOLEAN\",\n \"predicate\": {\n \"operation\": \"EQUAL\",\n \"value\": {\n \"defaultValue\": true,\n \"dynamicValue\": null\n },\n \"type\": \"BOOLEAN\"\n }\n }\n ]\n}\n```\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:\n\n # Entity Filters\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases.\n\n## Single Entity\n\nAllows to filter only one entity based on the id. For example, this entity filter selects certain device:\n\n```json\n{\n \"type\": \"singleEntity\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Entity List Filter\n\nAllows to filter entities of the same type using their ids. For example, this entity filter selects two devices:\n\n```json\n{\n \"type\": \"entityList\",\n \"entityType\": \"DEVICE\",\n \"entityList\": [\n \"e6501f30-2a7a-11ec-94eb-213c95f54092\",\n \"e6657bf0-2a7a-11ec-94eb-213c95f54092\"\n ]\n}\n```\n\n## Entity Name Filter\n\nAllows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality':\n\n```json\n{\n \"type\": \"entityName\",\n \"entityType\": \"DEVICE\",\n \"entityNameFilter\": \"Air Quality\"\n}\n```\n\n## Entity Type Filter\n\nAllows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers:\n\n```json\n{\n \"type\": \"entityType\",\n \"entityType\": \"CUSTOMER\"\n}\n```\n\n## Asset Type Filter\n\nAllows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla':\n\n```json\n{\n \"type\": \"assetType\",\n \"assetType\": \"charging station\",\n \"assetNameFilter\": \"Tesla\"\n}\n```\n\n## Device Type Filter\n\nAllows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC':\n\n```json\n{\n \"type\": \"deviceType\",\n \"deviceType\": \"Temperature Sensor\",\n \"deviceNameFilter\": \"ABC\"\n}\n```\n\n## Edge Type Filter\n\nAllows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada':\n\n```json\n{\n \"type\": \"edgeType\",\n \"edgeType\": \"Factory\",\n \"edgeNameFilter\": \"Nevada\"\n}\n```\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```\n\n## Api Usage Filter\n\nAllows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"apiUsageState\",\n \"customerId\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"CUSTOMER\"\n }\n}\n```\n\n## Relations Query Filter\n\nAllows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'.\n\nFor example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"relationsQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"filters\": [\n {\n \"relationType\": \"Contains\",\n \"entityTypes\": [\n \"DEVICE\",\n \"ASSET\"\n ]\n }\n ]\n}\n```\n\n## Asset Search Query\n\nAllows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions.\n\nFor example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"assetSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"assetTypes\": [\n \"charging station\"\n ]\n}\n```\n\n## Device Search Query\n\nAllows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"deviceTypes\": [\n \"Air Quality Sensor\",\n \"Charging port\"\n ]\n}\n```\n\n## Entity View Query\n\nAllows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"entityViewSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"entityViewTypes\": [\n \"Concrete mixer\"\n ]\n}\n```\n\n## Edge Search Query\n\nAllows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"edgeTypes\": [\n \"Factory\"\n ]\n}\n```\n\n # Key Filters\nKey Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees:\n\n```json\n{\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n}\n```\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail.\n\n## Filter Key\n\nFilter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: \n\n * 'CLIENT_ATTRIBUTE' - used for client attributes; \n * 'SHARED_ATTRIBUTE' - used for shared attributes; \n * 'SERVER_ATTRIBUTE' - used for server attributes; \n * 'ATTRIBUTE' - used for any of the above; \n * 'TIME_SERIES' - used for time series values; \n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n\n\n Let's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value < 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value < 10 or value > 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\n You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: \n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\n Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "countEntitiesByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityCountQuery" - } + "summary": "Get entity data info (getEntityDataInfo)", + "description": "Retrieves short info about the remote entity by external id at a concrete version. \nReturned entity data info contains following properties: `hasRelations` (whether stored entity data contains relations), `hasAttributes` (contains attributes) and `hasCredentials` (whether stored device data has credentials).\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEntityDataInfo", + "parameters": [ + { + "name": "versionId", + "in": "path", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "externalEntityUuid", + "in": "path", + "description": "A string value representing external entity id", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/EntityDataInfo" } } } @@ -36066,7 +36136,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -36170,31 +36240,86 @@ ] } }, - "/api/entitiesQuery/find": { - "post": { + "/api/entities/vc/version": { + "get": { "tags": [ - "entity-query-controller" + "entities-version-control-controller" ], - "summary": "Find Entity Data by Query", - "description": "Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data.\n\n# Query Definition\n\n\n\nMain **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\"\n\nOptional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\".\n\nThe **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity.\n\nThe **page link** contains information about the page to fetch and the sort ordering.\n\nLet's review the example:\n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\",\n \"inherit\": false\n }\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n },\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"label\"\n },\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"additionalInfo\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ],\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 10,\n \"sortOrder\": {\n \"key\": {\n \"key\": \"name\",\n \"type\": \"ENTITY_FIELD\"\n },\n \"direction\": \"ASC\"\n }\n }\n}\n```\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:\n\n # Entity Filters\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases.\n\n## Single Entity\n\nAllows to filter only one entity based on the id. For example, this entity filter selects certain device:\n\n```json\n{\n \"type\": \"singleEntity\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Entity List Filter\n\nAllows to filter entities of the same type using their ids. For example, this entity filter selects two devices:\n\n```json\n{\n \"type\": \"entityList\",\n \"entityType\": \"DEVICE\",\n \"entityList\": [\n \"e6501f30-2a7a-11ec-94eb-213c95f54092\",\n \"e6657bf0-2a7a-11ec-94eb-213c95f54092\"\n ]\n}\n```\n\n## Entity Name Filter\n\nAllows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality':\n\n```json\n{\n \"type\": \"entityName\",\n \"entityType\": \"DEVICE\",\n \"entityNameFilter\": \"Air Quality\"\n}\n```\n\n## Entity Type Filter\n\nAllows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers:\n\n```json\n{\n \"type\": \"entityType\",\n \"entityType\": \"CUSTOMER\"\n}\n```\n\n## Asset Type Filter\n\nAllows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla':\n\n```json\n{\n \"type\": \"assetType\",\n \"assetType\": \"charging station\",\n \"assetNameFilter\": \"Tesla\"\n}\n```\n\n## Device Type Filter\n\nAllows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC':\n\n```json\n{\n \"type\": \"deviceType\",\n \"deviceType\": \"Temperature Sensor\",\n \"deviceNameFilter\": \"ABC\"\n}\n```\n\n## Edge Type Filter\n\nAllows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada':\n\n```json\n{\n \"type\": \"edgeType\",\n \"edgeType\": \"Factory\",\n \"edgeNameFilter\": \"Nevada\"\n}\n```\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```\n\n## Api Usage Filter\n\nAllows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"apiUsageState\",\n \"customerId\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"CUSTOMER\"\n }\n}\n```\n\n## Relations Query Filter\n\nAllows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'.\n\nFor example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"relationsQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"filters\": [\n {\n \"relationType\": \"Contains\",\n \"entityTypes\": [\n \"DEVICE\",\n \"ASSET\"\n ]\n }\n ]\n}\n```\n\n## Asset Search Query\n\nAllows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions.\n\nFor example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"assetSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"assetTypes\": [\n \"charging station\"\n ]\n}\n```\n\n## Device Search Query\n\nAllows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"deviceTypes\": [\n \"Air Quality Sensor\",\n \"Charging port\"\n ]\n}\n```\n\n## Entity View Query\n\nAllows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"entityViewSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"entityViewTypes\": [\n \"Concrete mixer\"\n ]\n}\n```\n\n## Edge Search Query\n\nAllows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"edgeTypes\": [\n \"Factory\"\n ]\n}\n```\n\n # Key Filters\nKey Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees:\n\n```json\n{\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n}\n```\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail.\n\n## Filter Key\n\nFilter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: \n\n * 'CLIENT_ATTRIBUTE' - used for client attributes; \n * 'SHARED_ATTRIBUTE' - used for shared attributes; \n * 'SERVER_ATTRIBUTE' - used for server attributes; \n * 'ATTRIBUTE' - used for any of the above; \n * 'TIME_SERIES' - used for time series values; \n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n\n\n Let's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value < 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value < 10 or value > 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\n You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: \n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\n Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findEntityDataByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityDataQuery" - } + "summary": "List all versions (listVersions)", + "description": "Lists all available versions in a branch for all entity types. \nIf specified branch does not exist - empty page data will be returned. The response format is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listVersions", + "parameters": [ + { + "name": "branch", + "in": "query", + "description": "The name of the working branch, for example 'master'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity version name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "timestamp" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityData" + "$ref": "#/components/schemas/PageDataEntityVersion" } } } @@ -36211,7 +36336,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -36313,55 +36438,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entitiesQuery/find/keys": { + }, "post": { "tags": [ - "entity-query-controller" - ], - "summary": "Find Available Entity Keys by Query (deprecated)", - "description": "**Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead.\n\nReturns unique time series and/or attribute key names from entities matching the query.\n\nExecutes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names.\n\nPrimarily used for UI features like autocomplete suggestions.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findAvailableEntityKeysByQuery", - "parameters": [ - { - "name": "timeseries", - "in": "query", - "description": "When true, includes unique time series key names in the response.\nWhen false, the 'timeseries' list will be empty.", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "attributes", - "in": "query", - "description": "When true, includes unique attribute key names in the response.\nWhen false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope.", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "scope", - "in": "query", - "description": "Filters attribute keys by scope. Only applies when 'attributes' is true.\nIf not specified, returns attribute keys from all scopes.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "SERVER_SCOPE", - "SHARED_SCOPE", - "CLIENT_SCOPE" - ] - } - } + "entities-version-control-controller" ], + "summary": "Save entities version (saveEntitiesVersion)", + "description": "Creates a new version of entities (or a single entity) by request.\nSupported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE.\n\nThere are two available types of request: `SINGLE_ENTITY` and `COMPLEX`. Each of them contains version name (`versionName`) and name of a branch (`branch`) to create version (commit) in. If specified branch does not exists in a remote repo, then new empty branch will be created. Request of the `SINGLE_ENTITY` type has id of an entity (`entityId`) and additional configuration (`config`) which has following options: \n- `saveRelations` - whether to add inbound and outbound relations of type COMMON to created entity version;\n- `saveAttributes` - to save attributes of server scope (and also shared scope for devices);\n- `saveCredentials` - when saving a version of a device, to add its credentials to the version.\n\nAn example of a `SINGLE_ENTITY` version create request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n\n \"versionName\": \"Version 1.0\",\n \"branch\": \"dev\",\n\n \"entityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": false\n }\n}\n```\n\nSecond request type (`COMPLEX`), additionally to `branch` and `versionName`, contains following properties:\n- `entityTypes` - a structure with entity types to export and configuration for each entity type; this configuration has all the options available for `SINGLE_ENTITY` and additionally has these ones: \n - `allEntities` and `entityIds` - if you want to save the version of all entities of the entity type then set `allEntities` param to true, otherwise set it to false and specify the list of specific entities (`entityIds`);\n - `syncStrategy` - synchronization strategy to use for this entity type: when set to `OVERWRITE` then the list of remote entities of this type will be overwritten by newly added entities. If set to `MERGE` - existing remote entities of this entity type will not be removed, new entities will just be added on top (or existing remote entities will be updated).\n- `syncStrategy` - default synchronization strategy to use when it is not specified for an entity type.\n\nExample for this type of request:\n```json\n{\n \"type\": \"COMPLEX\",\n\n \"versionName\": \"Devices and profiles: release 2\",\n \"branch\": \"master\",\n\n \"syncStrategy\": \"OVERWRITE\",\n \"entityTypes\": {\n \"DEVICE\": {\n \"syncStrategy\": null,\n \"allEntities\": true,\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": true\n },\n \"DEVICE_PROFILE\": {\n \"syncStrategy\": \"MERGE\",\n \"allEntities\": false,\n \"entityIds\": [\n \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n ],\n \"saveRelations\": true\n }\n }\n}\n```\n\nResponse wil contain generated request UUID, that can be then used to retrieve status of operation via `getVersionCreateRequestStatus`.\n\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveEntitiesVersion", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityDataQuery" + "$ref": "#/components/schemas/VersionCreateRequest" } } }, @@ -36373,7 +36462,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AvailableEntityKeys" + "type": "string", + "format": "uuid" } } } @@ -36484,7 +36574,6 @@ } } }, - "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -36495,77 +36584,95 @@ ] } }, - "/api/v2/entitiesQuery/find/keys": { - "post": { + "/api/entities/vc/version/{entityType}": { + "get": { "tags": [ - "entity-query-controller" + "entities-version-control-controller" ], - "summary": "Find Available Entity Keys By Query", - "description": "Discovers unique time series and/or attribute key names available on entities that match the given query.\nWorks in two steps: first, the request body (an Entity Data Query) is executed to find matching entities\n(page size is capped at 100); then, all distinct key names are collected from those entities.\n\nOptionally, each key can include a sample — the most recent value (by timestamp) for that key\nacross all matched entities.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findAvailableEntityKeysByQueryV2", + "summary": "List entity type versions (listEntityTypeVersions)", + "description": "Returns list of versions of an entity type in a branch. This is a collected list of versions that were created for entities of this type in a remote branch. \nIf specified branch does not exist - empty page data will be returned. The response structure is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntityTypeVersions", "parameters": [ { - "name": "includeTimeseries", + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "branch", "in": "query", - "description": "When true, includes unique time series keys in the response.\nWhen false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true.", - "required": false, + "description": "The name of the working branch, for example 'master'", + "required": true, "schema": { - "type": "boolean", - "default": true + "type": "string" } }, { - "name": "includeAttributes", + "name": "pageSize", "in": "query", - "description": "When true, includes unique attribute keys in the response.\nWhen false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true.", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity version name.", "required": false, "schema": { - "type": "boolean", - "default": true + "type": "string" } }, { - "name": "scopes", + "name": "sortProperty", "in": "query", - "description": "Filters attribute keys by scope. Only applies when 'includeAttributes' is true.\nWhen not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities,\nserver scope only for other entity types.", + "description": "Property of entity to sort by", "required": false, "schema": { "type": "string", "enum": [ - "SERVER_SCOPE", - "SHARED_SCOPE", - "CLIENT_SCOPE" + "timestamp" ] } }, { - "name": "includeSamples", + "name": "sortOrder", "in": "query", - "description": "When true, each key entry includes a 'sample' object with the most recent value and timestamp.\nWhen false, only key names are returned (sample is omitted from JSON).", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { - "type": "boolean", - "default": false + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityDataQuery" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AvailableEntityKeysV2" + "$ref": "#/components/schemas/PageDataEntityVersion" } } } @@ -36582,7 +36689,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -36686,67 +36793,95 @@ ] } }, - "/api/relation": { + "/api/entities/vc/version/{entityType}/{externalEntityUuid}": { "get": { "tags": [ - "entity-relation-controller" + "entities-version-control-controller" ], - "summary": "Get Relation (getRelation)", - "description": "Returns relation object between two specified entities if present. Otherwise throws exception. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "getRelation", + "summary": "List entity versions (listEntityVersions)", + "description": "Returns list of versions for a specific entity in a concrete branch. \nYou need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. \nIf specified branch does not exist - empty page data will be returned. \n\nEach version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntityVersions", "parameters": [ { - "name": "fromId", + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "externalEntityUuid", + "in": "path", + "description": "A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "branch", "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "The name of the working branch, for example 'master'", "required": true, "schema": { "type": "string" } }, { - "name": "fromType", + "name": "pageSize", "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "relationType", + "name": "page", "in": "query", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "relationTypeGroup", + "name": "textSearch", "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", + "description": "The case insensitive 'substring' filter based on the entity version name.", "required": false, "schema": { "type": "string" } }, { - "name": "toId", + "name": "sortProperty", "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "description": "Property of entity to sort by", + "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "timestamp" + ] } }, { - "name": "toType", + "name": "sortOrder", "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -36756,7 +36891,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelation" + "$ref": "#/components/schemas/PageDataEntityVersion" } } } @@ -36877,34 +37012,33 @@ ] } }, - "/api/relations": { - "post": { + "/api/entities/vc/version/{requestId}/status": { + "get": { "tags": [ - "entity-relation-controller" + "entities-version-control-controller" ], - "summary": "Find related entities (findEntityRelationsByQuery)", - "description": "Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info.", - "operationId": "findEntityRelationsByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityRelationsQuery" - } + "summary": "Get version create request status (getVersionCreateRequestStatus)", + "description": "Returns the status of previously made version create request. \n\nThis status contains following properties:\n- `done` - whether request processing is finished;\n- `version` - created version info: timestamp, version id (commit hash), commit name and commit author;\n- `added` - count of items that were created in the remote repo;\n- `modified` - modified items count;\n- `removed` - removed items count;\n- `error` - error message, if an error occurred while handling the request.\n\nAn example of successful status:\n```json\n{\n \"done\": true,\n \"added\": 10,\n \"modified\": 2,\n \"removed\": 5,\n \"version\": {\n \"timestamp\": 1655198528000,\n \"id\":\"8a834dd389ed80e0759ba8ee338b3f1fd160a114\",\n \"name\": \"My devices v2.0\",\n \"author\": \"John Doe\"\n },\n \"error\": null\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getVersionCreateRequestStatus", + "parameters": [ + { + "name": "requestId", + "in": "path", + "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string", + "format": "uuid" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } + "$ref": "#/components/schemas/VersionCreationResult" } } } @@ -36921,7 +37055,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -37023,37 +37157,37 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/alarmsQuery/count": { + "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Delete common relations (deleteRelations)", - "description": "Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "deleteRelations", - "parameters": [ - { - "name": "entityId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Count Alarms by Query (countAlarmsByQuery)", + "description": "Returns the number of alarms that match the query definition.", + "operationId": "countAlarmsByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmCountQuery" + } } }, - { - "name": "entityType", - "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } }, "400": { "description": "Bad Request", @@ -37067,7 +37201,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -37171,53 +37305,31 @@ ] } }, - "/api/relations/from/{fromType}/{fromId}": { - "get": { + "/api/alarmsQuery/find": { + "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Get List of Relations (findEntityRelationsByFrom)", - "description": "Returns list of relation objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findEntityRelationsByFrom", - "parameters": [ - { - "name": "fromType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Find Alarms by Query", + "description": "This method description defines how Alarm Data Query extends the Entity Data Query. See method 'Find Entity Data by Query' first to get the info about 'Entity Data Query'.\n\n The platform will first search the entities that match the entity and key filters. Then, the platform will use 'Alarm Page Link' to filter the alarms related to those entities. Finally, platform fetch the properties of alarm that are defined in the **'alarmFields'** and combine them with the other entity, attribute and latest time series fields to return the result. \n\n See example of the alarm query below. The query will search first 100 active alarms with type 'Temperature Alarm' or 'Fire Alarm' for any device with current temperature \u003E 0. The query will return combination of the entity fields: name of the device, device model and latest temperature reading and alarms fields: createdTime, type, severity and status: \n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 100,\n \"textSearch\": null,\n \"searchPropagatedAlarms\": false,\n \"statusList\": [\n \"ACTIVE\"\n ],\n \"severityList\": [\n \"CRITICAL\",\n \"MAJOR\"\n ],\n \"typeList\": [\n \"Temperature Alarm\",\n \"Fire Alarm\"\n ],\n \"sortOrder\": {\n \"key\": {\n \"key\": \"createdTime\",\n \"type\": \"ALARM_FIELD\"\n },\n \"direction\": \"DESC\"\n },\n \"timeWindow\": 86400000\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"alarmFields\": [\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"createdTime\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"type\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"severity\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"status\"\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ]\n}\n```", + "operationId": "findAlarmDataByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmDataQuery" + } } }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } + "$ref": "#/components/schemas/PageDataAlarmData" } } } @@ -37234,7 +37346,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -37338,62 +37450,20 @@ ] } }, - "/api/relations/from/{fromType}/{fromId}/{relationType}": { + "/api/edqs/state": { "get": { "tags": [ - "entity-relation-controller" - ], - "summary": "Get List of Relations (findEntityRelationsByFromAndRelationType)", - "description": "Returns list of relation objects for the specified entity by the 'from' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findEntityRelationsByFromAndRelationType", - "parameters": [ - { - "name": "fromType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationType", - "in": "path", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } + "entity-query-controller" ], + "summary": "getEdqsState", + "operationId": "getEdqsState", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } + "$ref": "#/components/schemas/EdqsState" } } } @@ -37514,19 +37584,18 @@ ] } }, - "/api/relations/info": { + "/api/edqs/system/request": { "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Find related entity infos (findEntityRelationInfosByQuery)", - "description": "Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findEntityRelationInfosByQuery", + "summary": "processSystemEdqsRequest", + "operationId": "processSystemEdqsRequest", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelationsQuery" + "$ref": "#/components/schemas/ToCoreEdqsRequest" } } }, @@ -37534,17 +37603,7 @@ }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelationInfo" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -37662,53 +37721,32 @@ ] } }, - "/api/relations/info/from/{fromType}/{fromId}": { - "get": { + "/api/entitiesQuery/count": { + "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Get List of Relation Infos (findEntityRelationInfosByFrom)", - "description": "Returns list of relation info objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findEntityRelationInfosByFrom", - "parameters": [ - { - "name": "fromType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Count Entities by Query", + "description": "Allows to run complex queries to search the count of platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the number of entities that match the query definition.\n\n# Query Definition\n\n\n\nMain **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\"\n\nOptional **key filters** allow to filter results of the entity filter by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature \u003E 20 or temperature\u003C 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' \u003E 40\".\n\nLet's review the example:\n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"entityType\": \"DEVICE\"\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"active\"\n },\n \"valueType\": \"BOOLEAN\",\n \"predicate\": {\n \"operation\": \"EQUAL\",\n \"value\": {\n \"defaultValue\": true,\n \"dynamicValue\": null\n },\n \"type\": \"BOOLEAN\"\n }\n }\n ]\n}\n```\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:\n\n # Entity Filters\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases.\n\n## Single Entity\n\nAllows to filter only one entity based on the id. For example, this entity filter selects certain device:\n\n```json\n{\n \"type\": \"singleEntity\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Entity List Filter\n\nAllows to filter entities of the same type using their ids. For example, this entity filter selects two devices:\n\n```json\n{\n \"type\": \"entityList\",\n \"entityType\": \"DEVICE\",\n \"entityList\": [\n \"e6501f30-2a7a-11ec-94eb-213c95f54092\",\n \"e6657bf0-2a7a-11ec-94eb-213c95f54092\"\n ]\n}\n```\n\n## Entity Name Filter\n\nAllows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality':\n\n```json\n{\n \"type\": \"entityName\",\n \"entityType\": \"DEVICE\",\n \"entityNameFilter\": \"Air Quality\"\n}\n```\n\n## Entity Type Filter\n\nAllows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers:\n\n```json\n{\n \"type\": \"entityType\",\n \"entityType\": \"CUSTOMER\"\n}\n```\n\n## Asset Type Filter\n\nAllows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla':\n\n```json\n{\n \"type\": \"assetType\",\n \"assetType\": \"charging station\",\n \"assetNameFilter\": \"Tesla\"\n}\n```\n\n## Device Type Filter\n\nAllows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC':\n\n```json\n{\n \"type\": \"deviceType\",\n \"deviceType\": \"Temperature Sensor\",\n \"deviceNameFilter\": \"ABC\"\n}\n```\n\n## Edge Type Filter\n\nAllows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada':\n\n```json\n{\n \"type\": \"edgeType\",\n \"edgeType\": \"Factory\",\n \"edgeNameFilter\": \"Nevada\"\n}\n```\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```\n\n## Api Usage Filter\n\nAllows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"apiUsageState\",\n \"customerId\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"CUSTOMER\"\n }\n}\n```\n\n## Relations Query Filter\n\nAllows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'.\n\nFor example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"relationsQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"filters\": [\n {\n \"relationType\": \"Contains\",\n \"entityTypes\": [\n \"DEVICE\",\n \"ASSET\"\n ]\n }\n ]\n}\n```\n\n## Asset Search Query\n\nAllows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions.\n\nFor example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"assetSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"assetTypes\": [\n \"charging station\"\n ]\n}\n```\n\n## Device Search Query\n\nAllows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"deviceTypes\": [\n \"Air Quality Sensor\",\n \"Charging port\"\n ]\n}\n```\n\n## Entity View Query\n\nAllows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"entityViewSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"entityViewTypes\": [\n \"Concrete mixer\"\n ]\n}\n```\n\n## Edge Search Query\n\nAllows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"edgeTypes\": [\n \"Factory\"\n ]\n}\n```\n\n # Key Filters\nKey Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees:\n\n```json\n{\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n}\n```\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail.\n\n## Filter Key\n\nFilter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: \n\n * 'CLIENT_ATTRIBUTE' - used for client attributes; \n * 'SHARED_ATTRIBUTE' - used for shared attributes; \n * 'SERVER_ATTRIBUTE' - used for server attributes; \n * 'ATTRIBUTE' - used for any of the above; \n * 'TIME_SERIES' - used for time series values; \n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n\n\n Let's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value \u003C 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value \u003C 10 or value \u003E 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value \u003C 10 or (value \u003E 50 && value \u003C 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\n You may also want to replace hardcoded values (for example, temperature \u003E 20) with the more dynamic expression (for example, temperature \u003E 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: \n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\n Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "countEntitiesByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityCountQuery" + } } }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelationInfo" - } + "type": "integer", + "format": "int64" } } } @@ -37725,7 +37763,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -37829,53 +37867,31 @@ ] } }, - "/api/relations/info/to/{toType}/{toId}": { - "get": { + "/api/entitiesQuery/find": { + "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Get List of Relation Infos (findEntityRelationInfosByTo)", - "description": "Returns list of relation info objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findEntityRelationInfosByTo", - "parameters": [ - { - "name": "toType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "toId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Find Entity Data by Query", + "description": "Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data.\n\n# Query Definition\n\n\n\nMain **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\"\n\nOptional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature \u003E 20 or temperature\u003C 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' \u003E 40\".\n\nThe **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity.\n\nThe **page link** contains information about the page to fetch and the sort ordering.\n\nLet's review the example:\n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\",\n \"inherit\": false\n }\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n },\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"label\"\n },\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"additionalInfo\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ],\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 10,\n \"sortOrder\": {\n \"key\": {\n \"key\": \"name\",\n \"type\": \"ENTITY_FIELD\"\n },\n \"direction\": \"ASC\"\n }\n }\n}\n```\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:\n\n # Entity Filters\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases.\n\n## Single Entity\n\nAllows to filter only one entity based on the id. For example, this entity filter selects certain device:\n\n```json\n{\n \"type\": \"singleEntity\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Entity List Filter\n\nAllows to filter entities of the same type using their ids. For example, this entity filter selects two devices:\n\n```json\n{\n \"type\": \"entityList\",\n \"entityType\": \"DEVICE\",\n \"entityList\": [\n \"e6501f30-2a7a-11ec-94eb-213c95f54092\",\n \"e6657bf0-2a7a-11ec-94eb-213c95f54092\"\n ]\n}\n```\n\n## Entity Name Filter\n\nAllows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality':\n\n```json\n{\n \"type\": \"entityName\",\n \"entityType\": \"DEVICE\",\n \"entityNameFilter\": \"Air Quality\"\n}\n```\n\n## Entity Type Filter\n\nAllows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers:\n\n```json\n{\n \"type\": \"entityType\",\n \"entityType\": \"CUSTOMER\"\n}\n```\n\n## Asset Type Filter\n\nAllows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla':\n\n```json\n{\n \"type\": \"assetType\",\n \"assetType\": \"charging station\",\n \"assetNameFilter\": \"Tesla\"\n}\n```\n\n## Device Type Filter\n\nAllows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC':\n\n```json\n{\n \"type\": \"deviceType\",\n \"deviceType\": \"Temperature Sensor\",\n \"deviceNameFilter\": \"ABC\"\n}\n```\n\n## Edge Type Filter\n\nAllows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada':\n\n```json\n{\n \"type\": \"edgeType\",\n \"edgeType\": \"Factory\",\n \"edgeNameFilter\": \"Nevada\"\n}\n```\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```\n\n## Api Usage Filter\n\nAllows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"apiUsageState\",\n \"customerId\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"CUSTOMER\"\n }\n}\n```\n\n## Relations Query Filter\n\nAllows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'.\n\nFor example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"relationsQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"filters\": [\n {\n \"relationType\": \"Contains\",\n \"entityTypes\": [\n \"DEVICE\",\n \"ASSET\"\n ]\n }\n ]\n}\n```\n\n## Asset Search Query\n\nAllows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions.\n\nFor example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"assetSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"assetTypes\": [\n \"charging station\"\n ]\n}\n```\n\n## Device Search Query\n\nAllows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"deviceTypes\": [\n \"Air Quality Sensor\",\n \"Charging port\"\n ]\n}\n```\n\n## Entity View Query\n\nAllows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"entityViewSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"entityViewTypes\": [\n \"Concrete mixer\"\n ]\n}\n```\n\n## Edge Search Query\n\nAllows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"edgeTypes\": [\n \"Factory\"\n ]\n}\n```\n\n # Key Filters\nKey Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees:\n\n```json\n{\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n}\n```\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail.\n\n## Filter Key\n\nFilter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: \n\n * 'CLIENT_ATTRIBUTE' - used for client attributes; \n * 'SHARED_ATTRIBUTE' - used for shared attributes; \n * 'SERVER_ATTRIBUTE' - used for server attributes; \n * 'ATTRIBUTE' - used for any of the above; \n * 'TIME_SERIES' - used for time series values; \n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n\n\n Let's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value \u003C 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value \u003C 10 or value \u003E 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value \u003C 10 or (value \u003E 50 && value \u003C 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\n You may also want to replace hardcoded values (for example, temperature \u003E 20) with the more dynamic expression (for example, temperature \u003E 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: \n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\n Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findEntityDataByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityDataQuery" + } } }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelationInfo" - } + "$ref": "#/components/schemas/PageDataEntityData" } } } @@ -37892,7 +37908,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -37996,53 +38012,65 @@ ] } }, - "/api/relations/to/{toType}/{toId}": { - "get": { + "/api/entitiesQuery/find/keys": { + "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Get List of Relations (findEntityRelationsByTo)", - "description": "Returns list of relation objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findEntityRelationsByTo", + "summary": "Find Available Entity Keys by Query (deprecated)", + "description": "**Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead.\n\nReturns unique time series and/or attribute key names from entities matching the query.\n\nExecutes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names.\n\nPrimarily used for UI features like autocomplete suggestions.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findAvailableEntityKeysByQuery", "parameters": [ { - "name": "toType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "name": "timeseries", + "in": "query", + "description": "When true, includes unique time series key names in the response.\nWhen false, the 'timeseries' list will be empty.", "required": true, "schema": { - "type": "string" + "type": "boolean" } }, { - "name": "toId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "attributes", + "in": "query", + "description": "When true, includes unique attribute key names in the response.\nWhen false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope.", "required": true, "schema": { - "type": "string" + "type": "boolean" } }, { - "name": "relationTypeGroup", + "name": "scope", "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", + "description": "Filters attribute keys by scope. Only applies when 'attributes' is true.\nIf not specified, returns attribute keys from all scopes.", "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE", + "CLIENT_SCOPE" + ] } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityDataQuery" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } + "$ref": "#/components/schemas/AvailableEntityKeys" } } } @@ -38059,7 +38087,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -38153,6 +38181,7 @@ } } }, + "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -38163,62 +38192,77 @@ ] } }, - "/api/relations/to/{toType}/{toId}/{relationType}": { - "get": { + "/api/v2/entitiesQuery/find/keys": { + "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Get List of Relations (findEntityRelationsByToAndRelationType)", - "description": "Returns list of relation objects for the specified entity by the 'to' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findEntityRelationsByToAndRelationType", + "summary": "Find Available Entity Keys By Query", + "description": "Discovers unique time series and/or attribute key names available on entities that match the given query.\nWorks in two steps: first, the request body (an Entity Data Query) is executed to find matching entities\n(page size is capped at 100); then, all distinct key names are collected from those entities.\n\nOptionally, each key can include a sample — the most recent value (by timestamp) for that key\nacross all matched entities.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findAvailableEntityKeysByQueryV2", "parameters": [ { - "name": "toType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, + "name": "includeTimeseries", + "in": "query", + "description": "When true, includes unique time series keys in the response.\nWhen false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true.", + "required": false, "schema": { - "type": "string" + "type": "boolean", + "default": true } }, { - "name": "toId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "includeAttributes", + "in": "query", + "description": "When true, includes unique attribute keys in the response.\nWhen false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true.", + "required": false, "schema": { - "type": "string" + "type": "boolean", + "default": true } }, { - "name": "relationType", - "in": "path", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, + "name": "scopes", + "in": "query", + "description": "Filters attribute keys by scope. Only applies when 'includeAttributes' is true.\nWhen not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities,\nserver scope only for other entity types.", + "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE", + "CLIENT_SCOPE" + ] } }, { - "name": "relationTypeGroup", + "name": "includeSamples", "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", + "description": "When true, each key entry includes a 'sample' object with the most recent value and timestamp.\nWhen false, only key names are returned (sample is omitted from JSON).", "required": false, "schema": { - "type": "string" + "type": "boolean", + "default": false } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityDataQuery" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } + "$ref": "#/components/schemas/AvailableEntityKeysV2" } } } @@ -38235,7 +38279,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -38339,157 +38383,14 @@ ] } }, - "/api/v2/relation": { - "post": { - "tags": [ - "entity-relation-controller" - ], - "summary": "Create Relation (saveRelation)", - "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "saveRelation", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityRelation" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityRelation" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid request body", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - }, - "delete": { + "/api/relation": { + "get": { "tags": [ "entity-relation-controller" ], - "summary": "Delete Relation (deleteRelation)", - "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "deleteRelation", + "summary": "Get Relation (getRelation)", + "description": "Returns relation object between two specified entities if present. Otherwise throws exception. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "getRelation", "parameters": [ { "name": "fromId", @@ -38673,32 +38574,34 @@ ] } }, - "/api/customer/entityView/{entityViewId}": { - "delete": { + "/api/relations": { + "post": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Unassign Entity View from customer (unassignEntityViewFromCustomer)", - "description": "Clears assignment of the Entity View to customer. Customer will not be able to query Entity View afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "unassignEntityViewFromCustomer", - "parameters": [ - { - "name": "entityViewId", - "in": "path", - "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Find related entities (findEntityRelationsByQuery)", + "description": "Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info.", + "operationId": "findEntityRelationsByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelationsQuery" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } } } } @@ -38715,7 +38618,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -38817,21 +38720,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/customer/public/entityView/{entityViewId}": { - "post": { + }, + "delete": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Make entity view publicly available (assignEntityViewToPublicCustomer)", - "description": "Entity View will be available for non-authorized (not logged-in) users. This is useful to create dashboards that you plan to share/embed on a publicly available website. However, users that are logged-in and belong to different tenant will not be able to access the entity view.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignEntityViewToPublicCustomer", + "summary": "Delete common relations (deleteRelations)", + "description": "Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "deleteRelations", "parameters": [ { - "name": "entityViewId", - "in": "path", - "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "entityId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" @@ -38840,14 +38750,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityView" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -38861,7 +38764,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -38965,32 +38868,41 @@ ] } }, - "/api/customer/{customerId}/entityView/{entityViewId}": { - "post": { + "/api/relations/from/{fromType}/{fromId}": { + "get": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Assign Entity View to customer (assignEntityViewToCustomer)", - "description": "Creates assignment of the Entity View to customer. Customer will be able to query Entity View afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignEntityViewToCustomer", + "summary": "Get List of Relations (findEntityRelationsByFrom)", + "description": "Returns list of relation objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByFrom", "parameters": [ { - "name": "customerId", + "name": "fromType", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } }, { - "name": "entityViewId", + "name": "fromId", "in": "path", - "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -38999,7 +38911,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } } } } @@ -39016,7 +38931,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -39120,89 +39035,50 @@ ] } }, - "/api/customer/{customerId}/entityViewInfos": { + "/api/relations/from/{fromType}/{fromId}/{relationType}": { "get": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Get Customer Entity View info (getCustomerEntityViewInfos)", - "description": "Returns a page of Entity View info objects assigned to customer. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerEntityViewInfos", + "summary": "Get List of Relations (findEntityRelationsByFromAndRelationType)", + "description": "Returns list of relation objects for the specified entity by the 'from' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByFromAndRelationType", "parameters": [ { - "name": "customerId", + "name": "fromType", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } }, { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "fromId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "relationType", + "in": "path", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", - "required": false, "schema": { "type": "string" } }, { - "name": "textSearch", + "name": "relationTypeGroup", "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", + "description": "A string value representing relation type group. For example, 'COMMON'", "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -39211,7 +39087,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityViewInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } } } } @@ -39332,97 +39211,34 @@ ] } }, - "/api/customer/{customerId}/entityViews": { - "get": { + "/api/relations/info": { + "post": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Get Customer Entity Views (getCustomerEntityViews)", - "description": "Returns a page of Entity View objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerEntityViews", - "parameters": [ - { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type" - ] + "summary": "Find related entity infos (findEntityRelationInfosByQuery)", + "description": "Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelationsQuery" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityView" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelationInfo" + } } } } @@ -39439,7 +39255,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -39543,30 +39359,41 @@ ] } }, - "/api/edge/{edgeId}/entityView/{entityViewId}": { - "post": { + "/api/relations/info/from/{fromType}/{fromId}": { + "get": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Assign entity view to edge (assignEntityViewToEdge)", - "description": "Creates assignment of an existing entity view to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment entity view (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once entity view will be delivered to edge service, it's going to be available for usage on remote edge instance.", - "operationId": "assignEntityViewToEdge", + "summary": "Get List of Relation Infos (findEntityRelationInfosByFrom)", + "description": "Returns list of relation info objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByFrom", "parameters": [ { - "name": "edgeId", + "name": "fromType", "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } }, { - "name": "entityViewId", + "name": "fromId", "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -39575,7 +39402,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelationInfo" + } } } } @@ -39592,7 +39422,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -39694,30 +39524,43 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/relations/info/to/{toType}/{toId}": { + "get": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Unassign entity view from edge (unassignEntityViewFromEdge)", - "description": "Clears assignment of the entity view to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity view (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity view locally.", - "operationId": "unassignEntityViewFromEdge", + "summary": "Get List of Relation Infos (findEntityRelationInfosByTo)", + "description": "Returns list of relation info objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByTo", "parameters": [ { - "name": "edgeId", + "name": "toType", "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } }, { - "name": "entityViewId", + "name": "toId", "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -39726,7 +39569,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelationInfo" + } } } } @@ -39847,89 +39693,41 @@ ] } }, - "/api/edge/{edgeId}/entityViews": { + "/api/relations/to/{toType}/{toId}": { "get": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "getEdgeEntityViews", - "operationId": "getEdgeEntityViews", + "summary": "Get List of Relations (findEntityRelationsByTo)", + "description": "Returns list of relation objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByTo", "parameters": [ { - "name": "edgeId", + "name": "toType", "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } }, { - "name": "pageSize", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", + "name": "toId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "required": false, "schema": { "type": "string" } }, { - "name": "sortOrder", + "name": "relationTypeGroup", "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", "required": false, "schema": { "type": "string" } - }, - { - "name": "startTime", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } } ], "responses": { @@ -39938,7 +39736,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityView" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } } } } @@ -40059,51 +39860,195 @@ ] } }, - "/api/entityView": { - "post": { + "/api/relations/to/{toType}/{toId}/{relationType}": { + "get": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Save or update entity view (saveEntityView)", - "description": "Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Entity View entity.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveEntityView", + "summary": "Get List of Relations (findEntityRelationsByToAndRelationType)", + "description": "Returns list of relation objects for the specified entity by the 'to' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByToAndRelationType", "parameters": [ { - "name": "nameConflictPolicy", - "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", - "required": false, + "name": "toType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" + "type": "string" } }, { - "name": "uniquifySeparator", - "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", - "required": false, + "name": "toId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "string", - "default": "_" + "type": "string" } }, { - "name": "uniquifyStrategy", + "name": "relationType", + "in": "path", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "description": "A string value representing relation type group. For example, 'COMMON'", "required": false, "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" + "type": "string" } } ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/v2/relation": { + "post": { + "tags": [ + "entity-relation-controller" + ], + "summary": "Create Relation (saveRelation)", + "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "saveRelation", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "$ref": "#/components/schemas/EntityRelation" } } }, @@ -40115,7 +40060,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "$ref": "#/components/schemas/EntityRelation" } } } @@ -40234,21 +40179,64 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entityView/info/{entityViewId}": { - "get": { + }, + "delete": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Get Entity View info (getEntityViewInfoById)", - "description": "Fetch the Entity View info object based on the provided Entity View Id. Entity Views Info extends the Entity View with customer title and 'is public' flag. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEntityViewInfoById", + "summary": "Delete Relation (deleteRelation)", + "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "deleteRelation", "parameters": [ { - "name": "entityViewId", - "in": "path", - "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "fromId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fromType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationType", + "in": "query", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "toId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "toType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" @@ -40261,7 +40249,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityViewInfo" + "$ref": "#/components/schemas/EntityRelation" } } } @@ -40382,24 +40370,32 @@ ] } }, - "/api/entityView/types": { - "get": { + "/api/customer/entityView/{entityViewId}": { + "delete": { "tags": [ "entity-view-controller" ], - "summary": "Get Entity View Types (getEntityViewTypes)", - "description": "Returns a set of unique entity view types based on entity views that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEntityViewTypes", + "summary": "Unassign Entity View from customer (unassignEntityViewFromCustomer)", + "description": "Clears assignment of the Entity View to customer. Customer will not be able to query Entity View afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unassignEntityViewFromCustomer", + "parameters": [ + { + "name": "entityViewId", + "in": "path", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitySubtype" - } + "$ref": "#/components/schemas/EntityView" } } } @@ -40520,14 +40516,14 @@ ] } }, - "/api/entityView/{entityViewId}": { - "get": { + "/api/customer/public/entityView/{entityViewId}": { + "post": { "tags": [ "entity-view-controller" ], - "summary": "Get entity view (getEntityViewById)", - "description": "Fetch the EntityView object based on the provided entity view id. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEntityViewById", + "summary": "Make entity view publicly available (assignEntityViewToPublicCustomer)", + "description": "Entity View will be available for non-authorized (not logged-in) users. This is useful to create dashboards that you plan to share/embed on a publicly available website. However, users that are logged-in and belong to different tenant will not be able to access the entity view.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignEntityViewToPublicCustomer", "parameters": [ { "name": "entityViewId", @@ -40562,7 +40558,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -40664,15 +40660,26 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/customer/{customerId}/entityView/{entityViewId}": { + "post": { "tags": [ "entity-view-controller" ], - "summary": "Delete entity view (deleteEntityView)", - "description": "Delete the EntityView object based on the provided entity view id. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteEntityView", + "summary": "Assign Entity View to customer (assignEntityViewToCustomer)", + "description": "Creates assignment of the Entity View to customer. Customer will be able to query Entity View afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignEntityViewToCustomer", "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "entityViewId", "in": "path", @@ -40685,7 +40692,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityView" + } + } + } }, "400": { "description": "Bad Request", @@ -40699,7 +40713,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -40803,34 +40817,98 @@ ] } }, - "/api/entityViews": { - "post": { + "/api/customer/{customerId}/entityViewInfos": { + "get": { "tags": [ "entity-view-controller" ], - "summary": "Find related entity views (findEntityViewsByQuery)", - "description": "Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findEntityViewsByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityViewSearchQuery" - } + "summary": "Get Customer Entity View info (getCustomerEntityViewInfos)", + "description": "Returns a page of Entity View info objects assigned to customer. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerEntityViewInfos", + "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityView" - } + "$ref": "#/components/schemas/PageDataEntityViewInfo" } } } @@ -40847,7 +40925,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -40951,25 +41029,87 @@ ] } }, - "/api/entityViews/list": { + "/api/customer/{customerId}/entityViews": { "get": { "tags": [ "entity-view-controller" ], - "summary": "Get Entity Views By Ids (getEntityViewsByIds)", - "description": "Requested entity views must be owned by tenant or assigned to customer which user is performing the request. ", - "operationId": "getEntityViewsByIds", + "summary": "Get Customer Entity Views (getCustomerEntityViews)", + "description": "Returns a page of Entity View objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerEntityViews", "parameters": [ { - "name": "entityViewIds", + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", "in": "query", - "description": "A list of entity view ids, separated by comma ','", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -40979,10 +41119,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityView" - } + "$ref": "#/components/schemas/PageDataEntityView" } } } @@ -41103,19 +41240,26 @@ ] } }, - "/api/tenant/entityView": { - "get": { + "/api/edge/{edgeId}/entityView/{entityViewId}": { + "post": { "tags": [ "entity-view-controller" ], - "summary": "Get Entity View by name (getTenantEntityViewByName)", - "description": "Fetch the Entity View object based on the tenant id and entity view name. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEntityViewByName", + "summary": "Assign entity view to edge (assignEntityViewToEdge)", + "description": "Creates assignment of an existing entity view to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment entity view (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once entity view will be delivered to edge service, it's going to be available for usage on remote edge instance.", + "operationId": "assignEntityViewToEdge", "parameters": [ { - "name": "entityViewName", - "in": "query", - "description": "Entity View name", + "name": "edgeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityViewId", + "in": "path", "required": true, "schema": { "type": "string" @@ -41145,7 +41289,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -41247,82 +41391,30 @@ "ApiKeyForm": [] } ] - } - }, - "/api/tenant/entityViewInfos": { - "get": { + }, + "delete": { "tags": [ "entity-view-controller" ], - "summary": "Get Tenant Entity Views (getTenantEntityViews)", - "description": "Returns a page of entity views info owned by tenant. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEntityViewInfos", + "summary": "Unassign entity view from edge (unassignEntityViewFromEdge)", + "description": "Clears assignment of the entity view to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity view (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity view locally.", + "operationId": "unassignEntityViewFromEdge", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "edgeId", + "in": "path", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", - "required": false, "schema": { "type": "string" } }, { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", - "required": false, + "name": "entityViewId", + "in": "path", + "required": true, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -41331,7 +41423,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityViewInfo" + "$ref": "#/components/schemas/EntityView" } } } @@ -41452,19 +41544,25 @@ ] } }, - "/api/tenant/entityViews": { + "/api/edge/{edgeId}/entityViews": { "get": { "tags": [ "entity-view-controller" ], - "summary": "Get Tenant Entity Views (getTenantEntityViews)", - "description": "Returns a page of entity views owned by tenant. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEntityViews", + "summary": "getEdgeEntityViews", + "operationId": "getEdgeEntityViews", "parameters": [ + { + "name": "edgeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "pageSize", "in": "query", - "description": "Maximum amount of entities in a one page", "required": true, "schema": { "type": "integer", @@ -41474,7 +41572,6 @@ { "name": "page", "in": "query", - "description": "Sequence number of page starting from 0", "required": true, "schema": { "type": "integer", @@ -41484,7 +41581,6 @@ { "name": "type", "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", "required": false, "schema": { "type": "string" @@ -41493,7 +41589,6 @@ { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", "required": false, "schema": { "type": "string" @@ -41502,28 +41597,35 @@ { "name": "sortProperty", "in": "query", - "description": "Property of entity to sort by", "required": false, "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type" - ] + "type": "string" } }, { "name": "sortOrder", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" + } + }, + { + "name": "startTime", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" } } ], @@ -41654,115 +41756,43 @@ ] } }, - "/api/events/{entityType}/{entityId}": { + "/api/entityView": { "post": { "tags": [ - "event-controller" + "entity-view-controller" ], - "summary": "Get Events by event filter (getEventsByFilter)", - "description": "Returns a page of events for the chosen entity by specifying the event filter. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n# Event Filter Definition\n\n6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. \n\nNote,\n\n * 'server' - string value representing the server name, identifier or ip address where the platform is running;\n * 'errorStr' - the case insensitive 'contains' filter based on error message.\n\n## Error Event Filter\n\n```json\n{\n \"eventType\":\"ERROR\",\n \"server\":\"ip-172-31-24-152\",\n \"method\":\"onClusterEventMsg\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'method' - string value representing the method name when the error happened.\n\n## Lifecycle Event Filter\n\n```json\n{\n \"eventType\":\"LC_EVENT\",\n \"server\":\"ip-172-31-24-152\",\n \"event\":\"STARTED\",\n \"status\":\"Success\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'event' - string value representing the lifecycle event type;\n * 'status' - string value representing status of the lifecycle event.\n\n## Statistics Event Filter\n\n```json\n{\n \"eventType\":\"STATS\",\n \"server\":\"ip-172-31-24-152\",\n \"messagesProcessed\":10,\n \"errorsOccurred\":5\n}\n```\n\n * 'messagesProcessed' - the minimum number of successfully processed messages;\n * 'errorsOccurred' - the minimum number of errors occurred during messages processing.\n\n## Debug Rule Node Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_NODE\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n## Debug Rule Chain Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_CHAIN\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity);\n * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message;\n * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message;\n * 'entityName' - string value representing the entity type;\n * 'relationType' - string value representing the type of message routing;\n * 'entityId' - string value representing the entity id in the event body (originator of the message);\n * 'msgType' - string value representing the message type;\n * 'isError' - boolean value to filter the errors.\n\n## Debug Calculated Field Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_CALCULATED_FIELD\",\n \"server\":\"ip-172-31-24-152\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\",\n \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"arguments\":\"{\n \"x\": {\n \"ts\": 1739432016629,\n \"value\": 20\n },\n \"y\": {\n \"ts\": 1739429717656,\n \"value\": 12\n }\n }\",\n \"result\":\"{\n \"x + y\": 32\n }\",\n}\n```\n\n * 'entityId' - string value representing the entity id in the event body;\n * 'entityType' - string value representing the entity type;\n * 'msgId' - string value representing the message id in the rule engine;\n * 'msgType' - string value representing the message type;\n * 'arguments' - string value representing the arguments that were used in the calculation performed;\n * 'result' - string value representing the result of a calculation;\n * 'isError' - boolean value to filter the errors.\n\n", - "operationId": "getEventsByFilter", + "summary": "Save or update entity view (saveEntityView)", + "description": "Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Entity View entity.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveEntityView", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tenantId", - "in": "query", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The value is not used in searching.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", + "name": "nameConflictPolicy", "in": "query", - "description": "Property of entity to sort by", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", "required": false, "schema": { - "type": "string", - "enum": [ - "ts", - "id" - ] + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" } }, { - "name": "sortOrder", + "name": "uniquifySeparator", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", "required": false, "schema": { "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Events with creation time before it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" + "default": "_" } }, { - "name": "endTime", + "name": "uniquifyStrategy", "in": "query", - "description": "Timestamp. Events with creation time after it won't be queried.", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", "required": false, "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" } } ], @@ -41770,7 +41800,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EventFilter" + "$ref": "#/components/schemas/EntityView" } } }, @@ -41782,7 +41812,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEventInfo" + "$ref": "#/components/schemas/EntityView" } } } @@ -41903,67 +41933,35 @@ ] } }, - "/api/events/{entityType}/{entityId}/clear": { - "post": { + "/api/entityView/info/{entityViewId}": { + "get": { "tags": [ - "event-controller" + "entity-view-controller" ], - "summary": "Clear Events (clearEvents)", - "description": "Clears events by filter for specified entity.", - "operationId": "clearEvents", + "summary": "Get Entity View info (getEntityViewInfoById)", + "description": "Fetch the Entity View info object based on the provided Entity View Id. Entity Views Info extends the Entity View with customer title and 'is public' flag. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewInfoById", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "entityViewId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Events with creation time before it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Events with creation time after it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventFilter" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityViewInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -41977,7 +41975,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -42081,135 +42079,24 @@ ] } }, - "/api/events/{entityType}/{entityId}/{eventType}": { + "/api/entityView/types": { "get": { "tags": [ - "event-controller" - ], - "summary": "Get Events by type (getEventsByType)", - "description": "Returns a page of events for specified entity by specifying event type. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. ", - "operationId": "getEventsByType", - "parameters": [ - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "eventType", - "in": "path", - "description": "A string value representing event type", - "required": true, - "schema": { - "type": "string" - }, - "example": "STATS" - }, - { - "name": "tenantId", - "in": "query", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The value is not used in searching.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ts", - "id" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Events with creation time before it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Events with creation time after it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - } + "entity-view-controller" ], + "summary": "Get Entity View Types (getEntityViewTypes)", + "description": "Returns a set of unique entity view types based on entity views that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEventInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -42330,44 +42217,32 @@ ] } }, - "/api/image": { - "post": { + "/api/entityView/{entityViewId}": { + "get": { "tags": [ - "image-controller" + "entity-view-controller" ], - "summary": "uploadImage", - "operationId": "uploadImage", - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "title": { - "type": "string" - }, - "imageSubType": { - "type": "string" - } - }, - "required": [ - "file" - ] - } + "summary": "Get entity view (getEntityViewById)", + "description": "Fetch the EntityView object based on the provided entity view id. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewById", + "parameters": [ + { + "name": "entityViewId", + "in": "path", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "$ref": "#/components/schemas/EntityView" } } } @@ -42384,7 +42259,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -42486,35 +42361,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/image/import": { - "put": { + }, + "delete": { "tags": [ - "image-controller" + "entity-view-controller" ], - "summary": "importImage", - "operationId": "importImage", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceExportData" - } + "summary": "Delete entity view (deleteEntityView)", + "description": "Delete the EntityView object based on the provided entity view id. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteEntityView", + "parameters": [ + { + "name": "entityViewId", + "in": "path", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TbResourceInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -42632,101 +42500,34 @@ ] } }, - "/api/images": { - "get": { + "/api/entityViews": { + "post": { "tags": [ - "image-controller" + "entity-view-controller" ], - "summary": "getImages", - "operationId": "getImages", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "imageSubType", - "in": "query", - "description": "A string value representing resource sub-type.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "IMAGE", - "SCADA_SYMBOL" - ] - } - }, - { - "name": "includeSystemImages", - "in": "query", - "description": "Use 'true' to include system images. Disabled by default. Ignored for requests by users with system administrator authority.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the resource title.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "title", - "resourceType", - "tenantId" - ] + "summary": "Find related entity views (findEntityViewsByQuery)", + "description": "Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findEntityViewsByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityViewSearchQuery" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataTbResourceInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityView" + } } } } @@ -42743,7 +42544,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -42847,36 +42648,25 @@ ] } }, - "/api/images/public/{publicResourceKey}": { + "/api/entityViews/list": { "get": { "tags": [ - "image-controller" + "entity-view-controller" ], - "summary": "downloadPublicImage", - "operationId": "downloadPublicImage", + "summary": "Get Entity Views By Ids (getEntityViewsByIds)", + "description": "Requested entity views must be owned by tenant or assigned to customer which user is performing the request. ", + "operationId": "getEntityViewsByIds", "parameters": [ { - "name": "publicResourceKey", - "in": "path", + "name": "entityViewIds", + "in": "query", + "description": "A list of entity view ids, separated by comma ','", "required": true, "schema": { - "type": "string" - } - }, - { - "name": "If-None-Match", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "Accept-Encoding", - "in": "header", - "required": false, - "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -42884,10 +42674,12 @@ "200": { "description": "OK", "content": { - "image/*": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityView" + } } } } @@ -43008,61 +42800,32 @@ ] } }, - "/api/images/{type}/{key}": { + "/api/tenant/entityView": { "get": { "tags": [ - "image-controller" + "entity-view-controller" ], - "summary": "downloadImage", - "operationId": "downloadImage", + "summary": "Get Entity View by name (getTenantEntityViewByName)", + "description": "Fetch the Entity View object based on the tenant id and entity view name. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEntityViewByName", "parameters": [ { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", - "required": true, - "schema": { - "type": "string", - "enum": [ - "tenant", - "system" - ] - } - }, - { - "name": "key", - "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "name": "entityViewName", + "in": "query", + "description": "Entity View name", "required": true, "schema": { "type": "string" } - }, - { - "name": "If-None-Match", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "Accept-Encoding", - "in": "header", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { "200": { "description": "OK", "content": { - "image/*": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/EntityView" } } } @@ -43181,62 +42944,1996 @@ "ApiKeyForm": [] } ] - }, - "put": { + } + }, + "/api/tenant/entityViewInfos": { + "get": { "tags": [ - "image-controller" + "entity-view-controller" ], - "summary": "updateImage", - "operationId": "updateImage", + "summary": "Get Tenant Entity Views (getTenantEntityViews)", + "description": "Returns a page of entity views info owned by tenant. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEntityViewInfos", "parameters": [ { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, "schema": { "type": "string", "enum": [ - "tenant", - "system" + "createdTime", + "name", + "type", + "customerTitle" ] } }, { - "name": "key", - "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", - "required": true, + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - }, - "required": [ - "file" - ] - } - } - } - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "$ref": "#/components/schemas/PageDataEntityViewInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/tenant/entityViews": { + "get": { + "tags": [ + "entity-view-controller" + ], + "summary": "Get Tenant Entity Views (getTenantEntityViews)", + "description": "Returns a page of entity views owned by tenant. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEntityViews", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityView" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/events/{entityType}/{entityId}": { + "post": { + "tags": [ + "event-controller" + ], + "summary": "Get Events by event filter (getEventsByFilter)", + "description": "Returns a page of events for the chosen entity by specifying the event filter. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n# Event Filter Definition\n\n6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. \n\nNote,\n\n * 'server' - string value representing the server name, identifier or ip address where the platform is running;\n * 'errorStr' - the case insensitive 'contains' filter based on error message.\n\n## Error Event Filter\n\n```json\n{\n \"eventType\":\"ERROR\",\n \"server\":\"ip-172-31-24-152\",\n \"method\":\"onClusterEventMsg\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'method' - string value representing the method name when the error happened.\n\n## Lifecycle Event Filter\n\n```json\n{\n \"eventType\":\"LC_EVENT\",\n \"server\":\"ip-172-31-24-152\",\n \"event\":\"STARTED\",\n \"status\":\"Success\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'event' - string value representing the lifecycle event type;\n * 'status' - string value representing status of the lifecycle event.\n\n## Statistics Event Filter\n\n```json\n{\n \"eventType\":\"STATS\",\n \"server\":\"ip-172-31-24-152\",\n \"messagesProcessed\":10,\n \"errorsOccurred\":5\n}\n```\n\n * 'messagesProcessed' - the minimum number of successfully processed messages;\n * 'errorsOccurred' - the minimum number of errors occurred during messages processing.\n\n## Debug Rule Node Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_NODE\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n## Debug Rule Chain Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_CHAIN\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity);\n * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message;\n * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message;\n * 'entityName' - string value representing the entity type;\n * 'relationType' - string value representing the type of message routing;\n * 'entityId' - string value representing the entity id in the event body (originator of the message);\n * 'msgType' - string value representing the message type;\n * 'isError' - boolean value to filter the errors.\n\n## Debug Calculated Field Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_CALCULATED_FIELD\",\n \"server\":\"ip-172-31-24-152\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\",\n \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"arguments\":\"{\n \"x\": {\n \"ts\": 1739432016629,\n \"value\": 20\n },\n \"y\": {\n \"ts\": 1739429717656,\n \"value\": 12\n }\n }\",\n \"result\":\"{\n \"x + y\": 32\n }\",\n}\n```\n\n * 'entityId' - string value representing the entity id in the event body;\n * 'entityType' - string value representing the entity type;\n * 'msgId' - string value representing the message id in the rule engine;\n * 'msgType' - string value representing the message type;\n * 'arguments' - string value representing the arguments that were used in the calculation performed;\n * 'result' - string value representing the result of a calculation;\n * 'isError' - boolean value to filter the errors.\n\n", + "operationId": "getEventsByFilter", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tenantId", + "in": "query", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The value is not used in searching.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ts", + "id" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "Timestamp. Events with creation time before it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Events with creation time after it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventFilter" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEventInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid request body", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/events/{entityType}/{entityId}/clear": { + "post": { + "tags": [ + "event-controller" + ], + "summary": "Clear Events (clearEvents)", + "description": "Clears events by filter for specified entity.", + "operationId": "clearEvents", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "startTime", + "in": "query", + "description": "Timestamp. Events with creation time before it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Events with creation time after it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventFilter" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid request body", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/events/{entityType}/{entityId}/{eventType}": { + "get": { + "tags": [ + "event-controller" + ], + "summary": "Get Events by type (getEventsByType)", + "description": "Returns a page of events for specified entity by specifying event type. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. ", + "operationId": "getEventsByType", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "eventType", + "in": "path", + "description": "A string value representing event type", + "required": true, + "schema": { + "type": "string" + }, + "example": "STATS" + }, + { + "name": "tenantId", + "in": "query", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The value is not used in searching.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ts", + "id" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "Timestamp. Events with creation time before it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Events with creation time after it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEventInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/image": { + "post": { + "tags": [ + "image-controller" + ], + "summary": "uploadImage", + "operationId": "uploadImage", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + }, + "title": { + "type": "string" + }, + "imageSubType": { + "type": "string" + } + }, + "required": [ + "file" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid request body", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/image/import": { + "put": { + "tags": [ + "image-controller" + ], + "summary": "importImage", + "operationId": "importImage", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceExportData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/images": { + "get": { + "tags": [ + "image-controller" + ], + "summary": "getImages", + "operationId": "getImages", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "imageSubType", + "in": "query", + "description": "A string value representing resource sub-type.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "IMAGE", + "SCADA_SYMBOL" + ] + } + }, + { + "name": "includeSystemImages", + "in": "query", + "description": "Use 'true' to include system images. Disabled by default. Ignored for requests by users with system administrator authority.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the resource title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "title", + "resourceType", + "tenantId" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataTbResourceInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/images/public/{publicResourceKey}": { + "get": { + "tags": [ + "image-controller" + ], + "summary": "downloadPublicImage", + "operationId": "downloadPublicImage", + "parameters": [ + { + "name": "publicResourceKey", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/images/{type}/{key}": { + "get": { + "tags": [ + "image-controller" + ], + "summary": "downloadImage", + "operationId": "downloadImage", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "type": "string", + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + }, + "put": { + "tags": [ + "image-controller" + ], + "summary": "updateImage", + "operationId": "updateImage", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "type": "string", + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + }, + "required": [ + "file" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -45256,7 +46953,9 @@ "application/json": { "schema": { "properties": { - "refreshToken": {} + "refreshToken": { + + } } } } @@ -45446,7 +47145,9 @@ "application/json": { "schema": { "type": "object", - "additionalProperties": {} + "additionalProperties": { + + } } } }, @@ -80563,22 +82264,31 @@ }, "AdminSettingsId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ADMIN_SETTINGS" - ], - "example": "ADMIN_SETTINGS" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "ADMIN_SETTINGS" + ], + "example": "ADMIN_SETTINGS", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -80787,22 +82497,31 @@ }, "AiModelId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "Entity type of the AI model", - "enum": [ - "AI_MODEL" - ], - "example": "AI_MODEL" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "Entity type of the AI model", + "enum": [ + "AI_MODEL" + ], + "example": "AI_MODEL", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -81742,22 +83461,31 @@ }, "AlarmId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ALARM" - ], - "example": "ALARM" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "ALARM" + ], + "example": "ALARM", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -82711,22 +84439,31 @@ }, "ApiKeyId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "API_KEY" - ], - "example": "API_KEY" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "API_KEY" + ], + "example": "API_KEY", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -82850,6 +84587,38 @@ } ] }, + "ApiUsageStateId": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "API_USAGE_STATE" + ], + "example": "API_USAGE_STATE", + "readOnly": true + } + } + } + ], + "required": [ + "entityType", + "id" + ] + }, "ApiUsageStateValue": { "type": "string", "enum": [ @@ -82962,22 +84731,31 @@ }, "AssetId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ASSET" - ], - "example": "ASSET" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "ASSET" + ], + "example": "ASSET", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -83128,22 +84906,31 @@ }, "AssetProfileId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ASSET_PROFILE" - ], - "example": "ASSET_PROFILE" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "ASSET_PROFILE" + ], + "example": "ASSET_PROFILE", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -83452,8 +85239,7 @@ }, "entityId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Entity id", - "readOnly": true + "description": "JSON object with Entity id" }, "entityName": { "type": "string", @@ -84191,22 +85977,31 @@ }, "CalculatedFieldId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "CALCULATED_FIELD" - ], - "example": "CALCULATED_FIELD" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "CALCULATED_FIELD" + ], + "example": "CALCULATED_FIELD", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -84858,22 +86653,31 @@ }, "CustomerId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "CUSTOMER" - ], - "example": "CUSTOMER" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "CUSTOMER" + ], + "example": "CUSTOMER", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -84982,22 +86786,31 @@ }, "DashboardId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "DASHBOARD" - ], - "example": "DASHBOARD" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "DASHBOARD" + ], + "example": "DASHBOARD", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -85900,22 +87713,31 @@ }, "DeviceId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "DEVICE" - ], - "example": "DEVICE" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "DEVICE" + ], + "example": "DEVICE", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -86202,22 +88024,31 @@ }, "DeviceProfileId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "DEVICE_PROFILE" - ], - "example": "DEVICE_PROFILE" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "DEVICE_PROFILE" + ], + "example": "DEVICE_PROFILE", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -86488,18 +88319,31 @@ }, "DomainId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "example": "DEVICE" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "DOMAIN" + ], + "example": "DOMAIN", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -87054,22 +88898,31 @@ }, "EdgeId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "EDGE" - ], - "example": "EDGE" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "EDGE" + ], + "example": "EDGE", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -87744,6 +89597,47 @@ }, "EntityId": { "type": "object", + "discriminator": { + "propertyName": "entityType", + "mapping": { + "ADMIN_SETTINGS": "#/components/schemas/AdminSettingsId", + "AI_MODEL": "#/components/schemas/AiModelId", + "ALARM": "#/components/schemas/AlarmId", + "API_KEY": "#/components/schemas/ApiKeyId", + "API_USAGE_STATE": "#/components/schemas/ApiUsageStateId", + "ASSET": "#/components/schemas/AssetId", + "ASSET_PROFILE": "#/components/schemas/AssetProfileId", + "CALCULATED_FIELD": "#/components/schemas/CalculatedFieldId", + "CUSTOMER": "#/components/schemas/CustomerId", + "DASHBOARD": "#/components/schemas/DashboardId", + "DEVICE": "#/components/schemas/DeviceId", + "DEVICE_PROFILE": "#/components/schemas/DeviceProfileId", + "DOMAIN": "#/components/schemas/DomainId", + "EDGE": "#/components/schemas/EdgeId", + "ENTITY_VIEW": "#/components/schemas/EntityViewId", + "JOB": "#/components/schemas/JobId", + "MOBILE_APP": "#/components/schemas/MobileAppId", + "MOBILE_APP_BUNDLE": "#/components/schemas/MobileAppBundleId", + "NOTIFICATION": "#/components/schemas/NotificationId", + "NOTIFICATION_REQUEST": "#/components/schemas/NotificationRequestId", + "NOTIFICATION_RULE": "#/components/schemas/NotificationRuleId", + "NOTIFICATION_TARGET": "#/components/schemas/NotificationTargetId", + "NOTIFICATION_TEMPLATE": "#/components/schemas/NotificationTemplateId", + "OAUTH2_CLIENT": "#/components/schemas/OAuth2ClientId", + "OTA_PACKAGE": "#/components/schemas/OtaPackageId", + "QUEUE": "#/components/schemas/QueueId", + "QUEUE_STATS": "#/components/schemas/QueueStatsId", + "RPC": "#/components/schemas/RpcId", + "RULE_CHAIN": "#/components/schemas/RuleChainId", + "RULE_NODE": "#/components/schemas/RuleNodeId", + "TB_RESOURCE": "#/components/schemas/TbResourceId", + "TENANT": "#/components/schemas/TenantId", + "TENANT_PROFILE": "#/components/schemas/TenantProfileId", + "USER": "#/components/schemas/UserId", + "WIDGETS_BUNDLE": "#/components/schemas/WidgetsBundleId", + "WIDGET_TYPE": "#/components/schemas/WidgetTypeId" + } + }, "properties": { "id": { "type": "string", @@ -88249,22 +90143,31 @@ }, "EntityViewId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ENTITY_VIEW" - ], - "example": "ENTITY_VIEW" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "ENTITY_VIEW" + ], + "example": "ENTITY_VIEW", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -88491,8 +90394,7 @@ ], "description": "Escalated notification rule recipients configuration", "required": [ - "escalationTable", - "triggerType" + "escalationTable" ] }, "EventFilter": { @@ -88567,8 +90469,7 @@ }, "entityId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Entity Id for which event is created.", - "readOnly": true + "description": "JSON object with Entity Id for which event is created." }, "body": { "$ref": "#/components/schemas/JsonNode" @@ -88626,13 +90527,13 @@ "oauthEnabled": { "type": "boolean" }, - "twoFaEnabled": { + "notificationEnabled": { "type": "boolean" }, - "emailEnabled": { + "twoFaEnabled": { "type": "boolean" }, - "notificationEnabled": { + "emailEnabled": { "type": "boolean" } } @@ -89119,7 +91020,9 @@ "HasIdObject": { "type": "object", "properties": { - "id": {} + "id": { + + } } }, "HomeDashboardInfo": { @@ -89238,22 +91141,31 @@ }, "JobId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "JOB" - ], - "example": "JOB" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "JOB" + ], + "example": "JOB", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -89341,7 +91253,9 @@ }, "JsonNode": { "description": "A value representing the any type (object or primitive)", - "example": {} + "example": { + + } }, "JsonTransportPayloadConfiguration": { "allOf": [ @@ -89962,7 +91876,9 @@ "useOldApi": { "type": "boolean" }, - "id": {}, + "id": { + + }, "title": { "type": "string" }, @@ -90212,18 +92128,31 @@ }, "MobileAppBundleId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "example": "DEVICE" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "MOBILE_APP_BUNDLE" + ], + "example": "MOBILE_APP_BUNDLE", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -90329,18 +92258,31 @@ }, "MobileAppId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "example": "DEVICE" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "MOBILE_APP" + ], + "example": "MOBILE_APP", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -90751,22 +92693,31 @@ }, "NotificationId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION" - ], - "example": "NOTIFICATION" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "NOTIFICATION" + ], + "example": "NOTIFICATION", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -90874,22 +92825,31 @@ }, "NotificationRequestId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION_REQUEST" - ], - "example": "NOTIFICATION_REQUEST" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "NOTIFICATION_REQUEST" + ], + "example": "NOTIFICATION_REQUEST", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -91097,22 +93057,31 @@ }, "NotificationRuleId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION_RULE" - ], - "example": "NOTIFICATION_RULE" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "NOTIFICATION_RULE" + ], + "example": "NOTIFICATION_RULE", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -91199,10 +93168,7 @@ "triggerType": { "$ref": "#/components/schemas/NotificationRuleTriggerType" } - }, - "required": [ - "triggerType" - ] + } }, "NotificationRuleTriggerConfig": { "type": "object", @@ -91327,59 +93293,42 @@ ] }, "NotificationTargetExportData": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/components/schemas/ExportableEntity" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType" - }, - "relations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } - }, - "attributes": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttributeExportData" - } - }, - "description": "Map of attributes where key is the scope of attributes and value is the list of attributes for that scope" - }, - "calculatedFields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CalculatedField" - } + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" } - }, + ], "required": [ "entityType" ] }, "NotificationTargetId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION_TARGET" - ], - "example": "NOTIFICATION_TARGET" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "NOTIFICATION_TARGET" + ], + "example": "NOTIFICATION_TARGET", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -91445,22 +93394,31 @@ }, "NotificationTemplateId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION_TEMPLATE" - ], - "example": "NOTIFICATION_TEMPLATE" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "NOTIFICATION_TEMPLATE" + ], + "example": "NOTIFICATION_TEMPLATE", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -91672,18 +93630,31 @@ }, "OAuth2ClientId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "example": "DEVICE" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "OAUTH2_CLIENT" + ], + "example": "OAUTH2_CLIENT", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -92261,7 +94232,7 @@ "version": { "type": "string", "description": "OTA Package version.", - "example": 1.0 + "example": 1 }, "tag": { "type": "string", @@ -92368,22 +94339,31 @@ }, "OtaPackageId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "OTA_PACKAGE" - ], - "example": "OTA_PACKAGE" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "OTA_PACKAGE" + ], + "example": "OTA_PACKAGE", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -92425,7 +94405,7 @@ "version": { "type": "string", "description": "OTA Package version.", - "example": 1.0 + "example": 1 }, "tag": { "type": "string", @@ -92568,7 +94548,9 @@ "type" ] }, - "OutputStrategy": {}, + "OutputStrategy": { + + }, "PSKLwM2MBootstrapServerCredential": { "allOf": [ { @@ -94560,22 +96542,31 @@ }, "QueueId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "QUEUE" - ], - "example": "QUEUE" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "QUEUE" + ], + "example": "QUEUE", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -94607,22 +96598,31 @@ }, "QueueStatsId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "QUEUE_STATS" - ], - "example": "QUEUE_STATS" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "QUEUE_STATS" + ], + "example": "QUEUE_STATS", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -95244,22 +97244,31 @@ }, "RpcId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "RPC" - ], - "example": "RPC" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "RPC" + ], + "example": "RPC", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -95446,22 +97455,31 @@ }, "RuleChainId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "RULE_CHAIN" - ], - "example": "RULE_CHAIN" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "RULE_CHAIN" + ], + "example": "RULE_CHAIN", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -95801,22 +97819,31 @@ }, "RuleNodeId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "RULE_NODE" - ], - "example": "RULE_NODE" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "RULE_NODE" + ], + "example": "RULE_NODE", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -95877,7 +97904,7 @@ "version": { "type": "string", "description": "OTA Package version.", - "example": 1.0 + "example": 1 }, "tag": { "type": "string", @@ -96826,7 +98853,9 @@ } } }, - "SystemLevelUsersFilter": {}, + "SystemLevelUsersFilter": { + + }, "TaskProcessingFailureNotificationRuleTriggerConfig": { "allOf": [ { @@ -97037,11 +99066,11 @@ "public": { "type": "boolean" }, - "link": { + "publicLink": { "type": "string", "readOnly": true }, - "publicLink": { + "link": { "type": "string", "readOnly": true } @@ -97076,22 +99105,31 @@ }, "TbResourceId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "TB_RESOURCE" - ], - "example": "TB_RESOURCE" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "TB_RESOURCE" + ], + "example": "TB_RESOURCE", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -97163,11 +99201,11 @@ "public": { "type": "boolean" }, - "link": { + "publicLink": { "type": "string", "readOnly": true }, - "publicLink": { + "link": { "type": "string", "readOnly": true } @@ -97459,22 +99497,31 @@ }, "TenantId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "TENANT" - ], - "example": "TENANT" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "TENANT" + ], + "example": "TENANT", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -97658,22 +99705,31 @@ }, "TenantProfileId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "TENANT_PROFILE" - ], - "example": "TENANT_PROFILE" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "TENANT_PROFILE" + ], + "example": "TENANT_PROFILE", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -97765,23 +99821,7 @@ }, "ThingsboardErrorCode": { "description": "Platform error code", - "enum": [ - 2, - 10, - 11, - 15, - 20, - 30, - 31, - 32, - 33, - 34, - 35, - 40, - 41, - 45, - 46 - ] + "enum": [2, 10, 11, 15, 20, 30, 31, 32, 33, 34, 35, 40, 41, 45, 46] }, "ThingsboardErrorResponse": { "properties": { @@ -98444,22 +100484,31 @@ }, "UserId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "USER" - ], - "example": "USER" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "USER" + ], + "example": "USER", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -98598,7 +100647,9 @@ "type" ] }, - "Version": {}, + "Version": { + + }, "VersionCreateConfig": { "type": "object", "properties": { @@ -99012,22 +101063,31 @@ }, "WidgetTypeId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "WIDGET_TYPE" - ], - "example": "WIDGET_TYPE" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "WIDGET_TYPE" + ], + "example": "WIDGET_TYPE", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -99200,22 +101260,31 @@ }, "WidgetsBundleId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "WIDGETS_BUNDLE" - ], - "example": "WIDGETS_BUNDLE" + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType", + "description": "string", + "enum": [ + "WIDGETS_BUNDLE" + ], + "example": "WIDGETS_BUNDLE", + "readOnly": true + } + } } - }, + ], "required": [ "entityType", "id" @@ -99393,10 +101462,10 @@ }, "ApiKeyForm": { "type": "apiKey", - "description": "Enter the API key value with 'ApiKey' prefix in format: **ApiKey **\n\nExample: **ApiKey tb_5te51SkLRYpjGrujUGwqkjFvooWBlQpVe2An2Dr3w13wjfxDW**\n\n
**NOTE**: Use only ONE authentication method at a time. If both are authorized, JWT auth takes the priority.
\n", + "description": "Enter the API key value with 'ApiKey' prefix in format: **ApiKey \u003Cyour_api_key_value\u003E**\n\nExample: **ApiKey tb_5te51SkLRYpjGrujUGwqkjFvooWBlQpVe2An2Dr3w13wjfxDW**\n\n\u003Cbr\u003E**NOTE**: Use only ONE authentication method at a time. If both are authorized, JWT auth takes the priority.\u003Cbr\u003E\n", "name": "X-Authorization", "in": "header" } } } -} +} \ No newline at end of file diff --git a/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java b/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java index 88525735..7d9b3418 100644 --- a/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java +++ b/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java @@ -25174,6 +25174,157 @@ private HttpRequest.Builder getDefaultTenantProfileInfoRequestBuilder(Map headers) throws ApiException { + ApiResponse localVarResponse = getDeviceAttributesWithHttpInfo(deviceToken, clientKeys, sharedKeys, headers); + return localVarResponse.getData(); + } + + /** + * Get attributes (getDeviceAttributes) + * Returns all attributes that belong to device. Use optional 'clientKeys' and/or 'sharedKeys' parameter to return specific attributes. Example of the result: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param clientKeys Comma separated key names for attribute with client scope (required) + * @param sharedKeys Comma separated key names for attribute with shared scope (required) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getDeviceAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String clientKeys, @javax.annotation.Nonnull String sharedKeys) throws ApiException { + return getDeviceAttributesWithHttpInfo(deviceToken, clientKeys, sharedKeys, null); + } + + /** + * Get attributes (getDeviceAttributes) + * Returns all attributes that belong to device. Use optional 'clientKeys' and/or 'sharedKeys' parameter to return specific attributes. Example of the result: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param clientKeys Comma separated key names for attribute with client scope (required) + * @param sharedKeys Comma separated key names for attribute with shared scope (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getDeviceAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String clientKeys, @javax.annotation.Nonnull String sharedKeys, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDeviceAttributesRequestBuilder(deviceToken, clientKeys, sharedKeys, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getDeviceAttributes", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getDeviceAttributesRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String clientKeys, @javax.annotation.Nonnull String sharedKeys, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling getDeviceAttributes"); + } + // verify the required parameter 'clientKeys' is set + if (clientKeys == null) { + throw new ApiException(400, "Missing the required parameter 'clientKeys' when calling getDeviceAttributes"); + } + // verify the required parameter 'sharedKeys' is set + if (sharedKeys == null) { + throw new ApiException(400, "Missing the required parameter 'sharedKeys' when calling getDeviceAttributes"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/attributes" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "clientKeys"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("clientKeys", clientKeys)); + localVarQueryParameterBaseName = "sharedKeys"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sharedKeys", sharedKeys)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get Device (getDeviceById) * Fetch the Device object based on the provided Device Id. If the user has the authority of 'TENANT_ADMIN', the server checks that the device is owned by the same tenant. If the user has the authority of 'CUSTOMER_USER', the server checks that the device is assigned to the same customer. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -30219,6 +30370,169 @@ private HttpRequest.Builder getFeaturesInfoRequestBuilder(Map he return localVarRequestBuilder; } + /** + * Get Device Firmware (getFirmware) + * Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the firmware, corresponds to the value of 'fw_title' attribute. (required) + * @param version Version of the firmware, corresponds to the value of 'fw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @return String + * @throws ApiException if fails to make API call + */ + public String getFirmware(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk) throws ApiException { + return getFirmware(deviceToken, title, version, size, chunk, null); + } + + /** + * Get Device Firmware (getFirmware) + * Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the firmware, corresponds to the value of 'fw_title' attribute. (required) + * @param version Version of the firmware, corresponds to the value of 'fw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String getFirmware(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { + ApiResponse localVarResponse = getFirmwareWithHttpInfo(deviceToken, title, version, size, chunk, headers); + return localVarResponse.getData(); + } + + /** + * Get Device Firmware (getFirmware) + * Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the firmware, corresponds to the value of 'fw_title' attribute. (required) + * @param version Version of the firmware, corresponds to the value of 'fw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getFirmwareWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk) throws ApiException { + return getFirmwareWithHttpInfo(deviceToken, title, version, size, chunk, null); + } + + /** + * Get Device Firmware (getFirmware) + * Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the firmware, corresponds to the value of 'fw_title' attribute. (required) + * @param version Version of the firmware, corresponds to the value of 'fw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getFirmwareWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getFirmwareRequestBuilder(deviceToken, title, version, size, chunk, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getFirmware", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getFirmwareRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling getFirmware"); + } + // verify the required parameter 'title' is set + if (title == null) { + throw new ApiException(400, "Missing the required parameter 'title' when calling getFirmware"); + } + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException(400, "Missing the required parameter 'version' when calling getFirmware"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/firmware" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "title"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("title", title)); + localVarQueryParameterBaseName = "version"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("version", version)); + localVarQueryParameterBaseName = "size"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("size", size)); + localVarQueryParameterBaseName = "chunk"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("chunk", chunk)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get user settings (getGeneralUserSettings) * Fetch the User settings based on authorized user. @@ -39476,6 +39790,169 @@ private HttpRequest.Builder getShortCustomerInfoByIdRequestBuilder(@javax.annota return localVarRequestBuilder; } + /** + * Get Device Software (getSoftware) + * Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the software, corresponds to the value of 'sw_title' attribute. (required) + * @param version Version of the software, corresponds to the value of 'sw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @return String + * @throws ApiException if fails to make API call + */ + public String getSoftware(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk) throws ApiException { + return getSoftware(deviceToken, title, version, size, chunk, null); + } + + /** + * Get Device Software (getSoftware) + * Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the software, corresponds to the value of 'sw_title' attribute. (required) + * @param version Version of the software, corresponds to the value of 'sw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String getSoftware(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { + ApiResponse localVarResponse = getSoftwareWithHttpInfo(deviceToken, title, version, size, chunk, headers); + return localVarResponse.getData(); + } + + /** + * Get Device Software (getSoftware) + * Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the software, corresponds to the value of 'sw_title' attribute. (required) + * @param version Version of the software, corresponds to the value of 'sw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getSoftwareWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk) throws ApiException { + return getSoftwareWithHttpInfo(deviceToken, title, version, size, chunk, null); + } + + /** + * Get Device Software (getSoftware) + * Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the software, corresponds to the value of 'sw_title' attribute. (required) + * @param version Version of the software, corresponds to the value of 'sw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getSoftwareWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getSoftwareRequestBuilder(deviceToken, title, version, size, chunk, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getSoftware", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getSoftwareRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling getSoftware"); + } + // verify the required parameter 'title' is set + if (title == null) { + throw new ApiException(400, "Missing the required parameter 'title' when calling getSoftware"); + } + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException(400, "Missing the required parameter 'version' when calling getSoftware"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/software" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "title"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("title", title)); + localVarQueryParameterBaseName = "version"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("version", version)); + localVarQueryParameterBaseName = "size"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("size", size)); + localVarQueryParameterBaseName = "chunk"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("chunk", chunk)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get system info (getSystemInfo) * Get main information about system. Available for users with 'SYS_ADMIN' authority. @@ -51798,6 +52275,387 @@ private HttpRequest.Builder markNotificationAsReadRequestBuilder(@javax.annotati return localVarRequestBuilder; } + /** + * Post attributes (postDeviceAttributes) + * Post client attribute updates on behalf of device. Example of the request: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body JSON with attribute key-value pairs. See API call description for example. (required) + * @return String + * @throws ApiException if fails to make API call + */ + public String postDeviceAttributes(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { + return postDeviceAttributes(deviceToken, body, null); + } + + /** + * Post attributes (postDeviceAttributes) + * Post client attribute updates on behalf of device. Example of the request: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body JSON with attribute key-value pairs. See API call description for example. (required) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String postDeviceAttributes(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = postDeviceAttributesWithHttpInfo(deviceToken, body, headers); + return localVarResponse.getData(); + } + + /** + * Post attributes (postDeviceAttributes) + * Post client attribute updates on behalf of device. Example of the request: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body JSON with attribute key-value pairs. See API call description for example. (required) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse postDeviceAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { + return postDeviceAttributesWithHttpInfo(deviceToken, body, null); + } + + /** + * Post attributes (postDeviceAttributes) + * Post client attribute updates on behalf of device. Example of the request: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body JSON with attribute key-value pairs. See API call description for example. (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse postDeviceAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = postDeviceAttributesRequestBuilder(deviceToken, body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("postDeviceAttributes", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder postDeviceAttributesRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling postDeviceAttributes"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling postDeviceAttributes"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/attributes" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Send the RPC command (postRpcRequest) + * Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body The RPC request JSON (required) + * @return String + * @throws ApiException if fails to make API call + */ + public String postRpcRequest(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { + return postRpcRequest(deviceToken, body, null); + } + + /** + * Send the RPC command (postRpcRequest) + * Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body The RPC request JSON (required) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String postRpcRequest(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = postRpcRequestWithHttpInfo(deviceToken, body, headers); + return localVarResponse.getData(); + } + + /** + * Send the RPC command (postRpcRequest) + * Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body The RPC request JSON (required) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse postRpcRequestWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { + return postRpcRequestWithHttpInfo(deviceToken, body, null); + } + + /** + * Send the RPC command (postRpcRequest) + * Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body The RPC request JSON (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse postRpcRequestWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = postRpcRequestRequestBuilder(deviceToken, body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("postRpcRequest", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder postRpcRequestRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling postRpcRequest"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling postRpcRequest"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/rpc" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Post time series data (postTelemetry) + * Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (required) + * @return String + * @throws ApiException if fails to make API call + */ + public String postTelemetry(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { + return postTelemetry(deviceToken, body, null); + } + + /** + * Post time series data (postTelemetry) + * Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (required) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String postTelemetry(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = postTelemetryWithHttpInfo(deviceToken, body, headers); + return localVarResponse.getData(); + } + + /** + * Post time series data (postTelemetry) + * Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (required) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse postTelemetryWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { + return postTelemetryWithHttpInfo(deviceToken, body, null); + } + + /** + * Post time series data (postTelemetry) + * Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse postTelemetryWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = postTelemetryRequestBuilder(deviceToken, body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("postTelemetry", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder postTelemetryRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling postTelemetry"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling postTelemetry"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/telemetry" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Import the bulk of assets (processAssetsBulkImport) * There's an ability to import the bulk of assets using the only .csv file. @@ -51922,50 +52780,173 @@ private HttpRequest.Builder processAssetsBulkImportRequestBuilder(@javax.annotat } /** - * Import the bulk of devices (processDevicesBulkImport) - * There's an ability to import the bulk of devices using the only .csv file. Available for users with 'TENANT_ADMIN' authority. + * Import the bulk of devices (processDevicesBulkImport) + * There's an ability to import the bulk of devices using the only .csv file. Available for users with 'TENANT_ADMIN' authority. + * @param bulkImportRequest (required) + * @return BulkImportResultDevice + * @throws ApiException if fails to make API call + */ + public BulkImportResultDevice processDevicesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { + return processDevicesBulkImport(bulkImportRequest, null); + } + + /** + * Import the bulk of devices (processDevicesBulkImport) + * There's an ability to import the bulk of devices using the only .csv file. Available for users with 'TENANT_ADMIN' authority. + * @param bulkImportRequest (required) + * @param headers Optional headers to include in the request + * @return BulkImportResultDevice + * @throws ApiException if fails to make API call + */ + public BulkImportResultDevice processDevicesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + ApiResponse localVarResponse = processDevicesBulkImportWithHttpInfo(bulkImportRequest, headers); + return localVarResponse.getData(); + } + + /** + * Import the bulk of devices (processDevicesBulkImport) + * There's an ability to import the bulk of devices using the only .csv file. Available for users with 'TENANT_ADMIN' authority. + * @param bulkImportRequest (required) + * @return ApiResponse<BulkImportResultDevice> + * @throws ApiException if fails to make API call + */ + public ApiResponse processDevicesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { + return processDevicesBulkImportWithHttpInfo(bulkImportRequest, null); + } + + /** + * Import the bulk of devices (processDevicesBulkImport) + * There's an ability to import the bulk of devices using the only .csv file. Available for users with 'TENANT_ADMIN' authority. + * @param bulkImportRequest (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<BulkImportResultDevice> + * @throws ApiException if fails to make API call + */ + public ApiResponse processDevicesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = processDevicesBulkImportRequestBuilder(bulkImportRequest, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("processDevicesBulkImport", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + BulkImportResultDevice responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder processDevicesBulkImportRequestBuilder(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + // verify the required parameter 'bulkImportRequest' is set + if (bulkImportRequest == null) { + throw new ApiException(400, "Missing the required parameter 'bulkImportRequest' when calling processDevicesBulkImport"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/device/bulk_import"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(bulkImportRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Import the bulk of edges (processEdgesBulkImport) + * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' authority. * @param bulkImportRequest (required) - * @return BulkImportResultDevice + * @return BulkImportResultEdge * @throws ApiException if fails to make API call */ - public BulkImportResultDevice processDevicesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { - return processDevicesBulkImport(bulkImportRequest, null); + public BulkImportResultEdge processEdgesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { + return processEdgesBulkImport(bulkImportRequest, null); } /** - * Import the bulk of devices (processDevicesBulkImport) - * There's an ability to import the bulk of devices using the only .csv file. Available for users with 'TENANT_ADMIN' authority. + * Import the bulk of edges (processEdgesBulkImport) + * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' authority. * @param bulkImportRequest (required) * @param headers Optional headers to include in the request - * @return BulkImportResultDevice + * @return BulkImportResultEdge * @throws ApiException if fails to make API call */ - public BulkImportResultDevice processDevicesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { - ApiResponse localVarResponse = processDevicesBulkImportWithHttpInfo(bulkImportRequest, headers); + public BulkImportResultEdge processEdgesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + ApiResponse localVarResponse = processEdgesBulkImportWithHttpInfo(bulkImportRequest, headers); return localVarResponse.getData(); } /** - * Import the bulk of devices (processDevicesBulkImport) - * There's an ability to import the bulk of devices using the only .csv file. Available for users with 'TENANT_ADMIN' authority. + * Import the bulk of edges (processEdgesBulkImport) + * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' authority. * @param bulkImportRequest (required) - * @return ApiResponse<BulkImportResultDevice> + * @return ApiResponse<BulkImportResultEdge> * @throws ApiException if fails to make API call */ - public ApiResponse processDevicesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { - return processDevicesBulkImportWithHttpInfo(bulkImportRequest, null); + public ApiResponse processEdgesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { + return processEdgesBulkImportWithHttpInfo(bulkImportRequest, null); } /** - * Import the bulk of devices (processDevicesBulkImport) - * There's an ability to import the bulk of devices using the only .csv file. Available for users with 'TENANT_ADMIN' authority. + * Import the bulk of edges (processEdgesBulkImport) + * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' authority. * @param bulkImportRequest (required) * @param headers Optional headers to include in the request - * @return ApiResponse<BulkImportResultDevice> + * @return ApiResponse<BulkImportResultEdge> * @throws ApiException if fails to make API call */ - public ApiResponse processDevicesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = processDevicesBulkImportRequestBuilder(bulkImportRequest, headers); + public ApiResponse processEdgesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = processEdgesBulkImportRequestBuilder(bulkImportRequest, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -51976,11 +52957,11 @@ public ApiResponse processDevicesBulkImportWithHttpInfo( InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("processDevicesBulkImport", localVarResponse); + throw getApiException("processEdgesBulkImport", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -51990,10 +52971,10 @@ public ApiResponse processDevicesBulkImportWithHttpInfo( String responseBody = new String(localVarResponseBody.readAllBytes()); - BulkImportResultDevice responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + BulkImportResultEdge responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -52012,15 +52993,15 @@ public ApiResponse processDevicesBulkImportWithHttpInfo( } } - private HttpRequest.Builder processDevicesBulkImportRequestBuilder(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + private HttpRequest.Builder processEdgesBulkImportRequestBuilder(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { // verify the required parameter 'bulkImportRequest' is set if (bulkImportRequest == null) { - throw new ApiException(400, "Missing the required parameter 'bulkImportRequest' when calling processDevicesBulkImport"); + throw new ApiException(400, "Missing the required parameter 'bulkImportRequest' when calling processEdgesBulkImport"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/device/bulk_import"; + String localVarPath = "/api/edge/bulk_import"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -52045,50 +53026,47 @@ private HttpRequest.Builder processDevicesBulkImportRequestBuilder(@javax.annota } /** - * Import the bulk of edges (processEdgesBulkImport) - * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' authority. - * @param bulkImportRequest (required) - * @return BulkImportResultEdge + * processSystemEdqsRequest + * + * @param toCoreEdqsRequest (required) * @throws ApiException if fails to make API call */ - public BulkImportResultEdge processEdgesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { - return processEdgesBulkImport(bulkImportRequest, null); + public void processSystemEdqsRequest(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest) throws ApiException { + processSystemEdqsRequest(toCoreEdqsRequest, null); } /** - * Import the bulk of edges (processEdgesBulkImport) - * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' authority. - * @param bulkImportRequest (required) + * processSystemEdqsRequest + * + * @param toCoreEdqsRequest (required) * @param headers Optional headers to include in the request - * @return BulkImportResultEdge * @throws ApiException if fails to make API call */ - public BulkImportResultEdge processEdgesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { - ApiResponse localVarResponse = processEdgesBulkImportWithHttpInfo(bulkImportRequest, headers); - return localVarResponse.getData(); + public void processSystemEdqsRequest(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest, Map headers) throws ApiException { + processSystemEdqsRequestWithHttpInfo(toCoreEdqsRequest, headers); } /** - * Import the bulk of edges (processEdgesBulkImport) - * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' authority. - * @param bulkImportRequest (required) - * @return ApiResponse<BulkImportResultEdge> + * processSystemEdqsRequest + * + * @param toCoreEdqsRequest (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse processEdgesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { - return processEdgesBulkImportWithHttpInfo(bulkImportRequest, null); + public ApiResponse processSystemEdqsRequestWithHttpInfo(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest) throws ApiException { + return processSystemEdqsRequestWithHttpInfo(toCoreEdqsRequest, null); } /** - * Import the bulk of edges (processEdgesBulkImport) - * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' authority. - * @param bulkImportRequest (required) + * processSystemEdqsRequest + * + * @param toCoreEdqsRequest (required) * @param headers Optional headers to include in the request - * @return ApiResponse<BulkImportResultEdge> + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse processEdgesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = processEdgesBulkImportRequestBuilder(bulkImportRequest, headers); + public ApiResponse processSystemEdqsRequestWithHttpInfo(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = processSystemEdqsRequestRequestBuilder(toCoreEdqsRequest, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -52099,27 +53077,16 @@ public ApiResponse processEdgesBulkImportWithHttpInfo(@jav InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("processEdgesBulkImport", localVarResponse); + throw getApiException("processSystemEdqsRequest", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); + if (localVarResponseBody != null) { + localVarResponseBody.readAllBytes(); } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - BulkImportResultEdge responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( + return new ApiResponse<>( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseValue + null ); } finally { if (localVarResponseBody != null) { @@ -52135,15 +53102,15 @@ public ApiResponse processEdgesBulkImportWithHttpInfo(@jav } } - private HttpRequest.Builder processEdgesBulkImportRequestBuilder(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { - // verify the required parameter 'bulkImportRequest' is set - if (bulkImportRequest == null) { - throw new ApiException(400, "Missing the required parameter 'bulkImportRequest' when calling processEdgesBulkImport"); + private HttpRequest.Builder processSystemEdqsRequestRequestBuilder(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest, Map headers) throws ApiException { + // verify the required parameter 'toCoreEdqsRequest' is set + if (toCoreEdqsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'toCoreEdqsRequest' when calling processSystemEdqsRequest"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/edge/bulk_import"; + String localVarPath = "/api/edqs/system/request"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -52151,7 +53118,7 @@ private HttpRequest.Builder processEdgesBulkImportRequestBuilder(@javax.annotati localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(bulkImportRequest); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(toCoreEdqsRequest); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -52168,47 +53135,50 @@ private HttpRequest.Builder processEdgesBulkImportRequestBuilder(@javax.annotati } /** - * processSystemEdqsRequest - * - * @param toCoreEdqsRequest (required) + * Provision new device (provisionDevice) + * Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` + * @param body JSON with provision request. See API call description for example. (required) + * @return String * @throws ApiException if fails to make API call */ - public void processSystemEdqsRequest(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest) throws ApiException { - processSystemEdqsRequest(toCoreEdqsRequest, null); + public String provisionDevice(@javax.annotation.Nonnull String body) throws ApiException { + return provisionDevice(body, null); } /** - * processSystemEdqsRequest - * - * @param toCoreEdqsRequest (required) + * Provision new device (provisionDevice) + * Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` + * @param body JSON with provision request. See API call description for example. (required) * @param headers Optional headers to include in the request + * @return String * @throws ApiException if fails to make API call */ - public void processSystemEdqsRequest(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest, Map headers) throws ApiException { - processSystemEdqsRequestWithHttpInfo(toCoreEdqsRequest, headers); + public String provisionDevice(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = provisionDeviceWithHttpInfo(body, headers); + return localVarResponse.getData(); } /** - * processSystemEdqsRequest - * - * @param toCoreEdqsRequest (required) - * @return ApiResponse<Void> + * Provision new device (provisionDevice) + * Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` + * @param body JSON with provision request. See API call description for example. (required) + * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse processSystemEdqsRequestWithHttpInfo(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest) throws ApiException { - return processSystemEdqsRequestWithHttpInfo(toCoreEdqsRequest, null); + public ApiResponse provisionDeviceWithHttpInfo(@javax.annotation.Nonnull String body) throws ApiException { + return provisionDeviceWithHttpInfo(body, null); } /** - * processSystemEdqsRequest - * - * @param toCoreEdqsRequest (required) + * Provision new device (provisionDevice) + * Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` + * @param body JSON with provision request. See API call description for example. (required) * @param headers Optional headers to include in the request - * @return ApiResponse<Void> + * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse processSystemEdqsRequestWithHttpInfo(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = processSystemEdqsRequestRequestBuilder(toCoreEdqsRequest, headers); + public ApiResponse provisionDeviceWithHttpInfo(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = provisionDeviceRequestBuilder(body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -52219,16 +53189,27 @@ public ApiResponse processSystemEdqsRequestWithHttpInfo(@javax.annotation. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("processSystemEdqsRequest", localVarResponse); + throw getApiException("provisionDevice", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); } - return new ApiResponse<>( + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null + responseValue ); } finally { if (localVarResponseBody != null) { @@ -52244,27 +53225,22 @@ public ApiResponse processSystemEdqsRequestWithHttpInfo(@javax.annotation. } } - private HttpRequest.Builder processSystemEdqsRequestRequestBuilder(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest, Map headers) throws ApiException { - // verify the required parameter 'toCoreEdqsRequest' is set - if (toCoreEdqsRequest == null) { - throw new ApiException(400, "Missing the required parameter 'toCoreEdqsRequest' when calling processSystemEdqsRequest"); + private HttpRequest.Builder provisionDeviceRequestBuilder(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling provisionDevice"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/edqs/system/request"; + String localVarPath = "/api/v1/provision"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(toCoreEdqsRequest); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -52978,6 +53954,142 @@ private HttpRequest.Builder removeMobileSessionRequestBuilder(@javax.annotation. return localVarRequestBuilder; } + /** + * Reply to RPC commands (replyToCommand) + * Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param requestId RPC request id from the incoming RPC request (required) + * @param body Reply to the RPC request, JSON. For example: {\"status\":\"success\"} (required) + * @return String + * @throws ApiException if fails to make API call + */ + public String replyToCommand(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body) throws ApiException { + return replyToCommand(deviceToken, requestId, body, null); + } + + /** + * Reply to RPC commands (replyToCommand) + * Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param requestId RPC request id from the incoming RPC request (required) + * @param body Reply to the RPC request, JSON. For example: {\"status\":\"success\"} (required) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String replyToCommand(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = replyToCommandWithHttpInfo(deviceToken, requestId, body, headers); + return localVarResponse.getData(); + } + + /** + * Reply to RPC commands (replyToCommand) + * Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param requestId RPC request id from the incoming RPC request (required) + * @param body Reply to the RPC request, JSON. For example: {\"status\":\"success\"} (required) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse replyToCommandWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body) throws ApiException { + return replyToCommandWithHttpInfo(deviceToken, requestId, body, null); + } + + /** + * Reply to RPC commands (replyToCommand) + * Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param requestId RPC request id from the incoming RPC request (required) + * @param body Reply to the RPC request, JSON. For example: {\"status\":\"success\"} (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse replyToCommandWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = replyToCommandRequestBuilder(deviceToken, requestId, body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("replyToCommand", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder replyToCommandRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling replyToCommand"); + } + // verify the required parameter 'requestId' is set + if (requestId == null) { + throw new ApiException(400, "Missing the required parameter 'requestId' when calling replyToCommand"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling replyToCommand"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/rpc/{requestId}" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())) + .replace("{requestId}", ApiClient.urlEncode(requestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Report action of User over the dashboard (reportUserDashboardAction) * Report action of User over the dashboard. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -54801,6 +55913,129 @@ private HttpRequest.Builder saveCalculatedFieldRequestBuilder(@javax.annotation. return localVarRequestBuilder; } + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @return String + * @throws ApiException if fails to make API call + */ + public String saveClaimingInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { + return saveClaimingInfo(deviceToken, body, null); + } + + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String saveClaimingInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { + ApiResponse localVarResponse = saveClaimingInfoWithHttpInfo(deviceToken, body, headers); + return localVarResponse.getData(); + } + + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveClaimingInfoWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { + return saveClaimingInfoWithHttpInfo(deviceToken, body, null); + } + + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveClaimingInfoWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = saveClaimingInfoRequestBuilder(deviceToken, body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("saveClaimingInfo", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder saveClaimingInfoRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling saveClaimingInfo"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/claim" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Create or update OAuth2 client registration template (saveClientRegistrationTemplate) Available for users with 'SYS_ADMIN' authority. * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients @@ -62511,6 +63746,280 @@ private HttpRequest.Builder submitTwoFaAccountConfigRequestBuilder(@javax.annota return localVarRequestBuilder; } + /** + * Subscribe to attribute updates (subscribeToAttributes) (Deprecated) + * Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @return String + * @throws ApiException if fails to make API call + */ + public String subscribeToAttributes(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout) throws ApiException { + return subscribeToAttributes(deviceToken, timeout, null); + } + + /** + * Subscribe to attribute updates (subscribeToAttributes) (Deprecated) + * Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String subscribeToAttributes(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { + ApiResponse localVarResponse = subscribeToAttributesWithHttpInfo(deviceToken, timeout, headers); + return localVarResponse.getData(); + } + + /** + * Subscribe to attribute updates (subscribeToAttributes) (Deprecated) + * Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse subscribeToAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout) throws ApiException { + return subscribeToAttributesWithHttpInfo(deviceToken, timeout, null); + } + + /** + * Subscribe to attribute updates (subscribeToAttributes) (Deprecated) + * Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse subscribeToAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = subscribeToAttributesRequestBuilder(deviceToken, timeout, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("subscribeToAttributes", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder subscribeToAttributesRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling subscribeToAttributes"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/attributes/updates" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "timeout"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("timeout", timeout)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Subscribe to RPC commands (subscribeToCommands) (Deprecated) + * Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @return String + * @throws ApiException if fails to make API call + */ + public String subscribeToCommands(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout) throws ApiException { + return subscribeToCommands(deviceToken, timeout, null); + } + + /** + * Subscribe to RPC commands (subscribeToCommands) (Deprecated) + * Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String subscribeToCommands(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { + ApiResponse localVarResponse = subscribeToCommandsWithHttpInfo(deviceToken, timeout, headers); + return localVarResponse.getData(); + } + + /** + * Subscribe to RPC commands (subscribeToCommands) (Deprecated) + * Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse subscribeToCommandsWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout) throws ApiException { + return subscribeToCommandsWithHttpInfo(deviceToken, timeout, null); + } + + /** + * Subscribe to RPC commands (subscribeToCommands) (Deprecated) + * Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse subscribeToCommandsWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = subscribeToCommandsRequestBuilder(deviceToken, timeout, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("subscribeToCommands", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder subscribeToCommandsRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling subscribeToCommands"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/rpc" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "timeout"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("timeout", timeout)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Sync edge (syncEdge) * Starts synchronization process between edge and cloud. All entities that are assigned to particular edge are going to be send to remote edge service. Available for users with 'TENANT_ADMIN' authority. diff --git a/ce/src/main/java/org/thingsboard/client/model/AdminSettingsId.java b/ce/src/main/java/org/thingsboard/client/model/AdminSettingsId.java index de11a59a..e62908e6 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AdminSettingsId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AdminSettingsId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * AdminSettingsId @@ -41,18 +46,32 @@ AdminSettingsId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AdminSettingsId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class AdminSettingsId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.ADMIN_SETTINGS; public AdminSettingsId() { } + @JsonCreator + public AdminSettingsId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public AdminSettingsId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public AdminSettingsId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } AdminSettingsId adminSettingsId = (AdminSettingsId) o; return Objects.equals(this.id, adminSettingsId.id) && - Objects.equals(this.entityType, adminSettingsId.entityType); + Objects.equals(this.entityType, adminSettingsId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdminSettingsId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AdminSettingsId", AdminSettingsId.class); + JSON.registerDiscriminator(AdminSettingsId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/AiModelId.java b/ce/src/main/java/org/thingsboard/client/model/AiModelId.java index d5f505ed..42c5ebcd 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AiModelId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AiModelId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * AiModelId @@ -41,18 +46,32 @@ AiModelId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AiModelId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class AiModelId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.AI_MODEL; public AiModelId() { } + @JsonCreator + public AiModelId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public AiModelId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public AiModelId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * Entity type of the AI model * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } AiModelId aiModelId = (AiModelId) o; return Objects.equals(this.id, aiModelId.id) && - Objects.equals(this.entityType, aiModelId.entityType); + Objects.equals(this.entityType, aiModelId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AiModelId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AiModelId", AiModelId.class); + JSON.registerDiscriminator(AiModelId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java index 62a6084e..0729c623 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public AlarmAssignmentRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public AlarmAssignmentRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java index 910e38e3..703d5744 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public AlarmCommentRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public AlarmCommentRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/AlarmId.java b/ce/src/main/java/org/thingsboard/client/model/AlarmId.java index 1d7d87ef..6b886bae 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AlarmId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AlarmId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * AlarmId @@ -41,18 +46,32 @@ AlarmId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AlarmId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class AlarmId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.ALARM; public AlarmId() { } + @JsonCreator + public AlarmId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public AlarmId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public AlarmId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } AlarmId alarmId = (AlarmId) o; return Objects.equals(this.id, alarmId.id) && - Objects.equals(this.entityType, alarmId.entityType); + Objects.equals(this.entityType, alarmId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AlarmId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AlarmId", AlarmId.class); + JSON.registerDiscriminator(AlarmId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/ApiKeyId.java b/ce/src/main/java/org/thingsboard/client/model/ApiKeyId.java index cfc0cd67..0f611cdb 100644 --- a/ce/src/main/java/org/thingsboard/client/model/ApiKeyId.java +++ b/ce/src/main/java/org/thingsboard/client/model/ApiKeyId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * ApiKeyId @@ -41,18 +46,32 @@ ApiKeyId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class ApiKeyId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class ApiKeyId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.API_KEY; public ApiKeyId() { } + @JsonCreator + public ApiKeyId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public ApiKeyId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public ApiKeyId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } ApiKeyId apiKeyId = (ApiKeyId) o; return Objects.equals(this.id, apiKeyId.id) && - Objects.equals(this.entityType, apiKeyId.entityType); + Objects.equals(this.entityType, apiKeyId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ApiKeyId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ApiKeyId", ApiKeyId.class); + JSON.registerDiscriminator(ApiKeyId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java index 09389b53..a9a563d3 100644 --- a/ce/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public ApiUsageLimitRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public ApiUsageLimitRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java b/ce/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java new file mode 100644 index 00000000..5f72c58f --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java @@ -0,0 +1,208 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.thingsboard.client.model.EntityId; +import org.thingsboard.client.model.EntityType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * ApiUsageStateId + */ +@JsonPropertyOrder({ + ApiUsageStateId.JSON_PROPERTY_ID, + ApiUsageStateId.JSON_PROPERTY_ENTITY_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class ApiUsageStateId extends EntityId { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; + @javax.annotation.Nonnull + private EntityType entityType = EntityType.API_USAGE_STATE; + + public ApiUsageStateId() { + } + + @JsonCreator + public ApiUsageStateId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + + public ApiUsageStateId id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * ID of the entity, time-based UUID v1 + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(value = JSON_PROPERTY_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + /** + * string + * @return entityType + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EntityType getEntityType() { + return entityType; + } + + + + + /** + * Return true if this ApiUsageStateId object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiUsageStateId apiUsageStateId = (ApiUsageStateId) o; + return Objects.equals(this.id, apiUsageStateId.id) && + Objects.equals(this.entityType, apiUsageStateId.entityType) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(id, entityType, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiUsageStateId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ApiUsageStateId", ApiUsageStateId.class); + JSON.registerDiscriminator(ApiUsageStateId.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/AssetId.java b/ce/src/main/java/org/thingsboard/client/model/AssetId.java index 35afaee3..8d6e98e3 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AssetId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AssetId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * AssetId @@ -41,18 +46,32 @@ AssetId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AssetId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class AssetId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.ASSET; public AssetId() { } + @JsonCreator + public AssetId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public AssetId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public AssetId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } AssetId assetId = (AssetId) o; return Objects.equals(this.id, assetId.id) && - Objects.equals(this.entityType, assetId.entityType); + Objects.equals(this.entityType, assetId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AssetId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AssetId", AssetId.class); + JSON.registerDiscriminator(AssetId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/AssetProfileId.java b/ce/src/main/java/org/thingsboard/client/model/AssetProfileId.java index afb23a04..a449c0f7 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AssetProfileId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AssetProfileId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * AssetProfileId @@ -41,18 +46,32 @@ AssetProfileId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AssetProfileId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class AssetProfileId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.ASSET_PROFILE; public AssetProfileId() { } + @JsonCreator + public AssetProfileId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public AssetProfileId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public AssetProfileId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } AssetProfileId assetProfileId = (AssetProfileId) o; return Objects.equals(this.id, assetProfileId.id) && - Objects.equals(this.entityType, assetProfileId.entityType); + Objects.equals(this.entityType, assetProfileId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AssetProfileId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AssetProfileId", AssetProfileId.class); + JSON.registerDiscriminator(AssetProfileId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/AuditLog.java b/ce/src/main/java/org/thingsboard/client/model/AuditLog.java index 1ff6864f..4bc53623 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AuditLog.java +++ b/ce/src/main/java/org/thingsboard/client/model/AuditLog.java @@ -113,7 +113,6 @@ public AuditLog( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_ENTITY_ID) EntityId entityId, @JsonProperty(JSON_PROPERTY_ENTITY_NAME) String entityName, @JsonProperty(JSON_PROPERTY_USER_ID) UserId userId, @JsonProperty(JSON_PROPERTY_USER_NAME) String userName, @@ -126,7 +125,6 @@ public AuditLog( this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; - this.entityId = entityId; this.entityName = entityName; this.userId = userId; this.userName = userName; @@ -202,6 +200,11 @@ public CustomerId getCustomerId() { + public AuditLog entityId(@javax.annotation.Nullable EntityId entityId) { + this.entityId = entityId; + return this; + } + /** * JSON object with Entity id * @return entityId @@ -214,6 +217,11 @@ public EntityId getEntityId() { } + @JsonProperty(value = JSON_PROPERTY_ENTITY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityId(@javax.annotation.Nullable EntityId entityId) { + this.entityId = entityId; + } /** diff --git a/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java b/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java index 42c334eb..94bc7a7b 100644 --- a/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java +++ b/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * CalculatedFieldId @@ -41,18 +46,32 @@ CalculatedFieldId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class CalculatedFieldId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class CalculatedFieldId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.CALCULATED_FIELD; public CalculatedFieldId() { } + @JsonCreator + public CalculatedFieldId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public CalculatedFieldId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public CalculatedFieldId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } CalculatedFieldId calculatedFieldId = (CalculatedFieldId) o; return Objects.equals(this.id, calculatedFieldId.id) && - Objects.equals(this.entityType, calculatedFieldId.entityType); + Objects.equals(this.entityType, calculatedFieldId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CalculatedFieldId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CalculatedFieldId", CalculatedFieldId.class); + JSON.registerDiscriminator(CalculatedFieldId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/CustomerId.java b/ce/src/main/java/org/thingsboard/client/model/CustomerId.java index b2bd00cd..fa0f4e54 100644 --- a/ce/src/main/java/org/thingsboard/client/model/CustomerId.java +++ b/ce/src/main/java/org/thingsboard/client/model/CustomerId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * CustomerId @@ -41,18 +46,32 @@ CustomerId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class CustomerId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class CustomerId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.CUSTOMER; public CustomerId() { } + @JsonCreator + public CustomerId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public CustomerId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public CustomerId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } CustomerId customerId = (CustomerId) o; return Objects.equals(this.id, customerId.id) && - Objects.equals(this.entityType, customerId.entityType); + Objects.equals(this.entityType, customerId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CustomerId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CustomerId", CustomerId.class); + JSON.registerDiscriminator(CustomerId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/DashboardId.java b/ce/src/main/java/org/thingsboard/client/model/DashboardId.java index 1ce6e6f6..fcaa7378 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DashboardId.java +++ b/ce/src/main/java/org/thingsboard/client/model/DashboardId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * DashboardId @@ -41,18 +46,32 @@ DashboardId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class DashboardId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class DashboardId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.DASHBOARD; public DashboardId() { } + @JsonCreator + public DashboardId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public DashboardId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public DashboardId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } DashboardId dashboardId = (DashboardId) o; return Objects.equals(this.id, dashboardId.id) && - Objects.equals(this.entityType, dashboardId.entityType); + Objects.equals(this.entityType, dashboardId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DashboardId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DashboardId", DashboardId.class); + JSON.registerDiscriminator(DashboardId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java index 937ead2e..c9a48f24 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public DeviceActivityRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public DeviceActivityRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/DeviceId.java b/ce/src/main/java/org/thingsboard/client/model/DeviceId.java index 71906074..ee1c51f3 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DeviceId.java +++ b/ce/src/main/java/org/thingsboard/client/model/DeviceId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * DeviceId @@ -41,18 +46,32 @@ DeviceId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class DeviceId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class DeviceId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.DEVICE; public DeviceId() { } + @JsonCreator + public DeviceId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public DeviceId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public DeviceId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } DeviceId deviceId = (DeviceId) o; return Objects.equals(this.id, deviceId.id) && - Objects.equals(this.entityType, deviceId.entityType); + Objects.equals(this.entityType, deviceId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeviceId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DeviceId", DeviceId.class); + JSON.registerDiscriminator(DeviceId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/DeviceProfileId.java b/ce/src/main/java/org/thingsboard/client/model/DeviceProfileId.java index 3b7101a2..8ceabadd 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DeviceProfileId.java +++ b/ce/src/main/java/org/thingsboard/client/model/DeviceProfileId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * DeviceProfileId @@ -41,18 +46,32 @@ DeviceProfileId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class DeviceProfileId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class DeviceProfileId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.DEVICE_PROFILE; public DeviceProfileId() { } + @JsonCreator + public DeviceProfileId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public DeviceProfileId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public DeviceProfileId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } DeviceProfileId deviceProfileId = (DeviceProfileId) o; return Objects.equals(this.id, deviceProfileId.id) && - Objects.equals(this.entityType, deviceProfileId.entityType); + Objects.equals(this.entityType, deviceProfileId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeviceProfileId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DeviceProfileId", DeviceProfileId.class); + JSON.registerDiscriminator(DeviceProfileId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/DomainId.java b/ce/src/main/java/org/thingsboard/client/model/DomainId.java index 1ad2f2c8..c9627723 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DomainId.java +++ b/ce/src/main/java/org/thingsboard/client/model/DomainId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * DomainId @@ -41,18 +46,32 @@ DomainId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class DomainId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class DomainId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.DOMAIN; public DomainId() { } + @JsonCreator + public DomainId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public DomainId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,13 +96,8 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public DomainId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** - * Get entityType + * string * @return entityType */ @javax.annotation.Nonnull @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } DomainId domainId = (DomainId) o; return Objects.equals(this.id, domainId.id) && - Objects.equals(this.entityType, domainId.entityType); + Objects.equals(this.entityType, domainId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DomainId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DomainId", DomainId.class); + JSON.registerDiscriminator(DomainId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureRecipientsConfig.java index c598e977..7849e3c1 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public EdgeCommunicationFailureRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public EdgeCommunicationFailureRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java index e8a8443d..2da5cf25 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public EdgeConnectionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public EdgeConnectionRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/EdgeId.java b/ce/src/main/java/org/thingsboard/client/model/EdgeId.java index be01b1a0..cfc182f0 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EdgeId.java +++ b/ce/src/main/java/org/thingsboard/client/model/EdgeId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * EdgeId @@ -41,18 +46,32 @@ EdgeId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class EdgeId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class EdgeId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.EDGE; public EdgeId() { } + @JsonCreator + public EdgeId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public EdgeId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public EdgeId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } EdgeId edgeId = (EdgeId) o; return Objects.equals(this.id, edgeId.id) && - Objects.equals(this.entityType, edgeId.entityType); + Objects.equals(this.entityType, edgeId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EdgeId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EdgeId", EdgeId.class); + JSON.registerDiscriminator(EdgeId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java index 0008b4fc..c849c32a 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public EntitiesLimitRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public EntitiesLimitRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java index 80c67578..384475ac 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public EntityActionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public EntityActionRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/EntityId.java b/ce/src/main/java/org/thingsboard/client/model/EntityId.java index e1008491..aa4ad53a 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EntityId.java +++ b/ce/src/main/java/org/thingsboard/client/model/EntityId.java @@ -21,9 +21,12 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; @@ -32,6 +35,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * EntityId @@ -41,6 +45,50 @@ EntityId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = AdminSettingsId.class, name = "ADMIN_SETTINGS"), + @JsonSubTypes.Type(value = AiModelId.class, name = "AI_MODEL"), + @JsonSubTypes.Type(value = AlarmId.class, name = "ALARM"), + @JsonSubTypes.Type(value = ApiKeyId.class, name = "API_KEY"), + @JsonSubTypes.Type(value = ApiUsageStateId.class, name = "API_USAGE_STATE"), + @JsonSubTypes.Type(value = AssetId.class, name = "ASSET"), + @JsonSubTypes.Type(value = AssetProfileId.class, name = "ASSET_PROFILE"), + @JsonSubTypes.Type(value = CalculatedFieldId.class, name = "CALCULATED_FIELD"), + @JsonSubTypes.Type(value = CustomerId.class, name = "CUSTOMER"), + @JsonSubTypes.Type(value = DashboardId.class, name = "DASHBOARD"), + @JsonSubTypes.Type(value = DeviceId.class, name = "DEVICE"), + @JsonSubTypes.Type(value = DeviceProfileId.class, name = "DEVICE_PROFILE"), + @JsonSubTypes.Type(value = DomainId.class, name = "DOMAIN"), + @JsonSubTypes.Type(value = EdgeId.class, name = "EDGE"), + @JsonSubTypes.Type(value = EntityViewId.class, name = "ENTITY_VIEW"), + @JsonSubTypes.Type(value = JobId.class, name = "JOB"), + @JsonSubTypes.Type(value = MobileAppId.class, name = "MOBILE_APP"), + @JsonSubTypes.Type(value = MobileAppBundleId.class, name = "MOBILE_APP_BUNDLE"), + @JsonSubTypes.Type(value = NotificationId.class, name = "NOTIFICATION"), + @JsonSubTypes.Type(value = NotificationRequestId.class, name = "NOTIFICATION_REQUEST"), + @JsonSubTypes.Type(value = NotificationRuleId.class, name = "NOTIFICATION_RULE"), + @JsonSubTypes.Type(value = NotificationTargetId.class, name = "NOTIFICATION_TARGET"), + @JsonSubTypes.Type(value = NotificationTemplateId.class, name = "NOTIFICATION_TEMPLATE"), + @JsonSubTypes.Type(value = OAuth2ClientId.class, name = "OAUTH2_CLIENT"), + @JsonSubTypes.Type(value = OtaPackageId.class, name = "OTA_PACKAGE"), + @JsonSubTypes.Type(value = QueueId.class, name = "QUEUE"), + @JsonSubTypes.Type(value = QueueStatsId.class, name = "QUEUE_STATS"), + @JsonSubTypes.Type(value = RpcId.class, name = "RPC"), + @JsonSubTypes.Type(value = RuleChainId.class, name = "RULE_CHAIN"), + @JsonSubTypes.Type(value = RuleNodeId.class, name = "RULE_NODE"), + @JsonSubTypes.Type(value = TbResourceId.class, name = "TB_RESOURCE"), + @JsonSubTypes.Type(value = TenantId.class, name = "TENANT"), + @JsonSubTypes.Type(value = TenantProfileId.class, name = "TENANT_PROFILE"), + @JsonSubTypes.Type(value = UserId.class, name = "USER"), + @JsonSubTypes.Type(value = WidgetsBundleId.class, name = "WIDGETS_BUNDLE"), + @JsonSubTypes.Type(value = WidgetTypeId.class, name = "WIDGET_TYPE"), +}) + public class EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull @@ -187,5 +235,47 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ADMIN_SETTINGS", AdminSettingsId.class); + mappings.put("AI_MODEL", AiModelId.class); + mappings.put("ALARM", AlarmId.class); + mappings.put("API_KEY", ApiKeyId.class); + mappings.put("API_USAGE_STATE", ApiUsageStateId.class); + mappings.put("ASSET", AssetId.class); + mappings.put("ASSET_PROFILE", AssetProfileId.class); + mappings.put("CALCULATED_FIELD", CalculatedFieldId.class); + mappings.put("CUSTOMER", CustomerId.class); + mappings.put("DASHBOARD", DashboardId.class); + mappings.put("DEVICE", DeviceId.class); + mappings.put("DEVICE_PROFILE", DeviceProfileId.class); + mappings.put("DOMAIN", DomainId.class); + mappings.put("EDGE", EdgeId.class); + mappings.put("ENTITY_VIEW", EntityViewId.class); + mappings.put("JOB", JobId.class); + mappings.put("MOBILE_APP", MobileAppId.class); + mappings.put("MOBILE_APP_BUNDLE", MobileAppBundleId.class); + mappings.put("NOTIFICATION", NotificationId.class); + mappings.put("NOTIFICATION_REQUEST", NotificationRequestId.class); + mappings.put("NOTIFICATION_RULE", NotificationRuleId.class); + mappings.put("NOTIFICATION_TARGET", NotificationTargetId.class); + mappings.put("NOTIFICATION_TEMPLATE", NotificationTemplateId.class); + mappings.put("OAUTH2_CLIENT", OAuth2ClientId.class); + mappings.put("OTA_PACKAGE", OtaPackageId.class); + mappings.put("QUEUE", QueueId.class); + mappings.put("QUEUE_STATS", QueueStatsId.class); + mappings.put("RPC", RpcId.class); + mappings.put("RULE_CHAIN", RuleChainId.class); + mappings.put("RULE_NODE", RuleNodeId.class); + mappings.put("TB_RESOURCE", TbResourceId.class); + mappings.put("TENANT", TenantId.class); + mappings.put("TENANT_PROFILE", TenantProfileId.class); + mappings.put("USER", UserId.class); + mappings.put("WIDGETS_BUNDLE", WidgetsBundleId.class); + mappings.put("WIDGET_TYPE", WidgetTypeId.class); + mappings.put("EntityId", EntityId.class); + JSON.registerDiscriminator(EntityId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/EntityViewId.java b/ce/src/main/java/org/thingsboard/client/model/EntityViewId.java index 275255ba..72241f61 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EntityViewId.java +++ b/ce/src/main/java/org/thingsboard/client/model/EntityViewId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * EntityViewId @@ -41,18 +46,32 @@ EntityViewId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class EntityViewId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class EntityViewId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.ENTITY_VIEW; public EntityViewId() { } + @JsonCreator + public EntityViewId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public EntityViewId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public EntityViewId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } EntityViewId entityViewId = (EntityViewId) o; return Objects.equals(this.id, entityViewId.id) && - Objects.equals(this.entityType, entityViewId.entityType); + Objects.equals(this.entityType, entityViewId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EntityViewId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EntityViewId", EntityViewId.class); + JSON.registerDiscriminator(EntityViewId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java index 6867a75b..7a077694 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java @@ -95,7 +95,7 @@ public void setEscalationTable(@javax.annotation.Nonnull Map> @Override - public EscalatedNotificationRuleRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public EscalatedNotificationRuleRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/EventInfo.java b/ce/src/main/java/org/thingsboard/client/model/EventInfo.java index e367fdbf..1cbe3f86 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EventInfo.java +++ b/ce/src/main/java/org/thingsboard/client/model/EventInfo.java @@ -82,13 +82,11 @@ public EventInfo() { @JsonCreator public EventInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_ENTITY_ID) EntityId entityId + @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; - this.entityId = entityId; } public EventInfo id(@javax.annotation.Nullable EventId id) { @@ -191,6 +189,11 @@ public void setUid(@javax.annotation.Nullable String uid) { } + public EventInfo entityId(@javax.annotation.Nullable EntityId entityId) { + this.entityId = entityId; + return this; + } + /** * JSON object with Entity Id for which event is created. * @return entityId @@ -203,6 +206,11 @@ public EntityId getEntityId() { } + @JsonProperty(value = JSON_PROPERTY_ENTITY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityId(@javax.annotation.Nullable EntityId entityId) { + this.entityId = entityId; + } public EventInfo body(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode body) { diff --git a/ce/src/main/java/org/thingsboard/client/model/FeaturesInfo.java b/ce/src/main/java/org/thingsboard/client/model/FeaturesInfo.java index a8f25fbd..da660036 100644 --- a/ce/src/main/java/org/thingsboard/client/model/FeaturesInfo.java +++ b/ce/src/main/java/org/thingsboard/client/model/FeaturesInfo.java @@ -37,9 +37,9 @@ @JsonPropertyOrder({ FeaturesInfo.JSON_PROPERTY_SMS_ENABLED, FeaturesInfo.JSON_PROPERTY_OAUTH_ENABLED, + FeaturesInfo.JSON_PROPERTY_NOTIFICATION_ENABLED, FeaturesInfo.JSON_PROPERTY_TWO_FA_ENABLED, - FeaturesInfo.JSON_PROPERTY_EMAIL_ENABLED, - FeaturesInfo.JSON_PROPERTY_NOTIFICATION_ENABLED + FeaturesInfo.JSON_PROPERTY_EMAIL_ENABLED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class FeaturesInfo { @@ -51,6 +51,10 @@ public class FeaturesInfo { @javax.annotation.Nullable private Boolean oauthEnabled; + public static final String JSON_PROPERTY_NOTIFICATION_ENABLED = "notificationEnabled"; + @javax.annotation.Nullable + private Boolean notificationEnabled; + public static final String JSON_PROPERTY_TWO_FA_ENABLED = "twoFaEnabled"; @javax.annotation.Nullable private Boolean twoFaEnabled; @@ -59,10 +63,6 @@ public class FeaturesInfo { @javax.annotation.Nullable private Boolean emailEnabled; - public static final String JSON_PROPERTY_NOTIFICATION_ENABLED = "notificationEnabled"; - @javax.annotation.Nullable - private Boolean notificationEnabled; - public FeaturesInfo() { } @@ -114,6 +114,30 @@ public void setOauthEnabled(@javax.annotation.Nullable Boolean oauthEnabled) { } + public FeaturesInfo notificationEnabled(@javax.annotation.Nullable Boolean notificationEnabled) { + this.notificationEnabled = notificationEnabled; + return this; + } + + /** + * Get notificationEnabled + * @return notificationEnabled + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_ENABLED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNotificationEnabled() { + return notificationEnabled; + } + + + @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_ENABLED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotificationEnabled(@javax.annotation.Nullable Boolean notificationEnabled) { + this.notificationEnabled = notificationEnabled; + } + + public FeaturesInfo twoFaEnabled(@javax.annotation.Nullable Boolean twoFaEnabled) { this.twoFaEnabled = twoFaEnabled; return this; @@ -162,30 +186,6 @@ public void setEmailEnabled(@javax.annotation.Nullable Boolean emailEnabled) { } - public FeaturesInfo notificationEnabled(@javax.annotation.Nullable Boolean notificationEnabled) { - this.notificationEnabled = notificationEnabled; - return this; - } - - /** - * Get notificationEnabled - * @return notificationEnabled - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_ENABLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getNotificationEnabled() { - return notificationEnabled; - } - - - @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_ENABLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNotificationEnabled(@javax.annotation.Nullable Boolean notificationEnabled) { - this.notificationEnabled = notificationEnabled; - } - - /** * Return true if this FeaturesInfo object is equal to o. */ @@ -200,14 +200,14 @@ public boolean equals(Object o) { FeaturesInfo featuresInfo = (FeaturesInfo) o; return Objects.equals(this.smsEnabled, featuresInfo.smsEnabled) && Objects.equals(this.oauthEnabled, featuresInfo.oauthEnabled) && + Objects.equals(this.notificationEnabled, featuresInfo.notificationEnabled) && Objects.equals(this.twoFaEnabled, featuresInfo.twoFaEnabled) && - Objects.equals(this.emailEnabled, featuresInfo.emailEnabled) && - Objects.equals(this.notificationEnabled, featuresInfo.notificationEnabled); + Objects.equals(this.emailEnabled, featuresInfo.emailEnabled); } @Override public int hashCode() { - return Objects.hash(smsEnabled, oauthEnabled, twoFaEnabled, emailEnabled, notificationEnabled); + return Objects.hash(smsEnabled, oauthEnabled, notificationEnabled, twoFaEnabled, emailEnabled); } @Override @@ -216,9 +216,9 @@ public String toString() { sb.append("class FeaturesInfo {\n"); sb.append(" smsEnabled: ").append(toIndentedString(smsEnabled)).append("\n"); sb.append(" oauthEnabled: ").append(toIndentedString(oauthEnabled)).append("\n"); + sb.append(" notificationEnabled: ").append(toIndentedString(notificationEnabled)).append("\n"); sb.append(" twoFaEnabled: ").append(toIndentedString(twoFaEnabled)).append("\n"); sb.append(" emailEnabled: ").append(toIndentedString(emailEnabled)).append("\n"); - sb.append(" notificationEnabled: ").append(toIndentedString(notificationEnabled)).append("\n"); sb.append("}"); return sb.toString(); } @@ -276,6 +276,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%soauthEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOauthEnabled())))); } + // add `notificationEnabled` to the URL query string + if (getNotificationEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%snotificationEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotificationEnabled())))); + } + // add `twoFaEnabled` to the URL query string if (getTwoFaEnabled() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stwoFaEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTwoFaEnabled())))); @@ -286,11 +291,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%semailEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmailEnabled())))); } - // add `notificationEnabled` to the URL query string - if (getNotificationEnabled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%snotificationEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotificationEnabled())))); - } - return joiner.toString(); } } diff --git a/ce/src/main/java/org/thingsboard/client/model/JobId.java b/ce/src/main/java/org/thingsboard/client/model/JobId.java index 323bed6e..40fa7ae2 100644 --- a/ce/src/main/java/org/thingsboard/client/model/JobId.java +++ b/ce/src/main/java/org/thingsboard/client/model/JobId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * JobId @@ -41,18 +46,32 @@ JobId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class JobId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class JobId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.JOB; public JobId() { } + @JsonCreator + public JobId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public JobId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public JobId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } JobId jobId = (JobId) o; return Objects.equals(this.id, jobId.id) && - Objects.equals(this.entityType, jobId.entityType); + Objects.equals(this.entityType, jobId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class JobId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("JobId", JobId.class); + JSON.registerDiscriminator(JobId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java b/ce/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java index f3f8ed8d..b94f14e4 100644 --- a/ce/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java +++ b/ce/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * MobileAppBundleId @@ -41,18 +46,32 @@ MobileAppBundleId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class MobileAppBundleId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class MobileAppBundleId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.MOBILE_APP_BUNDLE; public MobileAppBundleId() { } + @JsonCreator + public MobileAppBundleId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public MobileAppBundleId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,13 +96,8 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public MobileAppBundleId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** - * Get entityType + * string * @return entityType */ @javax.annotation.Nonnull @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } MobileAppBundleId mobileAppBundleId = (MobileAppBundleId) o; return Objects.equals(this.id, mobileAppBundleId.id) && - Objects.equals(this.entityType, mobileAppBundleId.entityType); + Objects.equals(this.entityType, mobileAppBundleId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MobileAppBundleId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("MobileAppBundleId", MobileAppBundleId.class); + JSON.registerDiscriminator(MobileAppBundleId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/MobileAppId.java b/ce/src/main/java/org/thingsboard/client/model/MobileAppId.java index 1a70f01b..6f514a8f 100644 --- a/ce/src/main/java/org/thingsboard/client/model/MobileAppId.java +++ b/ce/src/main/java/org/thingsboard/client/model/MobileAppId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * MobileAppId @@ -41,18 +46,32 @@ MobileAppId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class MobileAppId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class MobileAppId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.MOBILE_APP; public MobileAppId() { } + @JsonCreator + public MobileAppId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public MobileAppId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,13 +96,8 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public MobileAppId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** - * Get entityType + * string * @return entityType */ @javax.annotation.Nonnull @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } MobileAppId mobileAppId = (MobileAppId) o; return Objects.equals(this.id, mobileAppId.id) && - Objects.equals(this.entityType, mobileAppId.entityType); + Objects.equals(this.entityType, mobileAppId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MobileAppId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("MobileAppId", MobileAppId.class); + JSON.registerDiscriminator(MobileAppId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java index 97cc594a..9268f516 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public NewPlatformVersionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public NewPlatformVersionRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationId.java b/ce/src/main/java/org/thingsboard/client/model/NotificationId.java index 21266446..c3698dcc 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationId.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * NotificationId @@ -41,18 +46,32 @@ NotificationId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class NotificationId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class NotificationId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.NOTIFICATION; public NotificationId() { } + @JsonCreator + public NotificationId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public NotificationId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public NotificationId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } NotificationId notificationId = (NotificationId) o; return Objects.equals(this.id, notificationId.id) && - Objects.equals(this.entityType, notificationId.entityType); + Objects.equals(this.entityType, notificationId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationId", NotificationId.class); + JSON.registerDiscriminator(NotificationId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationRequestId.java b/ce/src/main/java/org/thingsboard/client/model/NotificationRequestId.java index 353f62f2..e944e9ea 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationRequestId.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationRequestId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * NotificationRequestId @@ -41,18 +46,32 @@ NotificationRequestId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class NotificationRequestId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class NotificationRequestId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.NOTIFICATION_REQUEST; public NotificationRequestId() { } + @JsonCreator + public NotificationRequestId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public NotificationRequestId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public NotificationRequestId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } NotificationRequestId notificationRequestId = (NotificationRequestId) o; return Objects.equals(this.id, notificationRequestId.id) && - Objects.equals(this.entityType, notificationRequestId.entityType); + Objects.equals(this.entityType, notificationRequestId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationRequestId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationRequestId", NotificationRequestId.class); + JSON.registerDiscriminator(NotificationRequestId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationRuleId.java b/ce/src/main/java/org/thingsboard/client/model/NotificationRuleId.java index 04c7333e..92516edd 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationRuleId.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationRuleId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * NotificationRuleId @@ -41,18 +46,32 @@ NotificationRuleId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class NotificationRuleId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class NotificationRuleId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.NOTIFICATION_RULE; public NotificationRuleId() { } + @JsonCreator + public NotificationRuleId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public NotificationRuleId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public NotificationRuleId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } NotificationRuleId notificationRuleId = (NotificationRuleId) o; return Objects.equals(this.id, notificationRuleId.id) && - Objects.equals(this.entityType, notificationRuleId.entityType); + Objects.equals(this.entityType, notificationRuleId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationRuleId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationRuleId", NotificationRuleId.class); + JSON.registerDiscriminator(NotificationRuleId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java index 39e2665d..ce7dc974 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java @@ -67,13 +67,13 @@ public class NotificationRuleRecipientsConfig { public static final String JSON_PROPERTY_TRIGGER_TYPE = "triggerType"; - @javax.annotation.Nonnull + @javax.annotation.Nullable private NotificationRuleTriggerType triggerType; public NotificationRuleRecipientsConfig() { } - public NotificationRuleRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public NotificationRuleRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.triggerType = triggerType; return this; } @@ -82,17 +82,17 @@ public NotificationRuleRecipientsConfig triggerType(@javax.annotation.Nonnull No * Get triggerType * @return triggerType */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public NotificationRuleTriggerType getTriggerType() { return triggerType; } - @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTriggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTriggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.triggerType = triggerType; } diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationTargetExportData.java b/ce/src/main/java/org/thingsboard/client/model/NotificationTargetExportData.java index 026690e8..84fa3fcb 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationTargetExportData.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationTargetExportData.java @@ -21,9 +21,12 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; @@ -33,192 +36,61 @@ import java.util.Map; import org.thingsboard.client.model.AttributeExportData; import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; import org.thingsboard.client.model.EntityRelation; import org.thingsboard.client.model.EntityType; import org.thingsboard.client.model.ExportableEntity; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * NotificationTargetExportData */ @JsonPropertyOrder({ - NotificationTargetExportData.JSON_PROPERTY_ENTITY, - NotificationTargetExportData.JSON_PROPERTY_ENTITY_TYPE, - NotificationTargetExportData.JSON_PROPERTY_RELATIONS, - NotificationTargetExportData.JSON_PROPERTY_ATTRIBUTES, - NotificationTargetExportData.JSON_PROPERTY_CALCULATED_FIELDS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class NotificationTargetExportData { - public static final String JSON_PROPERTY_ENTITY = "entity"; - @javax.annotation.Nullable - private ExportableEntity entity; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; - - public static final String JSON_PROPERTY_RELATIONS = "relations"; - @javax.annotation.Nullable - private List relations = new ArrayList<>(); - - public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - @javax.annotation.Nullable - private Map> attributes = new HashMap<>(); - - public static final String JSON_PROPERTY_CALCULATED_FIELDS = "calculatedFields"; - @javax.annotation.Nullable - private List calculatedFields = new ArrayList<>(); +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class NotificationTargetExportData extends EntityExportData { public NotificationTargetExportData() { } - public NotificationTargetExportData entity(@javax.annotation.Nullable ExportableEntity entity) { - this.entity = entity; - return this; - } - - /** - * Get entity - * @return entity - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ENTITY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ExportableEntity getEntity() { - return entity; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEntity(@javax.annotation.Nullable ExportableEntity entity) { - this.entity = entity; - } - - + @Override public NotificationTargetExportData entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * Get entityType - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - - public NotificationTargetExportData relations(@javax.annotation.Nullable List relations) { - this.relations = relations; + @Override + public NotificationTargetExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); return this; } - public NotificationTargetExportData addRelationsItem(EntityRelation relationsItem) { - if (this.relations == null) { - this.relations = new ArrayList<>(); - } - this.relations.add(relationsItem); + @Override + public NotificationTargetExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); return this; } - /** - * Get relations - * @return relations - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_RELATIONS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getRelations() { - return relations; - } - - - @JsonProperty(value = JSON_PROPERTY_RELATIONS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRelations(@javax.annotation.Nullable List relations) { - this.relations = relations; - } - - + @Override public NotificationTargetExportData attributes(@javax.annotation.Nullable Map> attributes) { - this.attributes = attributes; - return this; - } - - public NotificationTargetExportData putAttributesItem(String key, List attributesItem) { - if (this.attributes == null) { - this.attributes = new HashMap<>(); - } - this.attributes.put(key, attributesItem); + this.setAttributes(attributes); return this; } - /** - * Map of attributes where key is the scope of attributes and value is the list of attributes for that scope - * @return attributes - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ATTRIBUTES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map> getAttributes() { - return attributes; - } - - - @JsonProperty(value = JSON_PROPERTY_ATTRIBUTES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttributes(@javax.annotation.Nullable Map> attributes) { - this.attributes = attributes; - } - - + @Override public NotificationTargetExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { - this.calculatedFields = calculatedFields; - return this; - } - - public NotificationTargetExportData addCalculatedFieldsItem(CalculatedField calculatedFieldsItem) { - if (this.calculatedFields == null) { - this.calculatedFields = new ArrayList<>(); - } - this.calculatedFields.add(calculatedFieldsItem); + this.setCalculatedFields(calculatedFields); return this; } - /** - * Get calculatedFields - * @return calculatedFields - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CALCULATED_FIELDS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCalculatedFields() { - return calculatedFields; - } - - - @JsonProperty(value = JSON_PROPERTY_CALCULATED_FIELDS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCalculatedFields(@javax.annotation.Nullable List calculatedFields) { - this.calculatedFields = calculatedFields; - } - - /** * Return true if this NotificationTargetExportData object is equal to o. */ @@ -230,28 +102,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotificationTargetExportData notificationTargetExportData = (NotificationTargetExportData) o; - return Objects.equals(this.entity, notificationTargetExportData.entity) && - Objects.equals(this.entityType, notificationTargetExportData.entityType) && - Objects.equals(this.relations, notificationTargetExportData.relations) && - Objects.equals(this.attributes, notificationTargetExportData.attributes) && - Objects.equals(this.calculatedFields, notificationTargetExportData.calculatedFields); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(entity, entityType, relations, attributes, calculatedFields); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationTargetExportData {\n"); - sb.append(" entity: ").append(toIndentedString(entity)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); - sb.append(" relations: ").append(toIndentedString(relations)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" calculatedFields: ").append(toIndentedString(calculatedFields)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -299,16 +162,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `entity` to the URL query string - if (getEntity() != null) { - joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + // add `relations` to the URL query string if (getRelations() != null) { for (int i = 0; i < getRelations().size(); i++) { @@ -340,5 +203,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationTargetExportData", NotificationTargetExportData.class); + JSON.registerDiscriminator(NotificationTargetExportData.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationTargetId.java b/ce/src/main/java/org/thingsboard/client/model/NotificationTargetId.java index ffa24e3c..eb40a8cf 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationTargetId.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationTargetId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * NotificationTargetId @@ -41,18 +46,32 @@ NotificationTargetId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class NotificationTargetId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class NotificationTargetId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.NOTIFICATION_TARGET; public NotificationTargetId() { } + @JsonCreator + public NotificationTargetId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public NotificationTargetId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public NotificationTargetId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } NotificationTargetId notificationTargetId = (NotificationTargetId) o; return Objects.equals(this.id, notificationTargetId.id) && - Objects.equals(this.entityType, notificationTargetId.entityType); + Objects.equals(this.entityType, notificationTargetId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationTargetId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationTargetId", NotificationTargetId.class); + JSON.registerDiscriminator(NotificationTargetId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java b/ce/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java index 1e637658..3f51e8d2 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * NotificationTemplateId @@ -41,18 +46,32 @@ NotificationTemplateId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class NotificationTemplateId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class NotificationTemplateId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.NOTIFICATION_TEMPLATE; public NotificationTemplateId() { } + @JsonCreator + public NotificationTemplateId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public NotificationTemplateId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public NotificationTemplateId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } NotificationTemplateId notificationTemplateId = (NotificationTemplateId) o; return Objects.equals(this.id, notificationTemplateId.id) && - Objects.equals(this.entityType, notificationTemplateId.entityType); + Objects.equals(this.entityType, notificationTemplateId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationTemplateId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationTemplateId", NotificationTemplateId.class); + JSON.registerDiscriminator(NotificationTemplateId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java b/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java index 13d9d4af..dd9fee98 100644 --- a/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java +++ b/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * OAuth2ClientId @@ -41,18 +46,32 @@ OAuth2ClientId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class OAuth2ClientId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class OAuth2ClientId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.OAUTH2_CLIENT; public OAuth2ClientId() { } + @JsonCreator + public OAuth2ClientId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public OAuth2ClientId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,13 +96,8 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public OAuth2ClientId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** - * Get entityType + * string * @return entityType */ @javax.annotation.Nonnull @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } OAuth2ClientId oauth2ClientId = (OAuth2ClientId) o; return Objects.equals(this.id, oauth2ClientId.id) && - Objects.equals(this.entityType, oauth2ClientId.entityType); + Objects.equals(this.entityType, oauth2ClientId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OAuth2ClientId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("OAuth2ClientId", OAuth2ClientId.class); + JSON.registerDiscriminator(OAuth2ClientId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/OtaPackageId.java b/ce/src/main/java/org/thingsboard/client/model/OtaPackageId.java index 1630b3c7..890a9fe2 100644 --- a/ce/src/main/java/org/thingsboard/client/model/OtaPackageId.java +++ b/ce/src/main/java/org/thingsboard/client/model/OtaPackageId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * OtaPackageId @@ -41,18 +46,32 @@ OtaPackageId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class OtaPackageId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class OtaPackageId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.OTA_PACKAGE; public OtaPackageId() { } + @JsonCreator + public OtaPackageId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public OtaPackageId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public OtaPackageId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } OtaPackageId otaPackageId = (OtaPackageId) o; return Objects.equals(this.id, otaPackageId.id) && - Objects.equals(this.entityType, otaPackageId.entityType); + Objects.equals(this.entityType, otaPackageId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OtaPackageId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("OtaPackageId", OtaPackageId.class); + JSON.registerDiscriminator(OtaPackageId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/QueueId.java b/ce/src/main/java/org/thingsboard/client/model/QueueId.java index 07f86fc6..498b02cb 100644 --- a/ce/src/main/java/org/thingsboard/client/model/QueueId.java +++ b/ce/src/main/java/org/thingsboard/client/model/QueueId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * QueueId @@ -41,18 +46,32 @@ QueueId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class QueueId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class QueueId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.QUEUE; public QueueId() { } + @JsonCreator + public QueueId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public QueueId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public QueueId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } QueueId queueId = (QueueId) o; return Objects.equals(this.id, queueId.id) && - Objects.equals(this.entityType, queueId.entityType); + Objects.equals(this.entityType, queueId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class QueueId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("QueueId", QueueId.class); + JSON.registerDiscriminator(QueueId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/QueueStatsId.java b/ce/src/main/java/org/thingsboard/client/model/QueueStatsId.java index b11bdee7..7c528fe4 100644 --- a/ce/src/main/java/org/thingsboard/client/model/QueueStatsId.java +++ b/ce/src/main/java/org/thingsboard/client/model/QueueStatsId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * QueueStatsId @@ -41,18 +46,32 @@ QueueStatsId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class QueueStatsId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class QueueStatsId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.QUEUE_STATS; public QueueStatsId() { } + @JsonCreator + public QueueStatsId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public QueueStatsId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public QueueStatsId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } QueueStatsId queueStatsId = (QueueStatsId) o; return Objects.equals(this.id, queueStatsId.id) && - Objects.equals(this.entityType, queueStatsId.entityType); + Objects.equals(this.entityType, queueStatsId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class QueueStatsId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("QueueStatsId", QueueStatsId.class); + JSON.registerDiscriminator(QueueStatsId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java index ddd4e212..d31ea72e 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public RateLimitsRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public RateLimitsRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java index fec24a83..2648f043 100644 --- a/ce/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public ResourceShortageRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public ResourceShortageRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/RpcId.java b/ce/src/main/java/org/thingsboard/client/model/RpcId.java index 1239c609..824864d9 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RpcId.java +++ b/ce/src/main/java/org/thingsboard/client/model/RpcId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * RpcId @@ -41,18 +46,32 @@ RpcId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class RpcId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class RpcId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.RPC; public RpcId() { } + @JsonCreator + public RpcId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public RpcId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public RpcId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } RpcId rpcId = (RpcId) o; return Objects.equals(this.id, rpcId.id) && - Objects.equals(this.entityType, rpcId.entityType); + Objects.equals(this.entityType, rpcId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RpcId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RpcId", RpcId.class); + JSON.registerDiscriminator(RpcId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleChainId.java b/ce/src/main/java/org/thingsboard/client/model/RuleChainId.java index 2eb75b35..8e8859e2 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RuleChainId.java +++ b/ce/src/main/java/org/thingsboard/client/model/RuleChainId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * RuleChainId @@ -41,18 +46,32 @@ RuleChainId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class RuleChainId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class RuleChainId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.RULE_CHAIN; public RuleChainId() { } + @JsonCreator + public RuleChainId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public RuleChainId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public RuleChainId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } RuleChainId ruleChainId = (RuleChainId) o; return Objects.equals(this.id, ruleChainId.id) && - Objects.equals(this.entityType, ruleChainId.entityType); + Objects.equals(this.entityType, ruleChainId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RuleChainId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RuleChainId", RuleChainId.class); + JSON.registerDiscriminator(RuleChainId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java index ba2ded17..ecb3241e 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public RuleEngineComponentLifecycleEventRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public RuleEngineComponentLifecycleEventRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleNodeId.java b/ce/src/main/java/org/thingsboard/client/model/RuleNodeId.java index 958781cb..e98f3775 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RuleNodeId.java +++ b/ce/src/main/java/org/thingsboard/client/model/RuleNodeId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * RuleNodeId @@ -41,18 +46,32 @@ RuleNodeId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class RuleNodeId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class RuleNodeId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.RULE_NODE; public RuleNodeId() { } + @JsonCreator + public RuleNodeId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public RuleNodeId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public RuleNodeId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } RuleNodeId ruleNodeId = (RuleNodeId) o; return Objects.equals(this.id, ruleNodeId.id) && - Objects.equals(this.entityType, ruleNodeId.entityType); + Objects.equals(this.entityType, ruleNodeId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RuleNodeId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RuleNodeId", RuleNodeId.class); + JSON.registerDiscriminator(RuleNodeId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java index b6f7856b..befe1f1e 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public TaskProcessingFailureRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public TaskProcessingFailureRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/TbResource.java b/ce/src/main/java/org/thingsboard/client/model/TbResource.java index c7038ad5..55c80c42 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TbResource.java +++ b/ce/src/main/java/org/thingsboard/client/model/TbResource.java @@ -54,8 +54,8 @@ TbResource.JSON_PROPERTY_PREVIEW, TbResource.JSON_PROPERTY_NAME, TbResource.JSON_PROPERTY_PUBLIC, - TbResource.JSON_PROPERTY_LINK, - TbResource.JSON_PROPERTY_PUBLIC_LINK + TbResource.JSON_PROPERTY_PUBLIC_LINK, + TbResource.JSON_PROPERTY_LINK }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class TbResource { @@ -119,14 +119,14 @@ public class TbResource { @javax.annotation.Nullable private Boolean _public; - public static final String JSON_PROPERTY_LINK = "link"; - @javax.annotation.Nullable - private String link; - public static final String JSON_PROPERTY_PUBLIC_LINK = "publicLink"; @javax.annotation.Nullable private String publicLink; + public static final String JSON_PROPERTY_LINK = "link"; + @javax.annotation.Nullable + private String link; + public TbResource() { } @@ -136,16 +136,16 @@ public TbResource( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_ETAG) String etag, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_LINK) String link, - @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink + @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink, + @JsonProperty(JSON_PROPERTY_LINK) String link ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.etag = etag; this.name = name; - this.link = link; this.publicLink = publicLink; + this.link = link; } public TbResource id(@javax.annotation.Nullable TbResourceId id) { @@ -469,28 +469,28 @@ public void setPublic(@javax.annotation.Nullable Boolean _public) { /** - * Get link - * @return link + * Get publicLink + * @return publicLink */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLink() { - return link; + public String getPublicLink() { + return publicLink; } /** - * Get publicLink - * @return publicLink + * Get link + * @return link */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicLink() { - return publicLink; + public String getLink() { + return link; } @@ -523,13 +523,13 @@ public boolean equals(Object o) { Objects.equals(this.preview, tbResource.preview) && Objects.equals(this.name, tbResource.name) && Objects.equals(this._public, tbResource._public) && - Objects.equals(this.link, tbResource.link) && - Objects.equals(this.publicLink, tbResource.publicLink); + Objects.equals(this.publicLink, tbResource.publicLink) && + Objects.equals(this.link, tbResource.link); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, data, preview, name, _public, link, publicLink); + return Objects.hash(id, createdTime, tenantId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, data, preview, name, _public, publicLink, link); } @Override @@ -551,8 +551,8 @@ public String toString() { sb.append(" preview: ").append(toIndentedString(preview)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); - sb.append(" link: ").append(toIndentedString(link)).append("\n"); sb.append(" publicLink: ").append(toIndentedString(publicLink)).append("\n"); + sb.append(" link: ").append(toIndentedString(link)).append("\n"); sb.append("}"); return sb.toString(); } @@ -675,16 +675,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%spublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublic())))); } - // add `link` to the URL query string - if (getLink() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%slink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLink())))); - } - // add `publicLink` to the URL query string if (getPublicLink() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%spublicLink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublicLink())))); } + // add `link` to the URL query string + if (getLink() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%slink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLink())))); + } + return joiner.toString(); } } diff --git a/ce/src/main/java/org/thingsboard/client/model/TbResourceId.java b/ce/src/main/java/org/thingsboard/client/model/TbResourceId.java index 76518ea8..0450b352 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TbResourceId.java +++ b/ce/src/main/java/org/thingsboard/client/model/TbResourceId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * TbResourceId @@ -41,18 +46,32 @@ TbResourceId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class TbResourceId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class TbResourceId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.TB_RESOURCE; public TbResourceId() { } + @JsonCreator + public TbResourceId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public TbResourceId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public TbResourceId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } TbResourceId tbResourceId = (TbResourceId) o; return Objects.equals(this.id, tbResourceId.id) && - Objects.equals(this.entityType, tbResourceId.entityType); + Objects.equals(this.entityType, tbResourceId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TbResourceId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TbResourceId", TbResourceId.class); + JSON.registerDiscriminator(TbResourceId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/TbResourceInfo.java b/ce/src/main/java/org/thingsboard/client/model/TbResourceInfo.java index 2e666e3d..cd300caa 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TbResourceInfo.java +++ b/ce/src/main/java/org/thingsboard/client/model/TbResourceInfo.java @@ -52,8 +52,8 @@ TbResourceInfo.JSON_PROPERTY_DESCRIPTOR, TbResourceInfo.JSON_PROPERTY_NAME, TbResourceInfo.JSON_PROPERTY_PUBLIC, - TbResourceInfo.JSON_PROPERTY_LINK, - TbResourceInfo.JSON_PROPERTY_PUBLIC_LINK + TbResourceInfo.JSON_PROPERTY_PUBLIC_LINK, + TbResourceInfo.JSON_PROPERTY_LINK }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class TbResourceInfo { @@ -109,14 +109,14 @@ public class TbResourceInfo { @javax.annotation.Nullable private Boolean _public; - public static final String JSON_PROPERTY_LINK = "link"; - @javax.annotation.Nullable - private String link; - public static final String JSON_PROPERTY_PUBLIC_LINK = "publicLink"; @javax.annotation.Nullable private String publicLink; + public static final String JSON_PROPERTY_LINK = "link"; + @javax.annotation.Nullable + private String link; + public TbResourceInfo() { } @@ -126,16 +126,16 @@ public TbResourceInfo( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_ETAG) String etag, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_LINK) String link, - @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink + @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink, + @JsonProperty(JSON_PROPERTY_LINK) String link ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.etag = etag; this.name = name; - this.link = link; this.publicLink = publicLink; + this.link = link; } public TbResourceInfo id(@javax.annotation.Nullable TbResourceId id) { @@ -411,28 +411,28 @@ public void setPublic(@javax.annotation.Nullable Boolean _public) { /** - * Get link - * @return link + * Get publicLink + * @return publicLink */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLink() { - return link; + public String getPublicLink() { + return publicLink; } /** - * Get publicLink - * @return publicLink + * Get link + * @return link */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicLink() { - return publicLink; + public String getLink() { + return link; } @@ -463,13 +463,13 @@ public boolean equals(Object o) { Objects.equals(this.descriptor, tbResourceInfo.descriptor) && Objects.equals(this.name, tbResourceInfo.name) && Objects.equals(this._public, tbResourceInfo._public) && - Objects.equals(this.link, tbResourceInfo.link) && - Objects.equals(this.publicLink, tbResourceInfo.publicLink); + Objects.equals(this.publicLink, tbResourceInfo.publicLink) && + Objects.equals(this.link, tbResourceInfo.link); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, name, _public, link, publicLink); + return Objects.hash(id, createdTime, tenantId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, name, _public, publicLink, link); } @Override @@ -489,8 +489,8 @@ public String toString() { sb.append(" descriptor: ").append(toIndentedString(descriptor)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); - sb.append(" link: ").append(toIndentedString(link)).append("\n"); sb.append(" publicLink: ").append(toIndentedString(publicLink)).append("\n"); + sb.append(" link: ").append(toIndentedString(link)).append("\n"); sb.append("}"); return sb.toString(); } @@ -603,16 +603,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%spublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublic())))); } - // add `link` to the URL query string - if (getLink() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%slink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLink())))); - } - // add `publicLink` to the URL query string if (getPublicLink() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%spublicLink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublicLink())))); } + // add `link` to the URL query string + if (getLink() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%slink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLink())))); + } + return joiner.toString(); } } diff --git a/ce/src/main/java/org/thingsboard/client/model/TenantId.java b/ce/src/main/java/org/thingsboard/client/model/TenantId.java index 70448feb..a1028179 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TenantId.java +++ b/ce/src/main/java/org/thingsboard/client/model/TenantId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * TenantId @@ -41,18 +46,32 @@ TenantId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class TenantId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class TenantId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.TENANT; public TenantId() { } + @JsonCreator + public TenantId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public TenantId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public TenantId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } TenantId tenantId = (TenantId) o; return Objects.equals(this.id, tenantId.id) && - Objects.equals(this.entityType, tenantId.entityType); + Objects.equals(this.entityType, tenantId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TenantId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TenantId", TenantId.class); + JSON.registerDiscriminator(TenantId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/TenantProfileId.java b/ce/src/main/java/org/thingsboard/client/model/TenantProfileId.java index 0576c6ec..daf46fd9 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TenantProfileId.java +++ b/ce/src/main/java/org/thingsboard/client/model/TenantProfileId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * TenantProfileId @@ -41,18 +46,32 @@ TenantProfileId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class TenantProfileId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class TenantProfileId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.TENANT_PROFILE; public TenantProfileId() { } + @JsonCreator + public TenantProfileId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public TenantProfileId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public TenantProfileId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } TenantProfileId tenantProfileId = (TenantProfileId) o; return Objects.equals(this.id, tenantProfileId.id) && - Objects.equals(this.entityType, tenantProfileId.entityType); + Objects.equals(this.entityType, tenantProfileId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TenantProfileId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TenantProfileId", TenantProfileId.class); + JSON.registerDiscriminator(TenantProfileId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/UserId.java b/ce/src/main/java/org/thingsboard/client/model/UserId.java index faa2d819..689dfd50 100644 --- a/ce/src/main/java/org/thingsboard/client/model/UserId.java +++ b/ce/src/main/java/org/thingsboard/client/model/UserId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * UserId @@ -41,18 +46,32 @@ UserId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class UserId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class UserId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.USER; public UserId() { } + @JsonCreator + public UserId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public UserId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public UserId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } UserId userId = (UserId) o; return Objects.equals(this.id, userId.id) && - Objects.equals(this.entityType, userId.entityType); + Objects.equals(this.entityType, userId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UserId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("UserId", UserId.class); + JSON.registerDiscriminator(UserId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/WidgetTypeId.java b/ce/src/main/java/org/thingsboard/client/model/WidgetTypeId.java index ec1a73ad..77b5cac3 100644 --- a/ce/src/main/java/org/thingsboard/client/model/WidgetTypeId.java +++ b/ce/src/main/java/org/thingsboard/client/model/WidgetTypeId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * WidgetTypeId @@ -41,18 +46,32 @@ WidgetTypeId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class WidgetTypeId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class WidgetTypeId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.WIDGET_TYPE; public WidgetTypeId() { } + @JsonCreator + public WidgetTypeId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public WidgetTypeId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public WidgetTypeId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } WidgetTypeId widgetTypeId = (WidgetTypeId) o; return Objects.equals(this.id, widgetTypeId.id) && - Objects.equals(this.entityType, widgetTypeId.entityType); + Objects.equals(this.entityType, widgetTypeId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class WidgetTypeId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("WidgetTypeId", WidgetTypeId.class); + JSON.registerDiscriminator(WidgetTypeId.class, "entityType", mappings); +} } diff --git a/ce/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java b/ce/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java index 4661fdaa..e0e23f95 100644 --- a/ce/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java +++ b/ce/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java @@ -21,17 +21,22 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * WidgetsBundleId @@ -41,18 +46,32 @@ WidgetsBundleId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class WidgetsBundleId { +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class WidgetsBundleId extends EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull private UUID id; public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull - private EntityType entityType; + private EntityType entityType = EntityType.WIDGETS_BUNDLE; public WidgetsBundleId() { } + @JsonCreator + public WidgetsBundleId( + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType + ) { + this(); + this.entityType = entityType; + } + public WidgetsBundleId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; @@ -77,11 +96,6 @@ public void setId(@javax.annotation.Nonnull UUID id) { } - public WidgetsBundleId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - return this; - } - /** * string * @return entityType @@ -94,11 +108,6 @@ public EntityType getEntityType() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } /** @@ -114,18 +123,20 @@ public boolean equals(Object o) { } WidgetsBundleId widgetsBundleId = (WidgetsBundleId) o; return Objects.equals(this.id, widgetsBundleId.id) && - Objects.equals(this.entityType, widgetsBundleId.entityType); + Objects.equals(this.entityType, widgetsBundleId.entityType) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(id, entityType, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class WidgetsBundleId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); @@ -187,5 +198,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("WidgetsBundleId", WidgetsBundleId.class); + JSON.registerDiscriminator(WidgetsBundleId.class, "entityType", mappings); +} } diff --git a/ce/src/test/java/org/thingsboard/client/api/AlarmApiTest.java b/ce/src/test/java/org/thingsboard/client/api/AlarmApiTest.java index 8aea93d9..6aea8da2 100644 --- a/ce/src/test/java/org/thingsboard/client/api/AlarmApiTest.java +++ b/ce/src/test/java/org/thingsboard/client/api/AlarmApiTest.java @@ -62,10 +62,7 @@ void testAlarmLifecycle() throws ApiException { Alarm alarm = new Alarm(); alarm.setType(((i % 2 == 0) ? "Temperature Alarm" : "Connection Alarm")); alarm.setSeverity(((i % 2 == 0) ? AlarmSeverity.CRITICAL : AlarmSeverity.WARNING)); - EntityId originator = new EntityId(); - originator.setEntityType(EntityType.DEVICE); - originator.setId((i % 2 == 0) ? createdDevice1.getId().getId() : createdDevice2.getId().getId()); - alarm.setOriginator(originator); + alarm.setOriginator((i % 2 == 0) ? createdDevice1.getId() : createdDevice2.getId()); Alarm createdAlarm = client.saveAlarm(alarm); assertNotNull(createdAlarm); diff --git a/ce/src/test/java/org/thingsboard/client/api/AlarmCommentApiTest.java b/ce/src/test/java/org/thingsboard/client/api/AlarmCommentApiTest.java index 0e522783..b79bc666 100644 --- a/ce/src/test/java/org/thingsboard/client/api/AlarmCommentApiTest.java +++ b/ce/src/test/java/org/thingsboard/client/api/AlarmCommentApiTest.java @@ -52,10 +52,7 @@ void testAlarmComments() throws ApiException { Alarm alarm = new Alarm(); alarm.setType("Temperature Alarm"); alarm.setSeverity(AlarmSeverity.CRITICAL); - EntityId originator = new EntityId(); - originator.setEntityType(EntityType.DEVICE); - originator.setId(createdDevice.getId().getId()); - alarm.setOriginator(originator); + alarm.setOriginator(createdDevice.getId()); Alarm createdAlarm = client.saveAlarm(alarm); String alarmId = createdAlarm.getId().getId().toString(); diff --git a/ce/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java b/ce/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java index 1f730709..6a26c3ac 100644 --- a/ce/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java +++ b/ce/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java @@ -72,10 +72,7 @@ void testCalculatedFieldLifecycle() throws ApiException { cf.setName(TEST_PREFIX + "CalcField_" + timestamp + "_" + i); cf.setType(CalculatedFieldType.SIMPLE); - EntityId entityId = new EntityId(); - entityId.setEntityType(EntityType.DEVICE); - entityId.setId(createdDevice1.getId().getId()); - cf.setEntityId(entityId); + cf.setEntityId(createdDevice1.getId()); SimpleCalculatedFieldConfiguration config = new SimpleCalculatedFieldConfiguration(); @@ -108,11 +105,7 @@ void testCalculatedFieldLifecycle() throws ApiException { CalculatedField cf = new CalculatedField(); cf.setName(TEST_PREFIX + "CalcField2_" + timestamp + "_" + i); cf.setType(CalculatedFieldType.SIMPLE); - - EntityId entityId = new EntityId(); - entityId.setEntityType(EntityType.DEVICE); - entityId.setId(createdDevice2.getId().getId()); - cf.setEntityId(entityId); + cf.setEntityId(createdDevice2.getId()); SimpleCalculatedFieldConfiguration config = new SimpleCalculatedFieldConfiguration(); @@ -236,10 +229,7 @@ void testAlarmCalculatedFieldLifecycle() throws ApiException { cf.setName(TEST_PREFIX + "AlarmCalcField_" + timestamp); cf.setType(CalculatedFieldType.ALARM); - EntityId entityId = new EntityId(); - entityId.setEntityType(EntityType.DEVICE); - entityId.setId(createdDevice.getId().getId()); - cf.setEntityId(entityId); + cf.setEntityId(createdDevice.getId()); cf.setConfiguration(config); CalculatedField created = client.saveCalculatedField(cf); diff --git a/ce/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java b/ce/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java index fdd06b26..c8574f4c 100644 --- a/ce/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java +++ b/ce/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java @@ -38,14 +38,6 @@ public class EntityRelationApiTest extends AbstractApiTest { - private EntityId entityId(Device device) { - return new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE); - } - - private EntityId entityId(Asset asset) { - return new EntityId().id(asset.getId().getId()).entityType(EntityType.ASSET); - } - @Test void testEntityRelationLifecycle() throws ApiException { long timestamp = System.currentTimeMillis(); @@ -78,8 +70,8 @@ void testEntityRelationLifecycle() throws ApiException { // create relations: building -> Contains -> floor, floor -> Contains -> device1/device2/device3 EntityRelation buildingToFloor = new EntityRelation(); - buildingToFloor.setFrom(entityId(building)); - buildingToFloor.setTo(entityId(floor)); + buildingToFloor.setFrom(building.getId()); + buildingToFloor.setTo(floor.getId()); buildingToFloor.setType("Contains"); buildingToFloor.setTypeGroup(RelationTypeGroup.COMMON); EntityRelation savedRelation = client.saveRelation(buildingToFloor); @@ -87,17 +79,17 @@ void testEntityRelationLifecycle() throws ApiException { assertEquals("Contains", savedRelation.getType()); client.saveRelation(new EntityRelation() - .from(entityId(floor)) - .to(entityId(device1)) + .from(floor.getId()) + .to(device1.getId()) .type("Contains") .typeGroup(RelationTypeGroup.COMMON)); client.saveRelation(new EntityRelation() - .from(entityId(floor)) - .to(entityId(device2)) + .from(floor.getId()) + .to(device2.getId()) .type("Contains").typeGroup(RelationTypeGroup.COMMON)); client.saveRelation(new EntityRelation() - .from(entityId(floor)) - .to(entityId(device3)) + .from(floor.getId()) + .to(device3.getId()) .type("Manages") .typeGroup(RelationTypeGroup.COMMON)); diff --git a/ce/src/test/java/org/thingsboard/client/api/EntityViewApiTest.java b/ce/src/test/java/org/thingsboard/client/api/EntityViewApiTest.java index 147a6432..149c468e 100644 --- a/ce/src/test/java/org/thingsboard/client/api/EntityViewApiTest.java +++ b/ce/src/test/java/org/thingsboard/client/api/EntityViewApiTest.java @@ -48,9 +48,7 @@ void testSaveAndGetEntityView() throws Exception { EntityView ev = new EntityView(); ev.setName(EV_PREFIX + "save_" + ts); ev.setType("testType"); - ev.setEntityId(new EntityId() - .id(device.getId().getId()) - .entityType(EntityType.DEVICE)); + ev.setEntityId(device.getId()); ev.setKeys(new TelemetryEntityView() .timeseries(List.of("temperature", "humidity")) .attributes(new AttributesEntityView() @@ -256,9 +254,7 @@ private EntityView createEntityView(String name, String type, Device device) thr EntityView ev = new EntityView(); ev.setName(name); ev.setType(type); - ev.setEntityId(new EntityId() - .id(device.getId().getId()) - .entityType(EntityType.DEVICE)); + ev.setEntityId(device.getId()); ev.setKeys(new TelemetryEntityView() .timeseries(List.of("temperature")) .attributes(new AttributesEntityView() diff --git a/ce/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java b/ce/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java index f71e2bc2..41c8dc3a 100644 --- a/ce/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java +++ b/ce/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java @@ -42,9 +42,7 @@ public class OtaPackageApiTest extends AbstractApiTest { private DeviceProfileId getDefaultDeviceProfileId() throws Exception { DeviceProfileInfo profileInfo = client.getDefaultDeviceProfileInfo(); - return new DeviceProfileId() - .id(profileInfo.getId().getId()) - .entityType(EntityType.DEVICE_PROFILE); + return (DeviceProfileId)profileInfo.getId(); } private SaveOtaPackageInfoRequest buildOtaPackageInfoRequest( From 836b1af8d7abcfd2008a5bc3d72a1aa4ff949b3f Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Tue, 10 Mar 2026 15:48:43 +0200 Subject: [PATCH 2/8] regenerated ce client --- ce/docs/AdminSettingsId.md | 2 - ce/docs/AiModelId.md | 2 - ce/docs/AlarmCommentId.md | 2 +- ce/docs/AlarmId.md | 2 - ce/docs/ApiKeyId.md | 2 - ce/docs/ApiUsageStateId.md | 2 - ce/docs/AssetId.md | 2 - ce/docs/AssetProfileId.md | 2 - ce/docs/AttributesOutput.md | 1 - ce/docs/AuditLogId.md | 2 +- ce/docs/CalculatedFieldId.md | 2 - ce/docs/ComponentDescriptorId.md | 2 +- ce/docs/CustomMobilePage.md | 1 - ce/docs/CustomerId.md | 2 - ce/docs/DashboardId.md | 2 - ce/docs/DashboardPage.md | 1 - ce/docs/DefaultMobilePage.md | 1 - ce/docs/DeviceCredentialsId.md | 2 +- ce/docs/DeviceId.md | 2 - ce/docs/DeviceProfileId.md | 2 - ce/docs/DomainId.md | 2 - ce/docs/EdgeEventId.md | 2 +- ce/docs/EdgeId.md | 2 - ce/docs/EntityViewId.md | 2 - ce/docs/EventId.md | 2 +- ce/docs/Failure.md | 1 - ce/docs/JobId.md | 2 - ce/docs/MobileAppBundleId.md | 2 - ce/docs/MobileAppId.md | 2 - ce/docs/NotificationId.md | 2 - ce/docs/NotificationRequestId.md | 2 - ce/docs/NotificationRuleId.md | 2 - ce/docs/NotificationTargetId.md | 2 - ce/docs/NotificationTemplateId.md | 2 - ce/docs/OAuth2ClientId.md | 2 - ce/docs/OAuth2ClientRegistrationTemplateId.md | 2 +- ce/docs/OtaPackageId.md | 2 - ce/docs/QrCodeSettingsId.md | 2 +- ce/docs/QueueId.md | 2 - ce/docs/QueueStatsId.md | 2 - ce/docs/RpcId.md | 2 - ce/docs/RuleChainId.md | 2 - ce/docs/RuleNodeId.md | 2 - ce/docs/Success.md | 1 - ce/docs/TbResourceId.md | 2 - ce/docs/TenantId.md | 2 - ce/docs/TenantProfileId.md | 2 - ce/docs/TimeSeriesOutput.md | 1 - ce/docs/UserId.md | 2 - ce/docs/WebViewPage.md | 1 - ce/docs/WidgetTypeId.md | 2 - ce/docs/WidgetsBundleId.md | 2 - ce/spec/openapi.json | 1160 +---------------- .../client/model/AdminSettingsId.java | 65 +- .../thingsboard/client/model/AiModelId.java | 65 +- .../client/model/AlarmCommentId.java | 2 +- .../org/thingsboard/client/model/AlarmId.java | 65 +- .../thingsboard/client/model/ApiKeyId.java | 65 +- .../client/model/ApiUsageStateId.java | 65 +- .../org/thingsboard/client/model/AssetId.java | 65 +- .../client/model/AssetProfileId.java | 65 +- .../client/model/AttributesOutput.java | 57 +- .../thingsboard/client/model/AuditLogId.java | 18 +- .../client/model/CalculatedFieldId.java | 65 +- .../client/model/ComponentDescriptorId.java | 18 +- .../client/model/CustomMobilePage.java | 39 +- .../thingsboard/client/model/CustomerId.java | 65 +- .../thingsboard/client/model/DashboardId.java | 65 +- .../client/model/DashboardPage.java | 39 +- .../client/model/DefaultMobilePage.java | 39 +- .../client/model/DeviceCredentialsId.java | 18 +- .../thingsboard/client/model/DeviceId.java | 65 +- .../client/model/DeviceProfileId.java | 65 +- .../thingsboard/client/model/DomainId.java | 65 +- .../thingsboard/client/model/EdgeEventId.java | 18 +- .../org/thingsboard/client/model/EdgeId.java | 65 +- ...gregationCalculatedFieldConfiguration.java | 2 +- .../client/model/EntityViewId.java | 65 +- .../org/thingsboard/client/model/EventId.java | 18 +- .../org/thingsboard/client/model/Failure.java | 35 +- ...eofencingCalculatedFieldConfiguration.java | 2 +- .../org/thingsboard/client/model/JobId.java | 65 +- .../client/model/MobileAppBundleId.java | 65 +- .../thingsboard/client/model/MobileAppId.java | 65 +- .../client/model/NotificationId.java | 65 +- .../client/model/NotificationRequestId.java | 65 +- .../client/model/NotificationRuleId.java | 65 +- .../client/model/NotificationTargetId.java | 65 +- .../client/model/NotificationTemplateId.java | 65 +- .../client/model/OAuth2ClientId.java | 65 +- .../OAuth2ClientRegistrationTemplateId.java | 18 +- .../client/model/OtaPackageId.java | 65 +- ...opagationCalculatedFieldConfiguration.java | 2 +- .../client/model/QrCodeSettingsId.java | 2 +- .../org/thingsboard/client/model/QueueId.java | 65 +- .../client/model/QueueStatsId.java | 65 +- ...gregationCalculatedFieldConfiguration.java | 2 +- .../org/thingsboard/client/model/RpcId.java | 65 +- .../thingsboard/client/model/RuleChainId.java | 65 +- .../thingsboard/client/model/RuleNodeId.java | 65 +- .../ScriptCalculatedFieldConfiguration.java | 2 +- .../SimpleCalculatedFieldConfiguration.java | 2 +- .../org/thingsboard/client/model/Success.java | 35 +- .../client/model/TbResourceId.java | 65 +- .../thingsboard/client/model/TenantId.java | 65 +- .../client/model/TenantProfileId.java | 65 +- .../client/model/TimeSeriesOutput.java | 57 +- .../org/thingsboard/client/model/UserId.java | 65 +- .../thingsboard/client/model/WebViewPage.java | 39 +- .../client/model/WidgetTypeId.java | 65 +- .../client/model/WidgetsBundleId.java | 65 +- 111 files changed, 501 insertions(+), 3559 deletions(-) diff --git a/ce/docs/AdminSettingsId.md b/ce/docs/AdminSettingsId.md index 475ce6cd..973867ee 100644 --- a/ce/docs/AdminSettingsId.md +++ b/ce/docs/AdminSettingsId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/AiModelId.md b/ce/docs/AiModelId.md index 69b11b5d..43b28eca 100644 --- a/ce/docs/AiModelId.md +++ b/ce/docs/AiModelId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | Entity type of the AI model | [readonly] | diff --git a/ce/docs/AlarmCommentId.md b/ce/docs/AlarmCommentId.md index d6c31660..05386ee8 100644 --- a/ce/docs/AlarmCommentId.md +++ b/ce/docs/AlarmCommentId.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | string | | +| **id** | **UUID** | ID of the entity, time-based UUID v1 | | diff --git a/ce/docs/AlarmId.md b/ce/docs/AlarmId.md index a6b2af56..b09db2e3 100644 --- a/ce/docs/AlarmId.md +++ b/ce/docs/AlarmId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/ApiKeyId.md b/ce/docs/ApiKeyId.md index e27c198e..b7485104 100644 --- a/ce/docs/ApiKeyId.md +++ b/ce/docs/ApiKeyId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/ApiUsageStateId.md b/ce/docs/ApiUsageStateId.md index 62bb3071..b3c83b2b 100644 --- a/ce/docs/ApiUsageStateId.md +++ b/ce/docs/ApiUsageStateId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/AssetId.md b/ce/docs/AssetId.md index 927dcf6c..181eab53 100644 --- a/ce/docs/AssetId.md +++ b/ce/docs/AssetId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/AssetProfileId.md b/ce/docs/AssetProfileId.md index a6ae3a70..ca31e5db 100644 --- a/ce/docs/AssetProfileId.md +++ b/ce/docs/AssetProfileId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/AttributesOutput.md b/ce/docs/AttributesOutput.md index b6af683b..61add930 100644 --- a/ce/docs/AttributesOutput.md +++ b/ce/docs/AttributesOutput.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **strategy** | **AttributesOutputStrategy** | | [optional] | diff --git a/ce/docs/AuditLogId.md b/ce/docs/AuditLogId.md index c92d14e0..40437321 100644 --- a/ce/docs/AuditLogId.md +++ b/ce/docs/AuditLogId.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | string | | +| **id** | **UUID** | | [optional] | diff --git a/ce/docs/CalculatedFieldId.md b/ce/docs/CalculatedFieldId.md index 4cc72d87..b3288aa3 100644 --- a/ce/docs/CalculatedFieldId.md +++ b/ce/docs/CalculatedFieldId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/ComponentDescriptorId.md b/ce/docs/ComponentDescriptorId.md index 8a0673b1..cffbddfd 100644 --- a/ce/docs/ComponentDescriptorId.md +++ b/ce/docs/ComponentDescriptorId.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | string | | +| **id** | **UUID** | | [optional] | diff --git a/ce/docs/CustomMobilePage.md b/ce/docs/CustomMobilePage.md index b90633e7..47ec52e8 100644 --- a/ce/docs/CustomMobilePage.md +++ b/ce/docs/CustomMobilePage.md @@ -10,7 +10,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **label** | **String** | Page label | [optional] | -| **visible** | **Boolean** | Indicates if page is visible | | | **icon** | **String** | URL of the page icon | [optional] | | **path** | **String** | Path to custom page | [optional] | diff --git a/ce/docs/CustomerId.md b/ce/docs/CustomerId.md index 75f233a2..9e077e20 100644 --- a/ce/docs/CustomerId.md +++ b/ce/docs/CustomerId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/DashboardId.md b/ce/docs/DashboardId.md index 7e0facb9..c75a60c9 100644 --- a/ce/docs/DashboardId.md +++ b/ce/docs/DashboardId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/DashboardPage.md b/ce/docs/DashboardPage.md index 446481be..c714b734 100644 --- a/ce/docs/DashboardPage.md +++ b/ce/docs/DashboardPage.md @@ -10,7 +10,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **label** | **String** | Page label | [optional] | -| **visible** | **Boolean** | Indicates if page is visible | | | **icon** | **String** | URL of the page icon | [optional] | | **dashboardId** | **String** | Dashboard id | [optional] | diff --git a/ce/docs/DefaultMobilePage.md b/ce/docs/DefaultMobilePage.md index 561f744e..f3ddbeca 100644 --- a/ce/docs/DefaultMobilePage.md +++ b/ce/docs/DefaultMobilePage.md @@ -10,7 +10,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **label** | **String** | Page label | [optional] | -| **visible** | **Boolean** | Indicates if page is visible | | | **icon** | **String** | URL of the page icon | [optional] | | **id** | **DefaultPageId** | Identifier for default page | [optional] | diff --git a/ce/docs/DeviceCredentialsId.md b/ce/docs/DeviceCredentialsId.md index 2ee8844c..7d21d320 100644 --- a/ce/docs/DeviceCredentialsId.md +++ b/ce/docs/DeviceCredentialsId.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | string | | +| **id** | **UUID** | | [optional] | diff --git a/ce/docs/DeviceId.md b/ce/docs/DeviceId.md index d38b321b..ba885a3a 100644 --- a/ce/docs/DeviceId.md +++ b/ce/docs/DeviceId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/DeviceProfileId.md b/ce/docs/DeviceProfileId.md index a9c229df..6927dd30 100644 --- a/ce/docs/DeviceProfileId.md +++ b/ce/docs/DeviceProfileId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/DomainId.md b/ce/docs/DomainId.md index 8a0c0b02..b831e844 100644 --- a/ce/docs/DomainId.md +++ b/ce/docs/DomainId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/EdgeEventId.md b/ce/docs/EdgeEventId.md index f967bb24..86b964f3 100644 --- a/ce/docs/EdgeEventId.md +++ b/ce/docs/EdgeEventId.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | string | | +| **id** | **UUID** | | [optional] | diff --git a/ce/docs/EdgeId.md b/ce/docs/EdgeId.md index 026a4029..f04c5af9 100644 --- a/ce/docs/EdgeId.md +++ b/ce/docs/EdgeId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/EntityViewId.md b/ce/docs/EntityViewId.md index f57fd80e..48cd0b85 100644 --- a/ce/docs/EntityViewId.md +++ b/ce/docs/EntityViewId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/EventId.md b/ce/docs/EventId.md index 667453f3..32ef60f1 100644 --- a/ce/docs/EventId.md +++ b/ce/docs/EventId.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | string | | +| **id** | **UUID** | | [optional] | diff --git a/ce/docs/Failure.md b/ce/docs/Failure.md index af15d929..a4ce140d 100644 --- a/ce/docs/Failure.md +++ b/ce/docs/Failure.md @@ -10,7 +10,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **errorDetails** | **String** | A string containing details about the failure | [optional] | -| **status** | **String** | | [optional] | diff --git a/ce/docs/JobId.md b/ce/docs/JobId.md index 494c217f..81852d83 100644 --- a/ce/docs/JobId.md +++ b/ce/docs/JobId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/MobileAppBundleId.md b/ce/docs/MobileAppBundleId.md index 502f44e1..7c10daa1 100644 --- a/ce/docs/MobileAppBundleId.md +++ b/ce/docs/MobileAppBundleId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/MobileAppId.md b/ce/docs/MobileAppId.md index 4b804e2f..aee59bc3 100644 --- a/ce/docs/MobileAppId.md +++ b/ce/docs/MobileAppId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/NotificationId.md b/ce/docs/NotificationId.md index ba02ca47..dd34b7eb 100644 --- a/ce/docs/NotificationId.md +++ b/ce/docs/NotificationId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/NotificationRequestId.md b/ce/docs/NotificationRequestId.md index cf36da50..c873ed0a 100644 --- a/ce/docs/NotificationRequestId.md +++ b/ce/docs/NotificationRequestId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/NotificationRuleId.md b/ce/docs/NotificationRuleId.md index 25827842..c54af744 100644 --- a/ce/docs/NotificationRuleId.md +++ b/ce/docs/NotificationRuleId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/NotificationTargetId.md b/ce/docs/NotificationTargetId.md index 7715bb60..3d02acee 100644 --- a/ce/docs/NotificationTargetId.md +++ b/ce/docs/NotificationTargetId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/NotificationTemplateId.md b/ce/docs/NotificationTemplateId.md index 4011f2cb..8f4d00ce 100644 --- a/ce/docs/NotificationTemplateId.md +++ b/ce/docs/NotificationTemplateId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/OAuth2ClientId.md b/ce/docs/OAuth2ClientId.md index 0cc854af..d553e524 100644 --- a/ce/docs/OAuth2ClientId.md +++ b/ce/docs/OAuth2ClientId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/OAuth2ClientRegistrationTemplateId.md b/ce/docs/OAuth2ClientRegistrationTemplateId.md index 641863f6..e37054ba 100644 --- a/ce/docs/OAuth2ClientRegistrationTemplateId.md +++ b/ce/docs/OAuth2ClientRegistrationTemplateId.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | string | | +| **id** | **UUID** | | [optional] | diff --git a/ce/docs/OtaPackageId.md b/ce/docs/OtaPackageId.md index d12ea0bc..94de5cc9 100644 --- a/ce/docs/OtaPackageId.md +++ b/ce/docs/OtaPackageId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/QrCodeSettingsId.md b/ce/docs/QrCodeSettingsId.md index bc0eb9e6..b9a925c6 100644 --- a/ce/docs/QrCodeSettingsId.md +++ b/ce/docs/QrCodeSettingsId.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | string | | +| **id** | **UUID** | ID of the entity, time-based UUID v1 | | diff --git a/ce/docs/QueueId.md b/ce/docs/QueueId.md index 27746333..2b52656a 100644 --- a/ce/docs/QueueId.md +++ b/ce/docs/QueueId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/QueueStatsId.md b/ce/docs/QueueStatsId.md index 531de89b..78bce8bc 100644 --- a/ce/docs/QueueStatsId.md +++ b/ce/docs/QueueStatsId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/RpcId.md b/ce/docs/RpcId.md index dd5a301f..d092145b 100644 --- a/ce/docs/RpcId.md +++ b/ce/docs/RpcId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/RuleChainId.md b/ce/docs/RuleChainId.md index 85cf6ea8..c807f0e9 100644 --- a/ce/docs/RuleChainId.md +++ b/ce/docs/RuleChainId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/RuleNodeId.md b/ce/docs/RuleNodeId.md index a7de366f..dd9399c5 100644 --- a/ce/docs/RuleNodeId.md +++ b/ce/docs/RuleNodeId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/Success.md b/ce/docs/Success.md index 9b3a48e7..238387cf 100644 --- a/ce/docs/Success.md +++ b/ce/docs/Success.md @@ -10,7 +10,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **generatedContent** | **String** | The text content generated by the model | [optional] | -| **status** | **String** | | [optional] | diff --git a/ce/docs/TbResourceId.md b/ce/docs/TbResourceId.md index f424273e..8e007b5c 100644 --- a/ce/docs/TbResourceId.md +++ b/ce/docs/TbResourceId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/TenantId.md b/ce/docs/TenantId.md index 2ded2f60..126fd3fb 100644 --- a/ce/docs/TenantId.md +++ b/ce/docs/TenantId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/TenantProfileId.md b/ce/docs/TenantProfileId.md index 44448d1d..b60cca4e 100644 --- a/ce/docs/TenantProfileId.md +++ b/ce/docs/TenantProfileId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/TimeSeriesOutput.md b/ce/docs/TimeSeriesOutput.md index 6407c70c..80699000 100644 --- a/ce/docs/TimeSeriesOutput.md +++ b/ce/docs/TimeSeriesOutput.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **strategy** | **TimeSeriesOutputStrategy** | | [optional] | diff --git a/ce/docs/UserId.md b/ce/docs/UserId.md index 2f238158..f46eeb29 100644 --- a/ce/docs/UserId.md +++ b/ce/docs/UserId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/WebViewPage.md b/ce/docs/WebViewPage.md index 02e60f05..cf4e6bf8 100644 --- a/ce/docs/WebViewPage.md +++ b/ce/docs/WebViewPage.md @@ -10,7 +10,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **label** | **String** | Page label | [optional] | -| **visible** | **Boolean** | Indicates if page is visible | | | **icon** | **String** | URL of the page icon | [optional] | | **url** | **String** | Url | [optional] | diff --git a/ce/docs/WidgetTypeId.md b/ce/docs/WidgetTypeId.md index 1ff11711..b69ab18f 100644 --- a/ce/docs/WidgetTypeId.md +++ b/ce/docs/WidgetTypeId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/docs/WidgetsBundleId.md b/ce/docs/WidgetsBundleId.md index 9765a2d4..68f16a48 100644 --- a/ce/docs/WidgetsBundleId.md +++ b/ce/docs/WidgetsBundleId.md @@ -9,8 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | [readonly] | diff --git a/ce/spec/openapi.json b/ce/spec/openapi.json index ebd46f3c..55ef9da3 100644 --- a/ce/spec/openapi.json +++ b/ce/spec/openapi.json @@ -82269,29 +82269,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ADMIN_SETTINGS" - ], - "example": "ADMIN_SETTINGS", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "AffectedTenantAdministratorsFilter": { @@ -82490,9 +82469,6 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "AiModelId": { @@ -82502,29 +82478,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "Entity type of the AI model", - "enum": [ - "AI_MODEL" - ], - "example": "AI_MODEL", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "AiModelType": { @@ -82730,8 +82685,7 @@ } ], "required": [ - "notifyOn", - "triggerType" + "notifyOn" ] }, "AlarmAssignmentRecipientsConfig": { @@ -82852,7 +82806,7 @@ "id": { "type": "string", "format": "uuid", - "description": "string", + "description": "ID of the entity, time-based UUID v1", "example": "784f394c-42b6-435a-983c-b7beff2784f9" } }, @@ -82953,9 +82907,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "AlarmCommentRecipientsConfig": { @@ -83466,29 +83417,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ALARM" - ], - "example": "ALARM", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "AlarmInfo": { @@ -83677,8 +83607,7 @@ } ], "required": [ - "notifyOn", - "triggerType" + "notifyOn" ] }, "AlarmRule": { @@ -83881,7 +83810,6 @@ } ], "required": [ - "expression", "unit", "value" ] @@ -83966,8 +83894,7 @@ } ], "required": [ - "count", - "expression" + "count" ] }, "AlarmRuleSchedule": { @@ -83993,9 +83920,6 @@ { "$ref": "#/components/schemas/AlarmRuleCondition" } - ], - "required": [ - "expression" ] }, "AlarmRuleSpecificTimeSchedule": { @@ -84191,10 +84115,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -84298,10 +84218,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -84444,29 +84360,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "API_KEY" - ], - "example": "API_KEY", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "ApiKeyInfo": { @@ -84544,9 +84439,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "ApiUsageLimitRecipientsConfig": { @@ -84594,29 +84486,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "API_USAGE_STATE" - ], - "example": "API_USAGE_STATE", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "ApiUsageStateValue": { @@ -84724,9 +84595,6 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "AssetId": { @@ -84736,29 +84604,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ASSET" - ], - "example": "ASSET", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "AssetInfo": { @@ -84899,9 +84746,6 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "AssetProfileId": { @@ -84911,29 +84755,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ASSET_PROFILE" - ], - "example": "ASSET_PROFILE", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "AssetProfileInfo": { @@ -85180,12 +85003,7 @@ "$ref": "#/components/schemas/Output" }, { - "type": "object", - "properties": { - "strategy": { - "$ref": "#/components/schemas/AttributesOutputStrategy" - } - } + "type": "object" } ] }, @@ -85291,14 +85109,9 @@ "properties": { "id": { "type": "string", - "format": "uuid", - "description": "string", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "format": "uuid" } - }, - "required": [ - "id" - ] + } }, "AuthenticationProtocol": { "type": "string", @@ -85493,10 +85306,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -85970,9 +85779,6 @@ } } } - ], - "required": [ - "eventType" ] }, "CalculatedFieldId": { @@ -85982,29 +85788,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "CALCULATED_FIELD" - ], - "example": "CALCULATED_FIELD", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "CalculatedFieldInfo": { @@ -86169,9 +85954,6 @@ } } } - ], - "required": [ - "spec" ] }, "CoapDeviceProfileTransportConfiguration": { @@ -86306,9 +86088,6 @@ } } } - ], - "required": [ - "type" ] }, "ComponentClusteringMode": { @@ -86397,14 +86176,9 @@ "properties": { "id": { "type": "string", - "format": "uuid", - "description": "string", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "format": "uuid" } - }, - "required": [ - "id" - ] + } }, "ComponentLifecycleEvent": { "type": "string", @@ -86489,11 +86263,6 @@ "description": "Page label", "example": "Air quality" }, - "visible": { - "type": "boolean", - "description": "Indicates if page is visible", - "example": true - }, "icon": { "type": "string", "description": "URL of the page icon", @@ -86506,10 +86275,6 @@ } } } - ], - "required": [ - "type", - "visible" ] }, "CustomTimeSchedule": { @@ -86646,9 +86411,6 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "CustomerId": { @@ -86658,29 +86420,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "CUSTOMER" - ], - "example": "CUSTOMER", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "CustomerUsersFilter": { @@ -86779,9 +86520,6 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "DashboardId": { @@ -86791,29 +86529,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "DASHBOARD" - ], - "example": "DASHBOARD", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "DashboardInfo": { @@ -86891,11 +86608,6 @@ "description": "Page label", "example": "Air quality" }, - "visible": { - "type": "boolean", - "description": "Indicates if page is visible", - "example": true - }, "icon": { "type": "string", "description": "URL of the page icon", @@ -86908,10 +86620,6 @@ } } } - ], - "required": [ - "type", - "visible" ] }, "DataType": { @@ -86988,10 +86696,7 @@ "$ref": "#/components/schemas/DeviceConfiguration" } ], - "description": "Default device configuration", - "required": [ - "type" - ] + "description": "Default device configuration" }, "DefaultDeviceProfileConfiguration": { "allOf": [ @@ -87028,11 +86733,6 @@ "description": "Page label", "example": "Air quality" }, - "visible": { - "type": "boolean", - "description": "Indicates if page is visible", - "example": true - }, "icon": { "type": "string", "description": "URL of the page icon", @@ -87045,10 +86745,6 @@ } } } - ], - "required": [ - "type", - "visible" ] }, "DefaultPageId": { @@ -87553,8 +87249,7 @@ } ], "required": [ - "notifyOn", - "triggerType" + "notifyOn" ] }, "DeviceActivityRecipientsConfig": { @@ -87655,14 +87350,9 @@ "properties": { "id": { "type": "string", - "format": "uuid", - "description": "string", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "format": "uuid" } - }, - "required": [ - "id" - ] + } }, "DeviceCredentialsType": { "type": "string", @@ -87706,9 +87396,6 @@ } } } - ], - "required": [ - "entityType" ] }, "DeviceId": { @@ -87718,29 +87405,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "DEVICE" - ], - "example": "DEVICE", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "DeviceInfo": { @@ -88017,9 +87683,6 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "DeviceProfileId": { @@ -88029,29 +87692,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "DEVICE_PROFILE" - ], - "example": "DEVICE_PROFILE", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "DeviceProfileInfo": { @@ -88322,31 +87964,10 @@ "allOf": [ { "$ref": "#/components/schemas/EntityId" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "DOMAIN" - ], - "example": "DOMAIN", - "readOnly": true - } - } + }, + { + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "DomainInfo": { @@ -88439,10 +88060,7 @@ } } ], - "description": "Dummy job configuration", - "required": [ - "tasksKey" - ] + "description": "Dummy job configuration" }, "DummyJobResult": { "allOf": [ @@ -88689,9 +88307,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "EdgeCommunicationFailureRecipientsConfig": { @@ -88742,9 +88357,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "EdgeConnectionRecipientsConfig": { @@ -88853,14 +88465,9 @@ "properties": { "id": { "type": "string", - "format": "uuid", - "description": "string", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "format": "uuid" } - }, - "required": [ - "id" - ] + } }, "EdgeEventType": { "type": "string", @@ -88903,29 +88510,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "EDGE" - ], - "example": "EDGE", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "EdgeInfo": { @@ -89167,7 +88753,6 @@ } ], "required": [ - "body", "subject" ] }, @@ -89229,9 +88814,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "EntitiesLimitRecipientsConfig": { @@ -89283,9 +88865,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "EntityActionRecipientsConfig": { @@ -89348,8 +88927,7 @@ "required": [ "arguments", "interval", - "metrics", - "output" + "metrics" ] }, "EntityCoordinates": { @@ -90037,9 +89615,6 @@ } } } - ], - "required": [ - "type" ] }, "EntityVersion": { @@ -90136,9 +89711,6 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "EntityViewId": { @@ -90148,29 +89720,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ENTITY_VIEW" - ], - "example": "ENTITY_VIEW", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "EntityViewInfo": { @@ -90365,9 +89916,6 @@ } } } - ], - "required": [ - "eventType" ] }, "EscalatedNotificationRuleRecipientsConfig": { @@ -90430,14 +89978,9 @@ "properties": { "id": { "type": "string", - "format": "uuid", - "description": "string", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "format": "uuid" } - }, - "required": [ - "id" - ] + } }, "EventInfo": { "type": "object", @@ -90509,10 +90052,6 @@ "errorDetails": { "type": "string", "description": "A string containing details about the failure" - }, - "status": { - "type": "string", - "example": "FAILURE" } } } @@ -90643,7 +90182,6 @@ ], "required": [ "entityCoordinates", - "output", "zoneGroups" ] }, @@ -90698,10 +90236,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -90813,10 +90347,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -90932,10 +90462,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -91146,29 +90672,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "JOB" - ], - "example": "JOB", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "JobResult": { @@ -91440,9 +90945,6 @@ } } } - ], - "required": [ - "eventType" ] }, "LimitedApi": { @@ -91852,9 +91354,6 @@ } } } - ], - "required": [ - "body" ] }, "MicrosoftTeamsNotificationTargetConfig": { @@ -91942,10 +91441,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -92133,29 +91628,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "MOBILE_APP_BUNDLE" - ], - "example": "MOBILE_APP_BUNDLE", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "MobileAppBundleInfo": { @@ -92252,7 +91726,6 @@ } ], "required": [ - "body", "subject" ] }, @@ -92263,29 +91736,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "MOBILE_APP" - ], - "example": "MOBILE_APP", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "MobileAppNotificationDeliveryMethodConfig": { @@ -92472,9 +91924,6 @@ { "$ref": "#/components/schemas/NotificationRuleTriggerConfig" } - ], - "required": [ - "triggerType" ] }, "NewPlatformVersionRecipientsConfig": { @@ -92698,29 +92147,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION" - ], - "example": "NOTIFICATION", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "NotificationInfo": { @@ -92830,29 +92258,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION_REQUEST" - ], - "example": "NOTIFICATION_REQUEST", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "NotificationRequestInfo": { @@ -93050,9 +92457,6 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "NotificationRuleId": { @@ -93062,29 +92466,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION_RULE" - ], - "example": "NOTIFICATION_RULE", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "NotificationRuleInfo": { @@ -93297,9 +92680,6 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "NotificationTargetId": { @@ -93309,29 +92689,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION_TARGET" - ], - "example": "NOTIFICATION_TARGET", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "NotificationTemplate": { @@ -93387,9 +92746,6 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "NotificationTemplateId": { @@ -93399,29 +92755,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION_TEMPLATE" - ], - "example": "NOTIFICATION_TEMPLATE", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "NotificationType": { @@ -93635,29 +92970,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "OAUTH2_CLIENT" - ], - "example": "OAUTH2_CLIENT", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "OAuth2ClientInfo": { @@ -93798,14 +93112,9 @@ "properties": { "id": { "type": "string", - "format": "uuid", - "description": "string", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "format": "uuid" } - }, - "required": [ - "id" - ] + } }, "OAuth2CustomMapperConfig": { "type": "object", @@ -94006,10 +93315,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -94121,10 +93426,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -94332,9 +93633,6 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "OtaPackageId": { @@ -94344,29 +93642,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "OTA_PACKAGE" - ], - "example": "OTA_PACKAGE", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "OtaPackageInfo": { @@ -96340,7 +95617,6 @@ ], "required": [ "arguments", - "output", "relation" ] }, @@ -96460,7 +95736,7 @@ "id": { "type": "string", "format": "uuid", - "description": "string", + "description": "ID of the entity, time-based UUID v1", "example": "784f394c-42b6-435a-983c-b7beff2784f9" } }, @@ -96547,29 +95823,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "QUEUE" - ], - "example": "QUEUE", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "QueueStats": { @@ -96603,29 +95858,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "QUEUE_STATS" - ], - "example": "QUEUE_STATS", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "RPKLwM2MBootstrapServerCredential": { @@ -96735,9 +95969,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "RateLimitsRecipientsConfig": { @@ -96822,7 +96053,6 @@ "required": [ "arguments", "metrics", - "output", "relation" ] }, @@ -97185,9 +96415,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "Rpc": { @@ -97249,29 +96476,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "RPC" - ], - "example": "RPC", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "RpcStatus": { @@ -97430,9 +96636,6 @@ } } } - ], - "required": [ - "eventType" ] }, "RuleChainExportData": { @@ -97448,9 +96651,6 @@ } } } - ], - "required": [ - "entityType" ] }, "RuleChainId": { @@ -97460,29 +96660,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "RULE_CHAIN" - ], - "example": "RULE_CHAIN", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "RuleChainImportResult": { @@ -97640,9 +96819,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "RuleEngineComponentLifecycleEventRecipientsConfig": { @@ -97812,9 +96988,6 @@ } } } - ], - "required": [ - "eventType" ] }, "RuleNodeId": { @@ -97824,29 +96997,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "RULE_NODE" - ], - "example": "RULE_NODE", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "SaveDeviceWithCredentialsRequest": { @@ -97993,8 +97145,7 @@ } ], "required": [ - "arguments", - "output" + "arguments" ] }, "ScriptLanguage": { @@ -98062,9 +97213,6 @@ } } } - ], - "required": [ - "spec" ] }, "ShortCustomerInfo": { @@ -98144,8 +97292,7 @@ } ], "required": [ - "arguments", - "output" + "arguments" ] }, "SingleEntityFilter": { @@ -98179,9 +97326,6 @@ } } } - ], - "required": [ - "type" ] }, "SingleEntityVersionLoadRequest": { @@ -98200,9 +97344,6 @@ } } } - ], - "required": [ - "type" ] }, "SlackConversation": { @@ -98248,9 +97389,6 @@ { "$ref": "#/components/schemas/DeliveryMethodNotificationTemplate" } - ], - "required": [ - "body" ] }, "SlackNotificationDeliveryMethodConfig": { @@ -98396,9 +97534,6 @@ { "$ref": "#/components/schemas/DeliveryMethodNotificationTemplate" } - ], - "required": [ - "body" ] }, "SmsProviderConfiguration": { @@ -98685,9 +97820,6 @@ } } } - ], - "required": [ - "eventType" ] }, "StoreInfo": { @@ -98772,10 +97904,6 @@ "generatedContent": { "type": "string", "description": "The text content generated by the model" - }, - "status": { - "type": "string", - "example": "SUCCESS" } } } @@ -98861,9 +97989,6 @@ { "$ref": "#/components/schemas/NotificationRuleTriggerConfig" } - ], - "required": [ - "triggerType" ] }, "TaskProcessingFailureRecipientsConfig": { @@ -99098,9 +98223,6 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "TbResourceId": { @@ -99110,29 +98232,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "TB_RESOURCE" - ], - "example": "TB_RESOURCE", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "TbResourceInfo": { @@ -99370,9 +98471,6 @@ } } } - ], - "required": [ - "spec" ] }, "Tenant": { @@ -99502,29 +98600,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "TENANT" - ], - "example": "TENANT", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "TenantInfo": { @@ -99710,29 +98787,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "TENANT_PROFILE" - ], - "example": "TENANT_PROFILE", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "TenantProfileQueueConfiguration": { @@ -99883,12 +98939,7 @@ "$ref": "#/components/schemas/Output" }, { - "type": "object", - "properties": { - "strategy": { - "$ref": "#/components/schemas/TimeSeriesOutputStrategy" - } - } + "type": "object" } ] }, @@ -99955,9 +99006,6 @@ } } } - ], - "required": [ - "spec" ] }, "ToServerRpcRequestSnmpCommunicationConfig": { @@ -99976,9 +99024,6 @@ } } } - ], - "required": [ - "spec" ] }, "Token": { @@ -100489,29 +99534,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "USER" - ], - "example": "USER", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "UserListFilter": { @@ -100830,7 +99854,6 @@ } ], "required": [ - "body", "subject" ] }, @@ -100847,11 +99870,6 @@ "description": "Page label", "example": "Air quality" }, - "visible": { - "type": "boolean", - "description": "Indicates if page is visible", - "example": true - }, "icon": { "type": "string", "description": "URL of the page icon", @@ -100864,10 +99882,6 @@ } } } - ], - "required": [ - "type", - "visible" ] }, "WeekInterval": { @@ -101056,9 +100070,6 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "WidgetTypeId": { @@ -101068,29 +100079,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "WIDGET_TYPE" - ], - "example": "WIDGET_TYPE", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "WidgetTypeInfo": { @@ -101253,9 +100243,6 @@ } } } - ], - "required": [ - "entityType" ] }, "WidgetsBundleId": { @@ -101265,29 +100252,8 @@ "$ref": "#/components/schemas/EntityId" }, { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "WIDGETS_BUNDLE" - ], - "example": "WIDGETS_BUNDLE", - "readOnly": true - } - } + "type": "object" } - ], - "required": [ - "entityType", - "id" ] }, "X509CertificateChainProvisionConfiguration": { diff --git a/ce/src/main/java/org/thingsboard/client/model/AdminSettingsId.java b/ce/src/main/java/org/thingsboard/client/model/AdminSettingsId.java index e62908e6..7ad6f9fd 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AdminSettingsId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AdminSettingsId.java @@ -42,8 +42,6 @@ * AdminSettingsId */ @JsonPropertyOrder({ - AdminSettingsId.JSON_PROPERTY_ID, - AdminSettingsId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class AdminSettingsId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.ADMIN_SETTINGS; - public AdminSettingsId() { } - @JsonCreator - public AdminSettingsId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public AdminSettingsId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public AdminSettingsId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this AdminSettingsId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AdminSettingsId adminSettingsId = (AdminSettingsId) o; - return Objects.equals(this.id, adminSettingsId.id) && - Objects.equals(this.entityType, adminSettingsId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdminSettingsId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/AiModelId.java b/ce/src/main/java/org/thingsboard/client/model/AiModelId.java index 42c5ebcd..4ec02d0c 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AiModelId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AiModelId.java @@ -42,8 +42,6 @@ * AiModelId */ @JsonPropertyOrder({ - AiModelId.JSON_PROPERTY_ID, - AiModelId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class AiModelId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.AI_MODEL; - public AiModelId() { } - @JsonCreator - public AiModelId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public AiModelId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * Entity type of the AI model - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public AiModelId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this AiModelId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AiModelId aiModelId = (AiModelId) o; - return Objects.equals(this.id, aiModelId.id) && - Objects.equals(this.entityType, aiModelId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AiModelId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/AlarmCommentId.java b/ce/src/main/java/org/thingsboard/client/model/AlarmCommentId.java index 41b2c2b1..6f453835 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AlarmCommentId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AlarmCommentId.java @@ -53,7 +53,7 @@ public AlarmCommentId id(@javax.annotation.Nonnull UUID id) { } /** - * string + * ID of the entity, time-based UUID v1 * @return id */ @javax.annotation.Nonnull diff --git a/ce/src/main/java/org/thingsboard/client/model/AlarmId.java b/ce/src/main/java/org/thingsboard/client/model/AlarmId.java index 6b886bae..d24b8337 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AlarmId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AlarmId.java @@ -42,8 +42,6 @@ * AlarmId */ @JsonPropertyOrder({ - AlarmId.JSON_PROPERTY_ID, - AlarmId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class AlarmId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.ALARM; - public AlarmId() { } - @JsonCreator - public AlarmId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public AlarmId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public AlarmId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this AlarmId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AlarmId alarmId = (AlarmId) o; - return Objects.equals(this.id, alarmId.id) && - Objects.equals(this.entityType, alarmId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AlarmId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/ApiKeyId.java b/ce/src/main/java/org/thingsboard/client/model/ApiKeyId.java index 0f611cdb..aa45306b 100644 --- a/ce/src/main/java/org/thingsboard/client/model/ApiKeyId.java +++ b/ce/src/main/java/org/thingsboard/client/model/ApiKeyId.java @@ -42,8 +42,6 @@ * ApiKeyId */ @JsonPropertyOrder({ - ApiKeyId.JSON_PROPERTY_ID, - ApiKeyId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class ApiKeyId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.API_KEY; - public ApiKeyId() { } - @JsonCreator - public ApiKeyId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public ApiKeyId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public ApiKeyId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this ApiKeyId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ApiKeyId apiKeyId = (ApiKeyId) o; - return Objects.equals(this.id, apiKeyId.id) && - Objects.equals(this.entityType, apiKeyId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ApiKeyId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java b/ce/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java index 5f72c58f..1e2ff9c3 100644 --- a/ce/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java +++ b/ce/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java @@ -42,8 +42,6 @@ * ApiUsageStateId */ @JsonPropertyOrder({ - ApiUsageStateId.JSON_PROPERTY_ID, - ApiUsageStateId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class ApiUsageStateId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.API_USAGE_STATE; - public ApiUsageStateId() { } - @JsonCreator - public ApiUsageStateId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public ApiUsageStateId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public ApiUsageStateId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this ApiUsageStateId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ApiUsageStateId apiUsageStateId = (ApiUsageStateId) o; - return Objects.equals(this.id, apiUsageStateId.id) && - Objects.equals(this.entityType, apiUsageStateId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ApiUsageStateId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/AssetId.java b/ce/src/main/java/org/thingsboard/client/model/AssetId.java index 8d6e98e3..e8d5db42 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AssetId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AssetId.java @@ -42,8 +42,6 @@ * AssetId */ @JsonPropertyOrder({ - AssetId.JSON_PROPERTY_ID, - AssetId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class AssetId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.ASSET; - public AssetId() { } - @JsonCreator - public AssetId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public AssetId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public AssetId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this AssetId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AssetId assetId = (AssetId) o; - return Objects.equals(this.id, assetId.id) && - Objects.equals(this.entityType, assetId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AssetId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/AssetProfileId.java b/ce/src/main/java/org/thingsboard/client/model/AssetProfileId.java index a449c0f7..63cd8f02 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AssetProfileId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AssetProfileId.java @@ -42,8 +42,6 @@ * AssetProfileId */ @JsonPropertyOrder({ - AssetProfileId.JSON_PROPERTY_ID, - AssetProfileId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class AssetProfileId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.ASSET_PROFILE; - public AssetProfileId() { } - @JsonCreator - public AssetProfileId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public AssetProfileId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public AssetProfileId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this AssetProfileId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AssetProfileId assetProfileId = (AssetProfileId) o; - return Objects.equals(this.id, assetProfileId.id) && - Objects.equals(this.entityType, assetProfileId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AssetProfileId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/AttributesOutput.java b/ce/src/main/java/org/thingsboard/client/model/AttributesOutput.java index 1359decc..82704939 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AttributesOutput.java +++ b/ce/src/main/java/org/thingsboard/client/model/AttributesOutput.java @@ -30,8 +30,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; import org.thingsboard.client.model.AttributeScope; -import org.thingsboard.client.model.AttributesOutputStrategy; import org.thingsboard.client.model.Output; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -42,7 +42,6 @@ * AttributesOutput */ @JsonPropertyOrder({ - AttributesOutput.JSON_PROPERTY_STRATEGY }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -52,37 +51,9 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) public class AttributesOutput extends Output { - public static final String JSON_PROPERTY_STRATEGY = "strategy"; - @javax.annotation.Nullable - private AttributesOutputStrategy strategy; - public AttributesOutput() { } - public AttributesOutput strategy(@javax.annotation.Nullable AttributesOutputStrategy strategy) { - this.strategy = strategy; - return this; - } - - /** - * Get strategy - * @return strategy - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_STRATEGY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AttributesOutputStrategy getStrategy() { - return strategy; - } - - - @JsonProperty(value = JSON_PROPERTY_STRATEGY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStrategy(@javax.annotation.Nullable AttributesOutputStrategy strategy) { - this.strategy = strategy; - } - - @Override public AttributesOutput name(@javax.annotation.Nullable String name) { this.setName(name); @@ -101,6 +72,12 @@ public AttributesOutput decimalsByDefault(@javax.annotation.Nullable Integer dec return this; } + @Override + public AttributesOutput strategy(@javax.annotation.Nullable Object strategy) { + this.setStrategy(strategy); + return this; + } + @Override public AttributesOutput type(@javax.annotation.Nonnull String type) { this.setType(type); @@ -118,14 +95,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AttributesOutput attributesOutput = (AttributesOutput) o; - return Objects.equals(this.strategy, attributesOutput.strategy) && - super.equals(o); + return super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { - return Objects.hash(strategy, super.hashCode()); + return Objects.hash(super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -133,7 +119,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AttributesOutput {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" strategy: ").append(toIndentedString(strategy)).append("\n"); sb.append("}"); return sb.toString(); } @@ -198,7 +183,7 @@ public String toUrlQueryString(String prefix) { // add `strategy` to the URL query string if (getStrategy() != null) { - joiner.add(getStrategy().toUrlQueryString(prefix + "strategy" + suffix)); + joiner.add(String.format(java.util.Locale.ROOT, "%sstrategy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStrategy())))); } // add `type` to the URL query string diff --git a/ce/src/main/java/org/thingsboard/client/model/AuditLogId.java b/ce/src/main/java/org/thingsboard/client/model/AuditLogId.java index 5f84ef76..dd541320 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AuditLogId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AuditLogId.java @@ -41,32 +41,32 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class AuditLogId { public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull + @javax.annotation.Nullable private UUID id; public AuditLogId() { } - public AuditLogId id(@javax.annotation.Nonnull UUID id) { + public AuditLogId id(@javax.annotation.Nullable UUID id) { this.id = id; return this; } /** - * string + * Get id * @return id */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public UUID getId() { return id; } - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(@javax.annotation.Nullable UUID id) { this.id = id; } diff --git a/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java b/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java index 94bc7a7b..724a8af2 100644 --- a/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java +++ b/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java @@ -42,8 +42,6 @@ * CalculatedFieldId */ @JsonPropertyOrder({ - CalculatedFieldId.JSON_PROPERTY_ID, - CalculatedFieldId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class CalculatedFieldId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.CALCULATED_FIELD; - public CalculatedFieldId() { } - @JsonCreator - public CalculatedFieldId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public CalculatedFieldId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public CalculatedFieldId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this CalculatedFieldId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CalculatedFieldId calculatedFieldId = (CalculatedFieldId) o; - return Objects.equals(this.id, calculatedFieldId.id) && - Objects.equals(this.entityType, calculatedFieldId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CalculatedFieldId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/ComponentDescriptorId.java b/ce/src/main/java/org/thingsboard/client/model/ComponentDescriptorId.java index 500a7f6c..d825c9c3 100644 --- a/ce/src/main/java/org/thingsboard/client/model/ComponentDescriptorId.java +++ b/ce/src/main/java/org/thingsboard/client/model/ComponentDescriptorId.java @@ -41,32 +41,32 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class ComponentDescriptorId { public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull + @javax.annotation.Nullable private UUID id; public ComponentDescriptorId() { } - public ComponentDescriptorId id(@javax.annotation.Nonnull UUID id) { + public ComponentDescriptorId id(@javax.annotation.Nullable UUID id) { this.id = id; return this; } /** - * string + * Get id * @return id */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public UUID getId() { return id; } - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(@javax.annotation.Nullable UUID id) { this.id = id; } diff --git a/ce/src/main/java/org/thingsboard/client/model/CustomMobilePage.java b/ce/src/main/java/org/thingsboard/client/model/CustomMobilePage.java index 832857f3..c17663a6 100644 --- a/ce/src/main/java/org/thingsboard/client/model/CustomMobilePage.java +++ b/ce/src/main/java/org/thingsboard/client/model/CustomMobilePage.java @@ -42,7 +42,6 @@ */ @JsonPropertyOrder({ CustomMobilePage.JSON_PROPERTY_LABEL, - CustomMobilePage.JSON_PROPERTY_VISIBLE, CustomMobilePage.JSON_PROPERTY_ICON, CustomMobilePage.JSON_PROPERTY_PATH }) @@ -58,10 +57,6 @@ public class CustomMobilePage extends MobilePage { @javax.annotation.Nullable private String label; - public static final String JSON_PROPERTY_VISIBLE = "visible"; - @javax.annotation.Nonnull - private Boolean visible; - public static final String JSON_PROPERTY_ICON = "icon"; @javax.annotation.Nullable private String icon; @@ -97,30 +92,6 @@ public void setLabel(@javax.annotation.Nullable String label) { } - public CustomMobilePage visible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - return this; - } - - /** - * Indicates if page is visible - * @return visible - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getVisible() { - return visible; - } - - - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVisible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - } - - public CustomMobilePage icon(@javax.annotation.Nullable String icon) { this.icon = icon; return this; @@ -175,6 +146,12 @@ public CustomMobilePage type(@javax.annotation.Nonnull MobilePageType type) { return this; } + @Override + public CustomMobilePage visible(@javax.annotation.Nullable Boolean visible) { + this.setVisible(visible); + return this; + } + /** * Return true if this CustomMobilePage object is equal to o. */ @@ -188,7 +165,6 @@ public boolean equals(Object o) { } CustomMobilePage customMobilePage = (CustomMobilePage) o; return Objects.equals(this.label, customMobilePage.label) && - Objects.equals(this.visible, customMobilePage.visible) && Objects.equals(this.icon, customMobilePage.icon) && Objects.equals(this.path, customMobilePage.path) && super.equals(o); @@ -196,7 +172,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(label, visible, icon, path, super.hashCode()); + return Objects.hash(label, icon, path, super.hashCode()); } @Override @@ -205,7 +181,6 @@ public String toString() { sb.append("class CustomMobilePage {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); sb.append(" path: ").append(toIndentedString(path)).append("\n"); sb.append("}"); diff --git a/ce/src/main/java/org/thingsboard/client/model/CustomerId.java b/ce/src/main/java/org/thingsboard/client/model/CustomerId.java index fa0f4e54..0111bf30 100644 --- a/ce/src/main/java/org/thingsboard/client/model/CustomerId.java +++ b/ce/src/main/java/org/thingsboard/client/model/CustomerId.java @@ -42,8 +42,6 @@ * CustomerId */ @JsonPropertyOrder({ - CustomerId.JSON_PROPERTY_ID, - CustomerId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class CustomerId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.CUSTOMER; - public CustomerId() { } - @JsonCreator - public CustomerId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public CustomerId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public CustomerId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this CustomerId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CustomerId customerId = (CustomerId) o; - return Objects.equals(this.id, customerId.id) && - Objects.equals(this.entityType, customerId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CustomerId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/DashboardId.java b/ce/src/main/java/org/thingsboard/client/model/DashboardId.java index fcaa7378..56d8e5b5 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DashboardId.java +++ b/ce/src/main/java/org/thingsboard/client/model/DashboardId.java @@ -42,8 +42,6 @@ * DashboardId */ @JsonPropertyOrder({ - DashboardId.JSON_PROPERTY_ID, - DashboardId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class DashboardId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.DASHBOARD; - public DashboardId() { } - @JsonCreator - public DashboardId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public DashboardId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public DashboardId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this DashboardId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DashboardId dashboardId = (DashboardId) o; - return Objects.equals(this.id, dashboardId.id) && - Objects.equals(this.entityType, dashboardId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DashboardId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/DashboardPage.java b/ce/src/main/java/org/thingsboard/client/model/DashboardPage.java index f20ac3ac..0586ad5d 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DashboardPage.java +++ b/ce/src/main/java/org/thingsboard/client/model/DashboardPage.java @@ -42,7 +42,6 @@ */ @JsonPropertyOrder({ DashboardPage.JSON_PROPERTY_LABEL, - DashboardPage.JSON_PROPERTY_VISIBLE, DashboardPage.JSON_PROPERTY_ICON, DashboardPage.JSON_PROPERTY_DASHBOARD_ID }) @@ -58,10 +57,6 @@ public class DashboardPage extends MobilePage { @javax.annotation.Nullable private String label; - public static final String JSON_PROPERTY_VISIBLE = "visible"; - @javax.annotation.Nonnull - private Boolean visible; - public static final String JSON_PROPERTY_ICON = "icon"; @javax.annotation.Nullable private String icon; @@ -97,30 +92,6 @@ public void setLabel(@javax.annotation.Nullable String label) { } - public DashboardPage visible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - return this; - } - - /** - * Indicates if page is visible - * @return visible - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getVisible() { - return visible; - } - - - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVisible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - } - - public DashboardPage icon(@javax.annotation.Nullable String icon) { this.icon = icon; return this; @@ -175,6 +146,12 @@ public DashboardPage type(@javax.annotation.Nonnull MobilePageType type) { return this; } + @Override + public DashboardPage visible(@javax.annotation.Nullable Boolean visible) { + this.setVisible(visible); + return this; + } + /** * Return true if this DashboardPage object is equal to o. */ @@ -188,7 +165,6 @@ public boolean equals(Object o) { } DashboardPage dashboardPage = (DashboardPage) o; return Objects.equals(this.label, dashboardPage.label) && - Objects.equals(this.visible, dashboardPage.visible) && Objects.equals(this.icon, dashboardPage.icon) && Objects.equals(this.dashboardId, dashboardPage.dashboardId) && super.equals(o); @@ -196,7 +172,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(label, visible, icon, dashboardId, super.hashCode()); + return Objects.hash(label, icon, dashboardId, super.hashCode()); } @Override @@ -205,7 +181,6 @@ public String toString() { sb.append("class DashboardPage {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); sb.append(" dashboardId: ").append(toIndentedString(dashboardId)).append("\n"); sb.append("}"); diff --git a/ce/src/main/java/org/thingsboard/client/model/DefaultMobilePage.java b/ce/src/main/java/org/thingsboard/client/model/DefaultMobilePage.java index 7a9fb2c7..6829d257 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DefaultMobilePage.java +++ b/ce/src/main/java/org/thingsboard/client/model/DefaultMobilePage.java @@ -43,7 +43,6 @@ */ @JsonPropertyOrder({ DefaultMobilePage.JSON_PROPERTY_LABEL, - DefaultMobilePage.JSON_PROPERTY_VISIBLE, DefaultMobilePage.JSON_PROPERTY_ICON, DefaultMobilePage.JSON_PROPERTY_ID }) @@ -59,10 +58,6 @@ public class DefaultMobilePage extends MobilePage { @javax.annotation.Nullable private String label; - public static final String JSON_PROPERTY_VISIBLE = "visible"; - @javax.annotation.Nonnull - private Boolean visible; - public static final String JSON_PROPERTY_ICON = "icon"; @javax.annotation.Nullable private String icon; @@ -98,30 +93,6 @@ public void setLabel(@javax.annotation.Nullable String label) { } - public DefaultMobilePage visible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - return this; - } - - /** - * Indicates if page is visible - * @return visible - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getVisible() { - return visible; - } - - - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVisible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - } - - public DefaultMobilePage icon(@javax.annotation.Nullable String icon) { this.icon = icon; return this; @@ -176,6 +147,12 @@ public DefaultMobilePage type(@javax.annotation.Nonnull MobilePageType type) { return this; } + @Override + public DefaultMobilePage visible(@javax.annotation.Nullable Boolean visible) { + this.setVisible(visible); + return this; + } + /** * Return true if this DefaultMobilePage object is equal to o. */ @@ -189,7 +166,6 @@ public boolean equals(Object o) { } DefaultMobilePage defaultMobilePage = (DefaultMobilePage) o; return Objects.equals(this.label, defaultMobilePage.label) && - Objects.equals(this.visible, defaultMobilePage.visible) && Objects.equals(this.icon, defaultMobilePage.icon) && Objects.equals(this.id, defaultMobilePage.id) && super.equals(o); @@ -197,7 +173,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(label, visible, icon, id, super.hashCode()); + return Objects.hash(label, icon, id, super.hashCode()); } @Override @@ -206,7 +182,6 @@ public String toString() { sb.append("class DefaultMobilePage {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append("}"); diff --git a/ce/src/main/java/org/thingsboard/client/model/DeviceCredentialsId.java b/ce/src/main/java/org/thingsboard/client/model/DeviceCredentialsId.java index f3565ce4..4eec6b43 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DeviceCredentialsId.java +++ b/ce/src/main/java/org/thingsboard/client/model/DeviceCredentialsId.java @@ -41,32 +41,32 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class DeviceCredentialsId { public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull + @javax.annotation.Nullable private UUID id; public DeviceCredentialsId() { } - public DeviceCredentialsId id(@javax.annotation.Nonnull UUID id) { + public DeviceCredentialsId id(@javax.annotation.Nullable UUID id) { this.id = id; return this; } /** - * string + * Get id * @return id */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public UUID getId() { return id; } - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(@javax.annotation.Nullable UUID id) { this.id = id; } diff --git a/ce/src/main/java/org/thingsboard/client/model/DeviceId.java b/ce/src/main/java/org/thingsboard/client/model/DeviceId.java index ee1c51f3..6088bccf 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DeviceId.java +++ b/ce/src/main/java/org/thingsboard/client/model/DeviceId.java @@ -42,8 +42,6 @@ * DeviceId */ @JsonPropertyOrder({ - DeviceId.JSON_PROPERTY_ID, - DeviceId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class DeviceId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.DEVICE; - public DeviceId() { } - @JsonCreator - public DeviceId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public DeviceId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public DeviceId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this DeviceId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DeviceId deviceId = (DeviceId) o; - return Objects.equals(this.id, deviceId.id) && - Objects.equals(this.entityType, deviceId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeviceId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/DeviceProfileId.java b/ce/src/main/java/org/thingsboard/client/model/DeviceProfileId.java index 8ceabadd..750f9962 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DeviceProfileId.java +++ b/ce/src/main/java/org/thingsboard/client/model/DeviceProfileId.java @@ -42,8 +42,6 @@ * DeviceProfileId */ @JsonPropertyOrder({ - DeviceProfileId.JSON_PROPERTY_ID, - DeviceProfileId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class DeviceProfileId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.DEVICE_PROFILE; - public DeviceProfileId() { } - @JsonCreator - public DeviceProfileId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public DeviceProfileId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public DeviceProfileId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this DeviceProfileId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DeviceProfileId deviceProfileId = (DeviceProfileId) o; - return Objects.equals(this.id, deviceProfileId.id) && - Objects.equals(this.entityType, deviceProfileId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeviceProfileId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/DomainId.java b/ce/src/main/java/org/thingsboard/client/model/DomainId.java index c9627723..e89b114e 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DomainId.java +++ b/ce/src/main/java/org/thingsboard/client/model/DomainId.java @@ -42,8 +42,6 @@ * DomainId */ @JsonPropertyOrder({ - DomainId.JSON_PROPERTY_ID, - DomainId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class DomainId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.DOMAIN; - public DomainId() { } - @JsonCreator - public DomainId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public DomainId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public DomainId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this DomainId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DomainId domainId = (DomainId) o; - return Objects.equals(this.id, domainId.id) && - Objects.equals(this.entityType, domainId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DomainId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/EdgeEventId.java b/ce/src/main/java/org/thingsboard/client/model/EdgeEventId.java index 773ee7e3..e9af29a4 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EdgeEventId.java +++ b/ce/src/main/java/org/thingsboard/client/model/EdgeEventId.java @@ -41,32 +41,32 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class EdgeEventId { public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull + @javax.annotation.Nullable private UUID id; public EdgeEventId() { } - public EdgeEventId id(@javax.annotation.Nonnull UUID id) { + public EdgeEventId id(@javax.annotation.Nullable UUID id) { this.id = id; return this; } /** - * string + * Get id * @return id */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public UUID getId() { return id; } - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(@javax.annotation.Nullable UUID id) { this.id = id; } diff --git a/ce/src/main/java/org/thingsboard/client/model/EdgeId.java b/ce/src/main/java/org/thingsboard/client/model/EdgeId.java index cfc182f0..e508e60c 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EdgeId.java +++ b/ce/src/main/java/org/thingsboard/client/model/EdgeId.java @@ -42,8 +42,6 @@ * EdgeId */ @JsonPropertyOrder({ - EdgeId.JSON_PROPERTY_ID, - EdgeId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class EdgeId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.EDGE; - public EdgeId() { } - @JsonCreator - public EdgeId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public EdgeId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public EdgeId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this EdgeId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - EdgeId edgeId = (EdgeId) o; - return Objects.equals(this.id, edgeId.id) && - Objects.equals(this.entityType, edgeId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EdgeId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/EntityAggregationCalculatedFieldConfiguration.java b/ce/src/main/java/org/thingsboard/client/model/EntityAggregationCalculatedFieldConfiguration.java index 381b5497..e0548729 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EntityAggregationCalculatedFieldConfiguration.java +++ b/ce/src/main/java/org/thingsboard/client/model/EntityAggregationCalculatedFieldConfiguration.java @@ -221,7 +221,7 @@ public void setProduceIntermediateResult(@javax.annotation.Nullable Boolean prod @Override - public EntityAggregationCalculatedFieldConfiguration output(@javax.annotation.Nonnull Output output) { + public EntityAggregationCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { this.setOutput(output); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/EntityViewId.java b/ce/src/main/java/org/thingsboard/client/model/EntityViewId.java index 72241f61..8f144abd 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EntityViewId.java +++ b/ce/src/main/java/org/thingsboard/client/model/EntityViewId.java @@ -42,8 +42,6 @@ * EntityViewId */ @JsonPropertyOrder({ - EntityViewId.JSON_PROPERTY_ID, - EntityViewId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class EntityViewId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.ENTITY_VIEW; - public EntityViewId() { } - @JsonCreator - public EntityViewId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public EntityViewId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public EntityViewId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this EntityViewId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - EntityViewId entityViewId = (EntityViewId) o; - return Objects.equals(this.id, entityViewId.id) && - Objects.equals(this.entityType, entityViewId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EntityViewId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/EventId.java b/ce/src/main/java/org/thingsboard/client/model/EventId.java index 8e8b32d2..813e8a55 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EventId.java +++ b/ce/src/main/java/org/thingsboard/client/model/EventId.java @@ -41,32 +41,32 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class EventId { public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull + @javax.annotation.Nullable private UUID id; public EventId() { } - public EventId id(@javax.annotation.Nonnull UUID id) { + public EventId id(@javax.annotation.Nullable UUID id) { this.id = id; return this; } /** - * string + * Get id * @return id */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public UUID getId() { return id; } - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(@javax.annotation.Nullable UUID id) { this.id = id; } diff --git a/ce/src/main/java/org/thingsboard/client/model/Failure.java b/ce/src/main/java/org/thingsboard/client/model/Failure.java index ae611e38..4a671180 100644 --- a/ce/src/main/java/org/thingsboard/client/model/Failure.java +++ b/ce/src/main/java/org/thingsboard/client/model/Failure.java @@ -40,8 +40,7 @@ * Failure */ @JsonPropertyOrder({ - Failure.JSON_PROPERTY_ERROR_DETAILS, - Failure.JSON_PROPERTY_STATUS + Failure.JSON_PROPERTY_ERROR_DETAILS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -55,10 +54,6 @@ public class Failure extends TbChatResponse { @javax.annotation.Nullable private String errorDetails; - public static final String JSON_PROPERTY_STATUS = "status"; - @javax.annotation.Nullable - private String status; - public Failure() { } @@ -86,30 +81,12 @@ public void setErrorDetails(@javax.annotation.Nullable String errorDetails) { } - public Failure status(@javax.annotation.Nullable String status) { - this.status = status; + @Override + public Failure status(@javax.annotation.Nonnull String status) { + this.setStatus(status); return this; } - /** - * Get status - * @return status - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_STATUS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } - - - @JsonProperty(value = JSON_PROPERTY_STATUS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatus(@javax.annotation.Nullable String status) { - this.status = status; - } - - /** * Return true if this Failure object is equal to o. */ @@ -123,13 +100,12 @@ public boolean equals(Object o) { } Failure failure = (Failure) o; return Objects.equals(this.errorDetails, failure.errorDetails) && - Objects.equals(this.status, failure.status) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(errorDetails, status, super.hashCode()); + return Objects.hash(errorDetails, super.hashCode()); } @Override @@ -138,7 +114,6 @@ public String toString() { sb.append("class Failure {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" errorDetails: ").append(toIndentedString(errorDetails)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/GeofencingCalculatedFieldConfiguration.java b/ce/src/main/java/org/thingsboard/client/model/GeofencingCalculatedFieldConfiguration.java index dd8783e0..e8678ed8 100644 --- a/ce/src/main/java/org/thingsboard/client/model/GeofencingCalculatedFieldConfiguration.java +++ b/ce/src/main/java/org/thingsboard/client/model/GeofencingCalculatedFieldConfiguration.java @@ -182,7 +182,7 @@ public void setScheduledUpdateInterval(@javax.annotation.Nullable Integer schedu @Override - public GeofencingCalculatedFieldConfiguration output(@javax.annotation.Nonnull Output output) { + public GeofencingCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { this.setOutput(output); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/JobId.java b/ce/src/main/java/org/thingsboard/client/model/JobId.java index 40fa7ae2..93be4634 100644 --- a/ce/src/main/java/org/thingsboard/client/model/JobId.java +++ b/ce/src/main/java/org/thingsboard/client/model/JobId.java @@ -42,8 +42,6 @@ * JobId */ @JsonPropertyOrder({ - JobId.JSON_PROPERTY_ID, - JobId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class JobId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.JOB; - public JobId() { } - @JsonCreator - public JobId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public JobId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public JobId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this JobId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - JobId jobId = (JobId) o; - return Objects.equals(this.id, jobId.id) && - Objects.equals(this.entityType, jobId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class JobId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java b/ce/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java index b94f14e4..9b4735e5 100644 --- a/ce/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java +++ b/ce/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java @@ -42,8 +42,6 @@ * MobileAppBundleId */ @JsonPropertyOrder({ - MobileAppBundleId.JSON_PROPERTY_ID, - MobileAppBundleId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class MobileAppBundleId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.MOBILE_APP_BUNDLE; - public MobileAppBundleId() { } - @JsonCreator - public MobileAppBundleId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public MobileAppBundleId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public MobileAppBundleId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this MobileAppBundleId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MobileAppBundleId mobileAppBundleId = (MobileAppBundleId) o; - return Objects.equals(this.id, mobileAppBundleId.id) && - Objects.equals(this.entityType, mobileAppBundleId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MobileAppBundleId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/MobileAppId.java b/ce/src/main/java/org/thingsboard/client/model/MobileAppId.java index 6f514a8f..c4325164 100644 --- a/ce/src/main/java/org/thingsboard/client/model/MobileAppId.java +++ b/ce/src/main/java/org/thingsboard/client/model/MobileAppId.java @@ -42,8 +42,6 @@ * MobileAppId */ @JsonPropertyOrder({ - MobileAppId.JSON_PROPERTY_ID, - MobileAppId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class MobileAppId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.MOBILE_APP; - public MobileAppId() { } - @JsonCreator - public MobileAppId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public MobileAppId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public MobileAppId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this MobileAppId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MobileAppId mobileAppId = (MobileAppId) o; - return Objects.equals(this.id, mobileAppId.id) && - Objects.equals(this.entityType, mobileAppId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MobileAppId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationId.java b/ce/src/main/java/org/thingsboard/client/model/NotificationId.java index c3698dcc..453f31fb 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationId.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationId.java @@ -42,8 +42,6 @@ * NotificationId */ @JsonPropertyOrder({ - NotificationId.JSON_PROPERTY_ID, - NotificationId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class NotificationId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.NOTIFICATION; - public NotificationId() { } - @JsonCreator - public NotificationId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public NotificationId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public NotificationId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this NotificationId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotificationId notificationId = (NotificationId) o; - return Objects.equals(this.id, notificationId.id) && - Objects.equals(this.entityType, notificationId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationRequestId.java b/ce/src/main/java/org/thingsboard/client/model/NotificationRequestId.java index e944e9ea..e2706589 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationRequestId.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationRequestId.java @@ -42,8 +42,6 @@ * NotificationRequestId */ @JsonPropertyOrder({ - NotificationRequestId.JSON_PROPERTY_ID, - NotificationRequestId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class NotificationRequestId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.NOTIFICATION_REQUEST; - public NotificationRequestId() { } - @JsonCreator - public NotificationRequestId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public NotificationRequestId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public NotificationRequestId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this NotificationRequestId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotificationRequestId notificationRequestId = (NotificationRequestId) o; - return Objects.equals(this.id, notificationRequestId.id) && - Objects.equals(this.entityType, notificationRequestId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationRequestId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationRuleId.java b/ce/src/main/java/org/thingsboard/client/model/NotificationRuleId.java index 92516edd..c9f1bb8e 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationRuleId.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationRuleId.java @@ -42,8 +42,6 @@ * NotificationRuleId */ @JsonPropertyOrder({ - NotificationRuleId.JSON_PROPERTY_ID, - NotificationRuleId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class NotificationRuleId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.NOTIFICATION_RULE; - public NotificationRuleId() { } - @JsonCreator - public NotificationRuleId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public NotificationRuleId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public NotificationRuleId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this NotificationRuleId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotificationRuleId notificationRuleId = (NotificationRuleId) o; - return Objects.equals(this.id, notificationRuleId.id) && - Objects.equals(this.entityType, notificationRuleId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationRuleId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationTargetId.java b/ce/src/main/java/org/thingsboard/client/model/NotificationTargetId.java index eb40a8cf..3a6d606a 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationTargetId.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationTargetId.java @@ -42,8 +42,6 @@ * NotificationTargetId */ @JsonPropertyOrder({ - NotificationTargetId.JSON_PROPERTY_ID, - NotificationTargetId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class NotificationTargetId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.NOTIFICATION_TARGET; - public NotificationTargetId() { } - @JsonCreator - public NotificationTargetId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public NotificationTargetId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public NotificationTargetId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this NotificationTargetId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotificationTargetId notificationTargetId = (NotificationTargetId) o; - return Objects.equals(this.id, notificationTargetId.id) && - Objects.equals(this.entityType, notificationTargetId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationTargetId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java b/ce/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java index 3f51e8d2..7e564198 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java @@ -42,8 +42,6 @@ * NotificationTemplateId */ @JsonPropertyOrder({ - NotificationTemplateId.JSON_PROPERTY_ID, - NotificationTemplateId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class NotificationTemplateId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.NOTIFICATION_TEMPLATE; - public NotificationTemplateId() { } - @JsonCreator - public NotificationTemplateId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public NotificationTemplateId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public NotificationTemplateId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this NotificationTemplateId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotificationTemplateId notificationTemplateId = (NotificationTemplateId) o; - return Objects.equals(this.id, notificationTemplateId.id) && - Objects.equals(this.entityType, notificationTemplateId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationTemplateId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java b/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java index dd9fee98..cea44821 100644 --- a/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java +++ b/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java @@ -42,8 +42,6 @@ * OAuth2ClientId */ @JsonPropertyOrder({ - OAuth2ClientId.JSON_PROPERTY_ID, - OAuth2ClientId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class OAuth2ClientId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.OAUTH2_CLIENT; - public OAuth2ClientId() { } - @JsonCreator - public OAuth2ClientId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public OAuth2ClientId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public OAuth2ClientId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this OAuth2ClientId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OAuth2ClientId oauth2ClientId = (OAuth2ClientId) o; - return Objects.equals(this.id, oauth2ClientId.id) && - Objects.equals(this.entityType, oauth2ClientId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OAuth2ClientId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientRegistrationTemplateId.java b/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientRegistrationTemplateId.java index d4cc32b8..d5a7576f 100644 --- a/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientRegistrationTemplateId.java +++ b/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientRegistrationTemplateId.java @@ -41,32 +41,32 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class OAuth2ClientRegistrationTemplateId { public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull + @javax.annotation.Nullable private UUID id; public OAuth2ClientRegistrationTemplateId() { } - public OAuth2ClientRegistrationTemplateId id(@javax.annotation.Nonnull UUID id) { + public OAuth2ClientRegistrationTemplateId id(@javax.annotation.Nullable UUID id) { this.id = id; return this; } /** - * string + * Get id * @return id */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public UUID getId() { return id; } - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(@javax.annotation.Nullable UUID id) { this.id = id; } diff --git a/ce/src/main/java/org/thingsboard/client/model/OtaPackageId.java b/ce/src/main/java/org/thingsboard/client/model/OtaPackageId.java index 890a9fe2..73f2ce14 100644 --- a/ce/src/main/java/org/thingsboard/client/model/OtaPackageId.java +++ b/ce/src/main/java/org/thingsboard/client/model/OtaPackageId.java @@ -42,8 +42,6 @@ * OtaPackageId */ @JsonPropertyOrder({ - OtaPackageId.JSON_PROPERTY_ID, - OtaPackageId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class OtaPackageId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.OTA_PACKAGE; - public OtaPackageId() { } - @JsonCreator - public OtaPackageId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public OtaPackageId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public OtaPackageId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this OtaPackageId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OtaPackageId otaPackageId = (OtaPackageId) o; - return Objects.equals(this.id, otaPackageId.id) && - Objects.equals(this.entityType, otaPackageId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OtaPackageId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/PropagationCalculatedFieldConfiguration.java b/ce/src/main/java/org/thingsboard/client/model/PropagationCalculatedFieldConfiguration.java index f533942a..9ede4169 100644 --- a/ce/src/main/java/org/thingsboard/client/model/PropagationCalculatedFieldConfiguration.java +++ b/ce/src/main/java/org/thingsboard/client/model/PropagationCalculatedFieldConfiguration.java @@ -182,7 +182,7 @@ public void setApplyExpressionToResolvedArguments(@javax.annotation.Nullable Boo @Override - public PropagationCalculatedFieldConfiguration output(@javax.annotation.Nonnull Output output) { + public PropagationCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { this.setOutput(output); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/QrCodeSettingsId.java b/ce/src/main/java/org/thingsboard/client/model/QrCodeSettingsId.java index 6671f4aa..8e88fbb6 100644 --- a/ce/src/main/java/org/thingsboard/client/model/QrCodeSettingsId.java +++ b/ce/src/main/java/org/thingsboard/client/model/QrCodeSettingsId.java @@ -53,7 +53,7 @@ public QrCodeSettingsId id(@javax.annotation.Nonnull UUID id) { } /** - * string + * ID of the entity, time-based UUID v1 * @return id */ @javax.annotation.Nonnull diff --git a/ce/src/main/java/org/thingsboard/client/model/QueueId.java b/ce/src/main/java/org/thingsboard/client/model/QueueId.java index 498b02cb..c1c979b3 100644 --- a/ce/src/main/java/org/thingsboard/client/model/QueueId.java +++ b/ce/src/main/java/org/thingsboard/client/model/QueueId.java @@ -42,8 +42,6 @@ * QueueId */ @JsonPropertyOrder({ - QueueId.JSON_PROPERTY_ID, - QueueId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class QueueId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.QUEUE; - public QueueId() { } - @JsonCreator - public QueueId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public QueueId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public QueueId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this QueueId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - QueueId queueId = (QueueId) o; - return Objects.equals(this.id, queueId.id) && - Objects.equals(this.entityType, queueId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class QueueId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/QueueStatsId.java b/ce/src/main/java/org/thingsboard/client/model/QueueStatsId.java index 7c528fe4..1aceba74 100644 --- a/ce/src/main/java/org/thingsboard/client/model/QueueStatsId.java +++ b/ce/src/main/java/org/thingsboard/client/model/QueueStatsId.java @@ -42,8 +42,6 @@ * QueueStatsId */ @JsonPropertyOrder({ - QueueStatsId.JSON_PROPERTY_ID, - QueueStatsId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class QueueStatsId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.QUEUE_STATS; - public QueueStatsId() { } - @JsonCreator - public QueueStatsId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public QueueStatsId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public QueueStatsId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this QueueStatsId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - QueueStatsId queueStatsId = (QueueStatsId) o; - return Objects.equals(this.id, queueStatsId.id) && - Objects.equals(this.entityType, queueStatsId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class QueueStatsId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/RelatedEntitiesAggregationCalculatedFieldConfiguration.java b/ce/src/main/java/org/thingsboard/client/model/RelatedEntitiesAggregationCalculatedFieldConfiguration.java index 50d41c5d..a1350357 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RelatedEntitiesAggregationCalculatedFieldConfiguration.java +++ b/ce/src/main/java/org/thingsboard/client/model/RelatedEntitiesAggregationCalculatedFieldConfiguration.java @@ -278,7 +278,7 @@ public void setScheduledUpdateEnabled(@javax.annotation.Nullable Boolean schedul @Override - public RelatedEntitiesAggregationCalculatedFieldConfiguration output(@javax.annotation.Nonnull Output output) { + public RelatedEntitiesAggregationCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { this.setOutput(output); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/RpcId.java b/ce/src/main/java/org/thingsboard/client/model/RpcId.java index 824864d9..fd1aeb41 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RpcId.java +++ b/ce/src/main/java/org/thingsboard/client/model/RpcId.java @@ -42,8 +42,6 @@ * RpcId */ @JsonPropertyOrder({ - RpcId.JSON_PROPERTY_ID, - RpcId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class RpcId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.RPC; - public RpcId() { } - @JsonCreator - public RpcId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public RpcId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public RpcId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this RpcId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RpcId rpcId = (RpcId) o; - return Objects.equals(this.id, rpcId.id) && - Objects.equals(this.entityType, rpcId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RpcId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleChainId.java b/ce/src/main/java/org/thingsboard/client/model/RuleChainId.java index 8e8859e2..7299e140 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RuleChainId.java +++ b/ce/src/main/java/org/thingsboard/client/model/RuleChainId.java @@ -42,8 +42,6 @@ * RuleChainId */ @JsonPropertyOrder({ - RuleChainId.JSON_PROPERTY_ID, - RuleChainId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class RuleChainId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.RULE_CHAIN; - public RuleChainId() { } - @JsonCreator - public RuleChainId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public RuleChainId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public RuleChainId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this RuleChainId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RuleChainId ruleChainId = (RuleChainId) o; - return Objects.equals(this.id, ruleChainId.id) && - Objects.equals(this.entityType, ruleChainId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RuleChainId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleNodeId.java b/ce/src/main/java/org/thingsboard/client/model/RuleNodeId.java index e98f3775..4f370578 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RuleNodeId.java +++ b/ce/src/main/java/org/thingsboard/client/model/RuleNodeId.java @@ -42,8 +42,6 @@ * RuleNodeId */ @JsonPropertyOrder({ - RuleNodeId.JSON_PROPERTY_ID, - RuleNodeId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class RuleNodeId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.RULE_NODE; - public RuleNodeId() { } - @JsonCreator - public RuleNodeId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public RuleNodeId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public RuleNodeId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this RuleNodeId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RuleNodeId ruleNodeId = (RuleNodeId) o; - return Objects.equals(this.id, ruleNodeId.id) && - Objects.equals(this.entityType, ruleNodeId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RuleNodeId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/ScriptCalculatedFieldConfiguration.java b/ce/src/main/java/org/thingsboard/client/model/ScriptCalculatedFieldConfiguration.java index 2d1c1413..4619b490 100644 --- a/ce/src/main/java/org/thingsboard/client/model/ScriptCalculatedFieldConfiguration.java +++ b/ce/src/main/java/org/thingsboard/client/model/ScriptCalculatedFieldConfiguration.java @@ -123,7 +123,7 @@ public void setExpression(@javax.annotation.Nullable String expression) { @Override - public ScriptCalculatedFieldConfiguration output(@javax.annotation.Nonnull Output output) { + public ScriptCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { this.setOutput(output); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/SimpleCalculatedFieldConfiguration.java b/ce/src/main/java/org/thingsboard/client/model/SimpleCalculatedFieldConfiguration.java index a792bc35..80b77f65 100644 --- a/ce/src/main/java/org/thingsboard/client/model/SimpleCalculatedFieldConfiguration.java +++ b/ce/src/main/java/org/thingsboard/client/model/SimpleCalculatedFieldConfiguration.java @@ -152,7 +152,7 @@ public void setUseLatestTs(@javax.annotation.Nullable Boolean useLatestTs) { @Override - public SimpleCalculatedFieldConfiguration output(@javax.annotation.Nonnull Output output) { + public SimpleCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { this.setOutput(output); return this; } diff --git a/ce/src/main/java/org/thingsboard/client/model/Success.java b/ce/src/main/java/org/thingsboard/client/model/Success.java index 9dc09116..9a796e60 100644 --- a/ce/src/main/java/org/thingsboard/client/model/Success.java +++ b/ce/src/main/java/org/thingsboard/client/model/Success.java @@ -40,8 +40,7 @@ * Success */ @JsonPropertyOrder({ - Success.JSON_PROPERTY_GENERATED_CONTENT, - Success.JSON_PROPERTY_STATUS + Success.JSON_PROPERTY_GENERATED_CONTENT }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -55,10 +54,6 @@ public class Success extends TbChatResponse { @javax.annotation.Nullable private String generatedContent; - public static final String JSON_PROPERTY_STATUS = "status"; - @javax.annotation.Nullable - private String status; - public Success() { } @@ -86,30 +81,12 @@ public void setGeneratedContent(@javax.annotation.Nullable String generatedConte } - public Success status(@javax.annotation.Nullable String status) { - this.status = status; + @Override + public Success status(@javax.annotation.Nonnull String status) { + this.setStatus(status); return this; } - /** - * Get status - * @return status - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_STATUS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } - - - @JsonProperty(value = JSON_PROPERTY_STATUS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatus(@javax.annotation.Nullable String status) { - this.status = status; - } - - /** * Return true if this Success object is equal to o. */ @@ -123,13 +100,12 @@ public boolean equals(Object o) { } Success success = (Success) o; return Objects.equals(this.generatedContent, success.generatedContent) && - Objects.equals(this.status, success.status) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(generatedContent, status, super.hashCode()); + return Objects.hash(generatedContent, super.hashCode()); } @Override @@ -138,7 +114,6 @@ public String toString() { sb.append("class Success {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" generatedContent: ").append(toIndentedString(generatedContent)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/TbResourceId.java b/ce/src/main/java/org/thingsboard/client/model/TbResourceId.java index 0450b352..a7e675f0 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TbResourceId.java +++ b/ce/src/main/java/org/thingsboard/client/model/TbResourceId.java @@ -42,8 +42,6 @@ * TbResourceId */ @JsonPropertyOrder({ - TbResourceId.JSON_PROPERTY_ID, - TbResourceId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class TbResourceId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.TB_RESOURCE; - public TbResourceId() { } - @JsonCreator - public TbResourceId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public TbResourceId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public TbResourceId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this TbResourceId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TbResourceId tbResourceId = (TbResourceId) o; - return Objects.equals(this.id, tbResourceId.id) && - Objects.equals(this.entityType, tbResourceId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TbResourceId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/TenantId.java b/ce/src/main/java/org/thingsboard/client/model/TenantId.java index a1028179..ef7de97d 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TenantId.java +++ b/ce/src/main/java/org/thingsboard/client/model/TenantId.java @@ -42,8 +42,6 @@ * TenantId */ @JsonPropertyOrder({ - TenantId.JSON_PROPERTY_ID, - TenantId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class TenantId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.TENANT; - public TenantId() { } - @JsonCreator - public TenantId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public TenantId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public TenantId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this TenantId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TenantId tenantId = (TenantId) o; - return Objects.equals(this.id, tenantId.id) && - Objects.equals(this.entityType, tenantId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TenantId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/TenantProfileId.java b/ce/src/main/java/org/thingsboard/client/model/TenantProfileId.java index daf46fd9..55e6ec28 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TenantProfileId.java +++ b/ce/src/main/java/org/thingsboard/client/model/TenantProfileId.java @@ -42,8 +42,6 @@ * TenantProfileId */ @JsonPropertyOrder({ - TenantProfileId.JSON_PROPERTY_ID, - TenantProfileId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class TenantProfileId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.TENANT_PROFILE; - public TenantProfileId() { } - @JsonCreator - public TenantProfileId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public TenantProfileId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public TenantProfileId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this TenantProfileId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TenantProfileId tenantProfileId = (TenantProfileId) o; - return Objects.equals(this.id, tenantProfileId.id) && - Objects.equals(this.entityType, tenantProfileId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TenantProfileId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/TimeSeriesOutput.java b/ce/src/main/java/org/thingsboard/client/model/TimeSeriesOutput.java index 38f4f0aa..2d6b122f 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TimeSeriesOutput.java +++ b/ce/src/main/java/org/thingsboard/client/model/TimeSeriesOutput.java @@ -30,9 +30,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; import org.thingsboard.client.model.AttributeScope; import org.thingsboard.client.model.Output; -import org.thingsboard.client.model.TimeSeriesOutputStrategy; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -42,7 +42,6 @@ * TimeSeriesOutput */ @JsonPropertyOrder({ - TimeSeriesOutput.JSON_PROPERTY_STRATEGY }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -52,37 +51,9 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) public class TimeSeriesOutput extends Output { - public static final String JSON_PROPERTY_STRATEGY = "strategy"; - @javax.annotation.Nullable - private TimeSeriesOutputStrategy strategy; - public TimeSeriesOutput() { } - public TimeSeriesOutput strategy(@javax.annotation.Nullable TimeSeriesOutputStrategy strategy) { - this.strategy = strategy; - return this; - } - - /** - * Get strategy - * @return strategy - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_STRATEGY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TimeSeriesOutputStrategy getStrategy() { - return strategy; - } - - - @JsonProperty(value = JSON_PROPERTY_STRATEGY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStrategy(@javax.annotation.Nullable TimeSeriesOutputStrategy strategy) { - this.strategy = strategy; - } - - @Override public TimeSeriesOutput name(@javax.annotation.Nullable String name) { this.setName(name); @@ -101,6 +72,12 @@ public TimeSeriesOutput decimalsByDefault(@javax.annotation.Nullable Integer dec return this; } + @Override + public TimeSeriesOutput strategy(@javax.annotation.Nullable Object strategy) { + this.setStrategy(strategy); + return this; + } + @Override public TimeSeriesOutput type(@javax.annotation.Nonnull String type) { this.setType(type); @@ -118,14 +95,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TimeSeriesOutput timeSeriesOutput = (TimeSeriesOutput) o; - return Objects.equals(this.strategy, timeSeriesOutput.strategy) && - super.equals(o); + return super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { - return Objects.hash(strategy, super.hashCode()); + return Objects.hash(super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -133,7 +119,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TimeSeriesOutput {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" strategy: ").append(toIndentedString(strategy)).append("\n"); sb.append("}"); return sb.toString(); } @@ -198,7 +183,7 @@ public String toUrlQueryString(String prefix) { // add `strategy` to the URL query string if (getStrategy() != null) { - joiner.add(getStrategy().toUrlQueryString(prefix + "strategy" + suffix)); + joiner.add(String.format(java.util.Locale.ROOT, "%sstrategy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStrategy())))); } // add `type` to the URL query string diff --git a/ce/src/main/java/org/thingsboard/client/model/UserId.java b/ce/src/main/java/org/thingsboard/client/model/UserId.java index 689dfd50..fc9a13b4 100644 --- a/ce/src/main/java/org/thingsboard/client/model/UserId.java +++ b/ce/src/main/java/org/thingsboard/client/model/UserId.java @@ -42,8 +42,6 @@ * UserId */ @JsonPropertyOrder({ - UserId.JSON_PROPERTY_ID, - UserId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class UserId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.USER; - public UserId() { } - @JsonCreator - public UserId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public UserId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public UserId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this UserId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UserId userId = (UserId) o; - return Objects.equals(this.id, userId.id) && - Objects.equals(this.entityType, userId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UserId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/WebViewPage.java b/ce/src/main/java/org/thingsboard/client/model/WebViewPage.java index d0d5588c..32edd6e3 100644 --- a/ce/src/main/java/org/thingsboard/client/model/WebViewPage.java +++ b/ce/src/main/java/org/thingsboard/client/model/WebViewPage.java @@ -42,7 +42,6 @@ */ @JsonPropertyOrder({ WebViewPage.JSON_PROPERTY_LABEL, - WebViewPage.JSON_PROPERTY_VISIBLE, WebViewPage.JSON_PROPERTY_ICON, WebViewPage.JSON_PROPERTY_URL }) @@ -58,10 +57,6 @@ public class WebViewPage extends MobilePage { @javax.annotation.Nullable private String label; - public static final String JSON_PROPERTY_VISIBLE = "visible"; - @javax.annotation.Nonnull - private Boolean visible; - public static final String JSON_PROPERTY_ICON = "icon"; @javax.annotation.Nullable private String icon; @@ -97,30 +92,6 @@ public void setLabel(@javax.annotation.Nullable String label) { } - public WebViewPage visible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - return this; - } - - /** - * Indicates if page is visible - * @return visible - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getVisible() { - return visible; - } - - - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVisible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - } - - public WebViewPage icon(@javax.annotation.Nullable String icon) { this.icon = icon; return this; @@ -175,6 +146,12 @@ public WebViewPage type(@javax.annotation.Nonnull MobilePageType type) { return this; } + @Override + public WebViewPage visible(@javax.annotation.Nullable Boolean visible) { + this.setVisible(visible); + return this; + } + /** * Return true if this WebViewPage object is equal to o. */ @@ -188,7 +165,6 @@ public boolean equals(Object o) { } WebViewPage webViewPage = (WebViewPage) o; return Objects.equals(this.label, webViewPage.label) && - Objects.equals(this.visible, webViewPage.visible) && Objects.equals(this.icon, webViewPage.icon) && Objects.equals(this.url, webViewPage.url) && super.equals(o); @@ -196,7 +172,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(label, visible, icon, url, super.hashCode()); + return Objects.hash(label, icon, url, super.hashCode()); } @Override @@ -205,7 +181,6 @@ public String toString() { sb.append("class WebViewPage {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append("}"); diff --git a/ce/src/main/java/org/thingsboard/client/model/WidgetTypeId.java b/ce/src/main/java/org/thingsboard/client/model/WidgetTypeId.java index 77b5cac3..5d027764 100644 --- a/ce/src/main/java/org/thingsboard/client/model/WidgetTypeId.java +++ b/ce/src/main/java/org/thingsboard/client/model/WidgetTypeId.java @@ -42,8 +42,6 @@ * WidgetTypeId */ @JsonPropertyOrder({ - WidgetTypeId.JSON_PROPERTY_ID, - WidgetTypeId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class WidgetTypeId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.WIDGET_TYPE; - public WidgetTypeId() { } - @JsonCreator - public WidgetTypeId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public WidgetTypeId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public WidgetTypeId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this WidgetTypeId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - WidgetTypeId widgetTypeId = (WidgetTypeId) o; - return Objects.equals(this.id, widgetTypeId.id) && - Objects.equals(this.entityType, widgetTypeId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class WidgetTypeId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/ce/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java b/ce/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java index e0e23f95..88750984 100644 --- a/ce/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java +++ b/ce/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java @@ -42,8 +42,6 @@ * WidgetsBundleId */ @JsonPropertyOrder({ - WidgetsBundleId.JSON_PROPERTY_ID, - WidgetsBundleId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -53,63 +51,21 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) public class WidgetsBundleId extends EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType = EntityType.WIDGETS_BUNDLE; - public WidgetsBundleId() { } - @JsonCreator - public WidgetsBundleId( - @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) EntityType entityType - ) { - this(); - this.entityType = entityType; - } - + @Override public WidgetsBundleId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + @Override + public WidgetsBundleId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - - - /** * Return true if this WidgetsBundleId object is equal to o. */ @@ -121,15 +77,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - WidgetsBundleId widgetsBundleId = (WidgetsBundleId) o; - return Objects.equals(this.id, widgetsBundleId.id) && - Objects.equals(this.entityType, widgetsBundleId.entityType) && - super.equals(o); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType, super.hashCode()); + return Objects.hash(super.hashCode()); } @Override @@ -137,8 +90,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class WidgetsBundleId {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); sb.append("}"); return sb.toString(); } From d5287c596a5c9e62546382390cfdbc3eef62628a Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Tue, 10 Mar 2026 17:02:48 +0200 Subject: [PATCH 3/8] regenerated pe client --- pe/docs/AdminSettingsId.md | 4 +- pe/docs/AiModelId.md | 4 +- pe/docs/AlarmId.md | 4 +- pe/docs/ApiKeyId.md | 4 +- pe/docs/ApiUsageStateId.md | 23 + pe/docs/Asset.md | 2 +- pe/docs/AssetId.md | 4 +- pe/docs/AssetInfo.md | 2 +- pe/docs/AssetProfileId.md | 4 +- pe/docs/AttributesOutput.md | 1 - pe/docs/AuditLog.md | 2 +- pe/docs/BlobEntityId.md | 4 +- pe/docs/BlobEntityInfo.md | 2 +- pe/docs/BlobEntityWithCustomerInfo.md | 2 +- pe/docs/CalculatedFieldId.md | 4 +- pe/docs/ConverterId.md | 4 +- pe/docs/CustomMenuItem.md | 1 - pe/docs/CustomMobilePage.md | 1 - pe/docs/Customer.md | 2 +- pe/docs/CustomerId.md | 4 +- pe/docs/CustomerInfo.md | 2 +- pe/docs/Dashboard.md | 2 +- pe/docs/DashboardId.md | 4 +- pe/docs/DashboardInfo.md | 2 +- pe/docs/DashboardPage.md | 1 - pe/docs/DefaultMenuItem.md | 1 - pe/docs/DefaultMobilePage.md | 1 - pe/docs/Device.md | 4 +- pe/docs/DeviceApiControllerApi.md | 300 + pe/docs/DeviceId.md | 4 +- pe/docs/DeviceInfo.md | 4 +- pe/docs/DeviceProfileId.md | 4 +- pe/docs/Domain.md | 2 +- pe/docs/DomainId.md | 4 +- pe/docs/DomainInfo.md | 2 +- pe/docs/Edge.md | 2 +- pe/docs/EdgeId.md | 4 +- pe/docs/EdgeInfo.md | 2 +- pe/docs/EntityGroupId.md | 4 +- pe/docs/EntityGroupInfo.md | 2 +- pe/docs/EntityGroupInfoOwnerIdsInner.md | 23 + pe/docs/EntityView.md | 2 +- pe/docs/EntityViewId.md | 4 +- pe/docs/EntityViewInfo.md | 2 +- pe/docs/EventInfo.md | 2 +- pe/docs/Failure.md | 1 - pe/docs/FeaturesInfo.md | 4 +- pe/docs/GroupPermissionId.md | 4 +- pe/docs/HomeMenuItem.md | 1 - pe/docs/IntegrationId.md | 4 +- pe/docs/JobId.md | 4 +- pe/docs/MobileAppBundleId.md | 4 +- pe/docs/MobileAppId.md | 4 +- pe/docs/MobileSelfRegistrationParams.md | 13 - pe/docs/NotificationId.md | 4 +- pe/docs/NotificationRequestId.md | 4 +- pe/docs/NotificationRuleId.md | 4 +- pe/docs/NotificationRuleRecipientsConfig.md | 2 +- pe/docs/NotificationTargetId.md | 4 +- pe/docs/NotificationTemplateId.md | 4 +- pe/docs/OAuth2Client.md | 2 +- pe/docs/OAuth2ClientId.md | 4 +- pe/docs/OtaPackageId.md | 4 +- pe/docs/QueueId.md | 4 +- pe/docs/QueueStatsId.md | 4 +- pe/docs/Report.md | 2 +- pe/docs/ReportId.md | 4 +- pe/docs/ReportInfo.md | 2 +- pe/docs/ReportTemplate.md | 2 +- pe/docs/ReportTemplateId.md | 4 +- pe/docs/ReportTemplateInfo.md | 2 +- pe/docs/ReportTimeSeriesChartSettings.md | 2 +- pe/docs/Role.md | 2 +- pe/docs/RoleId.md | 4 +- pe/docs/RpcId.md | 4 +- pe/docs/RuleChainId.md | 4 +- pe/docs/RuleNodeId.md | 4 +- pe/docs/ScheduledReportInfo.md | 4 +- pe/docs/SchedulerEvent.md | 4 +- pe/docs/SchedulerEventId.md | 4 +- pe/docs/SchedulerEventInfo.md | 4 +- pe/docs/SchedulerEventWithCustomerInfo.md | 4 +- pe/docs/SecretId.md | 4 +- pe/docs/SelfRegistrationParams.md | 2 +- pe/docs/ShortEntityView.md | 2 +- pe/docs/Success.md | 1 - pe/docs/TbResource.md | 2 +- pe/docs/TbResourceId.md | 4 +- pe/docs/TbResourceInfo.md | 2 +- pe/docs/TenantId.md | 4 +- pe/docs/TenantProfileId.md | 4 +- pe/docs/TimeSeriesOutput.md | 1 - pe/docs/TsKvEntry.md | 6 +- pe/docs/User.md | 2 +- pe/docs/UserId.md | 4 +- pe/docs/UserInfo.md | 2 +- pe/docs/WebSelfRegistrationParams.md | 13 - pe/docs/WebViewPage.md | 1 - pe/docs/WidgetTypeId.md | 4 +- pe/docs/WidgetsBundleId.md | 4 +- pe/spec/openapi.json | 27061 ++++++++-------- .../client/api/ThingsboardApi.java | 1929 +- .../client/model/AdminSettingsId.java | 80 +- .../thingsboard/client/model/AiModelId.java | 80 +- .../AlarmAssignmentRecipientsConfig.java | 2 +- .../model/AlarmCommentRecipientsConfig.java | 2 +- .../org/thingsboard/client/model/AlarmId.java | 80 +- .../thingsboard/client/model/ApiKeyId.java | 80 +- .../model/ApiUsageLimitRecipientsConfig.java | 2 +- .../client/model/ApiUsageStateId.java | 159 + .../org/thingsboard/client/model/Asset.java | 14 +- .../org/thingsboard/client/model/AssetId.java | 80 +- .../thingsboard/client/model/AssetInfo.java | 14 +- .../client/model/AssetProfileId.java | 80 +- .../client/model/AttributesOutput.java | 57 +- .../thingsboard/client/model/AuditLog.java | 12 +- .../client/model/BlobEntityId.java | 80 +- .../client/model/BlobEntityInfo.java | 14 +- .../model/BlobEntityWithCustomerInfo.java | 14 +- .../client/model/CalculatedFieldId.java | 80 +- .../thingsboard/client/model/ConverterId.java | 80 +- .../client/model/CsvReportTemplateConfig.java | 2 +- .../client/model/CustomMenuItem.java | 39 +- .../client/model/CustomMobilePage.java | 39 +- .../thingsboard/client/model/Customer.java | 14 +- .../thingsboard/client/model/CustomerId.java | 80 +- .../client/model/CustomerInfo.java | 14 +- .../thingsboard/client/model/Dashboard.java | 14 +- .../thingsboard/client/model/DashboardId.java | 80 +- .../client/model/DashboardInfo.java | 14 +- .../client/model/DashboardPage.java | 39 +- .../client/model/DefaultMenuItem.java | 39 +- .../client/model/DefaultMobilePage.java | 39 +- .../org/thingsboard/client/model/Device.java | 86 +- .../model/DeviceActivityRecipientsConfig.java | 2 +- .../thingsboard/client/model/DeviceId.java | 80 +- .../thingsboard/client/model/DeviceInfo.java | 86 +- .../client/model/DeviceProfileId.java | 80 +- .../org/thingsboard/client/model/Domain.java | 14 +- .../thingsboard/client/model/DomainId.java | 80 +- .../thingsboard/client/model/DomainInfo.java | 14 +- .../org/thingsboard/client/model/Edge.java | 14 +- ...eCommunicationFailureRecipientsConfig.java | 2 +- .../model/EdgeConnectionRecipientsConfig.java | 2 +- .../org/thingsboard/client/model/EdgeId.java | 80 +- .../thingsboard/client/model/EdgeInfo.java | 14 +- .../model/EntitiesLimitRecipientsConfig.java | 2 +- .../model/EntityActionRecipientsConfig.java | 2 +- ...gregationCalculatedFieldConfiguration.java | 2 +- .../client/model/EntityGroupId.java | 80 +- .../client/model/EntityGroupInfo.java | 13 +- .../model/EntityGroupInfoOwnerIdsInner.java | 2721 ++ .../thingsboard/client/model/EntityId.java | 110 + .../thingsboard/client/model/EntityView.java | 14 +- .../client/model/EntityViewId.java | 80 +- .../client/model/EntityViewInfo.java | 14 +- ...latedNotificationRuleRecipientsConfig.java | 2 +- .../thingsboard/client/model/EventInfo.java | 14 +- .../org/thingsboard/client/model/Failure.java | 35 +- .../client/model/FeaturesInfo.java | 152 +- ...eofencingCalculatedFieldConfiguration.java | 2 +- .../client/model/GroupPermissionId.java | 80 +- .../client/model/HomeMenuItem.java | 39 +- .../client/model/IntegrationId.java | 80 +- ...grationLifecycleEventRecipientsConfig.java | 2 +- .../org/thingsboard/client/model/JobId.java | 80 +- .../client/model/MobileAppBundleId.java | 80 +- .../thingsboard/client/model/MobileAppId.java | 80 +- .../model/MobileSelfRegistrationParams.java | 495 +- .../NewPlatformVersionRecipientsConfig.java | 2 +- .../client/model/NotificationId.java | 80 +- .../client/model/NotificationRequestId.java | 80 +- .../client/model/NotificationRuleId.java | 80 +- .../NotificationRuleRecipientsConfig.java | 16 +- .../client/model/NotificationTargetId.java | 80 +- .../client/model/NotificationTemplateId.java | 80 +- .../client/model/OAuth2Client.java | 14 +- .../client/model/OAuth2ClientId.java | 80 +- .../client/model/OtaPackageId.java | 80 +- .../client/model/PdfReportTemplateConfig.java | 2 +- ...opagationCalculatedFieldConfiguration.java | 2 +- .../org/thingsboard/client/model/QueueId.java | 80 +- .../client/model/QueueStatsId.java | 80 +- .../model/RateLimitsRecipientsConfig.java | 2 +- ...gregationCalculatedFieldConfiguration.java | 2 +- .../org/thingsboard/client/model/Report.java | 14 +- .../ReportBarChartWithLabelsSettings.java | 18 +- .../thingsboard/client/model/ReportId.java | 80 +- .../thingsboard/client/model/ReportInfo.java | 14 +- .../model/ReportRangeChartSettings.java | 18 +- .../client/model/ReportTemplate.java | 14 +- .../client/model/ReportTemplateId.java | 80 +- .../client/model/ReportTemplateInfo.java | 14 +- .../model/ReportTimeSeriesChartSettings.java | 74 +- .../ResourceShortageRecipientsConfig.java | 2 +- .../org/thingsboard/client/model/Role.java | 14 +- .../org/thingsboard/client/model/RoleId.java | 80 +- .../org/thingsboard/client/model/RpcId.java | 80 +- .../thingsboard/client/model/RuleChainId.java | 80 +- ...mponentLifecycleEventRecipientsConfig.java | 2 +- .../thingsboard/client/model/RuleNodeId.java | 80 +- .../client/model/ScheduledReportInfo.java | 26 +- .../client/model/SchedulerEvent.java | 26 +- .../client/model/SchedulerEventId.java | 80 +- .../client/model/SchedulerEventInfo.java | 26 +- .../model/SchedulerEventWithCustomerInfo.java | 26 +- .../ScriptCalculatedFieldConfiguration.java | 2 +- .../thingsboard/client/model/SecretId.java | 80 +- .../client/model/SelfRegistrationParams.java | 78 +- .../client/model/ShortEntityView.java | 12 +- .../SimpleCalculatedFieldConfiguration.java | 2 +- .../org/thingsboard/client/model/Success.java | 35 +- ...TaskProcessingFailureRecipientsConfig.java | 2 +- .../thingsboard/client/model/TbResource.java | 56 +- .../client/model/TbResourceId.java | 80 +- .../client/model/TbResourceInfo.java | 56 +- .../thingsboard/client/model/TenantId.java | 80 +- .../client/model/TenantProfileId.java | 80 +- .../client/model/TimeSeriesOutput.java | 57 +- .../thingsboard/client/model/TsKvEntry.java | 174 +- .../org/thingsboard/client/model/User.java | 14 +- .../org/thingsboard/client/model/UserId.java | 80 +- .../thingsboard/client/model/UserInfo.java | 14 +- .../model/WebSelfRegistrationParams.java | 495 +- .../thingsboard/client/model/WebViewPage.java | 39 +- .../client/model/WidgetTypeId.java | 80 +- .../client/model/WidgetsBundleId.java | 80 +- .../thingsboard/client/api/AlarmApiTest.java | 5 +- .../client/api/AlarmCommentApiTest.java | 5 +- .../client/api/CalculatedFieldApiTest.java | 17 +- .../thingsboard/client/api/DeviceApiTest.java | 4 +- .../client/api/EntityGroupApiTest.java | 2 +- .../client/api/EntityQueryApiTest.java | 26 +- .../client/api/EntityRelationApiTest.java | 24 +- .../client/api/EntityViewApiTest.java | 8 +- .../client/api/OtaPackageApiTest.java | 6 +- .../thingsboard/client/api/UserApiTest.java | 2 +- 237 files changed, 21308 insertions(+), 17800 deletions(-) create mode 100644 pe/docs/ApiUsageStateId.md create mode 100644 pe/docs/DeviceApiControllerApi.md create mode 100644 pe/docs/EntityGroupInfoOwnerIdsInner.md create mode 100644 pe/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/EntityGroupInfoOwnerIdsInner.java diff --git a/pe/docs/AdminSettingsId.md b/pe/docs/AdminSettingsId.md index 873cea5a..973867ee 100644 --- a/pe/docs/AdminSettingsId.md +++ b/pe/docs/AdminSettingsId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.AdminSettingsId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/AiModelId.md b/pe/docs/AiModelId.md index 18147752..43b28eca 100644 --- a/pe/docs/AiModelId.md +++ b/pe/docs/AiModelId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.AiModelId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | Entity type of the AI model | | diff --git a/pe/docs/AlarmId.md b/pe/docs/AlarmId.md index f8b26b96..b09db2e3 100644 --- a/pe/docs/AlarmId.md +++ b/pe/docs/AlarmId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.AlarmId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/ApiKeyId.md b/pe/docs/ApiKeyId.md index bd96b4b7..b7485104 100644 --- a/pe/docs/ApiKeyId.md +++ b/pe/docs/ApiKeyId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.ApiKeyId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/ApiUsageStateId.md b/pe/docs/ApiUsageStateId.md new file mode 100644 index 00000000..b3c83b2b --- /dev/null +++ b/pe/docs/ApiUsageStateId.md @@ -0,0 +1,23 @@ + +# ApiUsageStateId + +`org.thingsboard.client.model.ApiUsageStateId` + +**Extends:** **EntityId** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/Asset.md b/pe/docs/Asset.md index 4428f683..6cd508e0 100644 --- a/pe/docs/Asset.md +++ b/pe/docs/Asset.md @@ -16,7 +16,7 @@ | **label** | **String** | Label that may be used in widgets | [optional] | | **assetProfileId** | **AssetProfileId** | JSON object with Asset Profile Id. | [optional] | | **version** | **Long** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the asset. May include: 'description' (string). | [optional] | diff --git a/pe/docs/AssetId.md b/pe/docs/AssetId.md index 3b5d5d84..181eab53 100644 --- a/pe/docs/AssetId.md +++ b/pe/docs/AssetId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.AssetId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/AssetInfo.md b/pe/docs/AssetInfo.md index 7ca3bde2..0b74d04f 100644 --- a/pe/docs/AssetInfo.md +++ b/pe/docs/AssetInfo.md @@ -18,7 +18,7 @@ | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the asset. May include: 'description' (string). | [optional] | diff --git a/pe/docs/AssetProfileId.md b/pe/docs/AssetProfileId.md index 3033f4e6..ca31e5db 100644 --- a/pe/docs/AssetProfileId.md +++ b/pe/docs/AssetProfileId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.AssetProfileId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/AttributesOutput.md b/pe/docs/AttributesOutput.md index b6af683b..61add930 100644 --- a/pe/docs/AttributesOutput.md +++ b/pe/docs/AttributesOutput.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **strategy** | **AttributesOutputStrategy** | | [optional] | diff --git a/pe/docs/AuditLog.md b/pe/docs/AuditLog.md index 06d9da33..27d4f603 100644 --- a/pe/docs/AuditLog.md +++ b/pe/docs/AuditLog.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the auditLog creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **entityId** | **EntityId** | JSON object with Entity id | [optional] [readonly] | +| **entityId** | **EntityId** | JSON object with Entity id | [optional] | | **entityName** | **String** | Name of the logged entity | [optional] [readonly] | | **userId** | **UserId** | JSON object with User id. | [optional] [readonly] | | **userName** | **String** | Unique user name(email) of the user that performed some action on logged entity | [optional] [readonly] | diff --git a/pe/docs/BlobEntityId.md b/pe/docs/BlobEntityId.md index 23dd1746..13b959da 100644 --- a/pe/docs/BlobEntityId.md +++ b/pe/docs/BlobEntityId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.BlobEntityId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/BlobEntityInfo.md b/pe/docs/BlobEntityInfo.md index c22a2b18..095cb632 100644 --- a/pe/docs/BlobEntityInfo.md +++ b/pe/docs/BlobEntityInfo.md @@ -14,7 +14,7 @@ | **name** | **String** | blob entity name | [optional] [readonly] | | **type** | **String** | blob entity type | [optional] [readonly] | | **contentType** | **ContentTypeEnum** | blob content type | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the blob entity | [optional] | diff --git a/pe/docs/BlobEntityWithCustomerInfo.md b/pe/docs/BlobEntityWithCustomerInfo.md index 69a842e9..54bcd2a7 100644 --- a/pe/docs/BlobEntityWithCustomerInfo.md +++ b/pe/docs/BlobEntityWithCustomerInfo.md @@ -16,7 +16,7 @@ | **contentType** | **ContentTypeEnum** | blob content type | [optional] [readonly] | | **customerTitle** | **String** | Title of the customer | [optional] | | **customerIsPublic** | **Boolean** | Parameter that specifies if customer is public | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the blob entity | [optional] | diff --git a/pe/docs/CalculatedFieldId.md b/pe/docs/CalculatedFieldId.md index 3ef8e84f..b3288aa3 100644 --- a/pe/docs/CalculatedFieldId.md +++ b/pe/docs/CalculatedFieldId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.CalculatedFieldId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/ConverterId.md b/pe/docs/ConverterId.md index b1b18162..6c34b6b2 100644 --- a/pe/docs/ConverterId.md +++ b/pe/docs/ConverterId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.ConverterId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/CustomMenuItem.md b/pe/docs/CustomMenuItem.md index 22a36355..bd084c21 100644 --- a/pe/docs/CustomMenuItem.md +++ b/pe/docs/CustomMenuItem.md @@ -17,7 +17,6 @@ | **hideDashboardToolbar** | **Boolean** | Hide the dashboard toolbar | [optional] | | **url** | **String** | URL to open in the iframe, when user clicks the menu item | [optional] | | **setAccessToken** | **Boolean** | Set the access token of the current user to a new dashboard | [optional] | -| **visible** | **Boolean** | Mark if menu item is visible for user | [optional] | | **pages** | **List\** | List of child menu items | [optional] | diff --git a/pe/docs/CustomMobilePage.md b/pe/docs/CustomMobilePage.md index b90633e7..47ec52e8 100644 --- a/pe/docs/CustomMobilePage.md +++ b/pe/docs/CustomMobilePage.md @@ -10,7 +10,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **label** | **String** | Page label | [optional] | -| **visible** | **Boolean** | Indicates if page is visible | | | **icon** | **String** | URL of the page icon | [optional] | | **path** | **String** | Path to custom page | [optional] | diff --git a/pe/docs/Customer.md b/pe/docs/Customer.md index c14dd4b5..f95d97e1 100644 --- a/pe/docs/Customer.md +++ b/pe/docs/Customer.md @@ -24,7 +24,7 @@ | **customMenuId** | **CustomMenuId** | | [optional] | | **name** | **String** | Name of the customer. Read-only, duplicated from title for backward compatibility | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with parent Customer Id | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the customer. May include: 'description' (string), 'homeDashboardId' (string, UUID of the home dashboard), 'homeDashboardHideToolbar' (boolean, whether to hide the dashboard toolbar), 'isPublic' (boolean, whether this is a public customer). | [optional] | diff --git a/pe/docs/CustomerId.md b/pe/docs/CustomerId.md index bccf998e..9e077e20 100644 --- a/pe/docs/CustomerId.md +++ b/pe/docs/CustomerId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.CustomerId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/CustomerInfo.md b/pe/docs/CustomerInfo.md index 24c2bf3d..f69f84df 100644 --- a/pe/docs/CustomerInfo.md +++ b/pe/docs/CustomerInfo.md @@ -26,7 +26,7 @@ | **groups** | **List\** | Groups | [optional] | | **name** | **String** | Name of the customer. Read-only, duplicated from title for backward compatibility | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with parent Customer Id | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the customer. May include: 'description' (string), 'homeDashboardId' (string, UUID of the home dashboard), 'homeDashboardHideToolbar' (boolean, whether to hide the dashboard toolbar), 'isPublic' (boolean, whether this is a public customer). | [optional] | diff --git a/pe/docs/Dashboard.md b/pe/docs/Dashboard.md index 7c81d175..31c3d8d7 100644 --- a/pe/docs/Dashboard.md +++ b/pe/docs/Dashboard.md @@ -20,7 +20,7 @@ | **resources** | **List\** | | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | | **name** | **String** | Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | diff --git a/pe/docs/DashboardId.md b/pe/docs/DashboardId.md index 0cdebef3..c75a60c9 100644 --- a/pe/docs/DashboardId.md +++ b/pe/docs/DashboardId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.DashboardId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/DashboardInfo.md b/pe/docs/DashboardInfo.md index 40a0b93b..e11ce9cf 100644 --- a/pe/docs/DashboardInfo.md +++ b/pe/docs/DashboardInfo.md @@ -22,7 +22,7 @@ | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | diff --git a/pe/docs/DashboardPage.md b/pe/docs/DashboardPage.md index 446481be..c714b734 100644 --- a/pe/docs/DashboardPage.md +++ b/pe/docs/DashboardPage.md @@ -10,7 +10,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **label** | **String** | Page label | [optional] | -| **visible** | **Boolean** | Indicates if page is visible | | | **icon** | **String** | URL of the page icon | [optional] | | **dashboardId** | **String** | Dashboard id | [optional] | diff --git a/pe/docs/DefaultMenuItem.md b/pe/docs/DefaultMenuItem.md index 2791a1e2..39580834 100644 --- a/pe/docs/DefaultMenuItem.md +++ b/pe/docs/DefaultMenuItem.md @@ -12,7 +12,6 @@ | **id** | **String** | Unique identifier for predefined menu items | [optional] [readonly] | | **name** | **String** | Name of the menu item | [optional] | | **icon** | **String** | URL of the menu item icon. Overrides 'materialIcon' | [optional] | -| **visible** | **Boolean** | Mark if menu item is visible for user | [optional] | | **pages** | **List\** | List of child menu items | [optional] | diff --git a/pe/docs/DefaultMobilePage.md b/pe/docs/DefaultMobilePage.md index 561f744e..f3ddbeca 100644 --- a/pe/docs/DefaultMobilePage.md +++ b/pe/docs/DefaultMobilePage.md @@ -10,7 +10,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **label** | **String** | Page label | [optional] | -| **visible** | **Boolean** | Indicates if page is visible | | | **icon** | **String** | URL of the page icon | [optional] | | **id** | **DefaultPageId** | Identifier for default page | [optional] | diff --git a/pe/docs/Device.md b/pe/docs/Device.md index 0b00f936..e0bc6354 100644 --- a/pe/docs/Device.md +++ b/pe/docs/Device.md @@ -18,9 +18,9 @@ | **firmwareId** | **OtaPackageId** | JSON object with Ota Package Id. | [optional] | | **softwareId** | **OtaPackageId** | JSON object with Ota Package Id. | [optional] | | **version** | **Long** | | [optional] | -| **deviceData** | **DeviceData** | JSON object with content specific to type of transport in the device profile. | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | 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] | +| **deviceData** | **DeviceData** | JSON object with content specific to type of transport in the device profile. | [optional] | diff --git a/pe/docs/DeviceApiControllerApi.md b/pe/docs/DeviceApiControllerApi.md new file mode 100644 index 00000000..ad70f8db --- /dev/null +++ b/pe/docs/DeviceApiControllerApi.md @@ -0,0 +1,300 @@ +# DeviceApiControllerApi + +`ThingsboardClient` methods: + +``` +String getDeviceAttributes(@Nonnull String deviceToken, @Nonnull String clientKeys, @Nonnull String sharedKeys) // Get attributes (getDeviceAttributes) +String getFirmware(@Nonnull String deviceToken, @Nonnull String title, @Nonnull String version, @Nullable Integer size, @Nullable Integer chunk) // Get Device Firmware (getFirmware) +String getSoftware(@Nonnull String deviceToken, @Nonnull String title, @Nonnull String version, @Nullable Integer size, @Nullable Integer chunk) // Get Device Software (getSoftware) +String postDeviceAttributes(@Nonnull String deviceToken, @Nonnull String body) // Post attributes (postDeviceAttributes) +String postRpcRequest(@Nonnull String deviceToken, @Nonnull String body) // Send the RPC command (postRpcRequest) +String postTelemetry(@Nonnull String deviceToken, @Nonnull String body) // Post time series data (postTelemetry) +String provisionDevice(@Nonnull String body) // Provision new device (provisionDevice) +String replyToCommand(@Nonnull String deviceToken, @Nonnull String requestId, @Nonnull String body) // Reply to RPC commands (replyToCommand) +String saveClaimingInfo(@Nonnull String deviceToken, @Nullable String body) // Save claiming information (saveClaimingInfo) +String subscribeToAttributes(@Nonnull String deviceToken, @Nullable Long timeout) // Subscribe to attribute updates (subscribeToAttributes) (Deprecated) +String subscribeToCommands(@Nonnull String deviceToken, @Nullable Long timeout) // Subscribe to RPC commands (subscribeToCommands) (Deprecated) +``` + + +## getDeviceAttributes + +``` +String getDeviceAttributes(@Nonnull String deviceToken, @Nonnull String clientKeys, @Nonnull String sharedKeys) +``` + +**GET** `/api/v1/{deviceToken}/attributes` + +Get attributes (getDeviceAttributes) + +Returns all attributes that belong to device. Use optional 'clientKeys' and/or 'sharedKeys' parameter to return specific attributes. Example of the result: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **clientKeys** | **String** | Comma separated key names for attribute with client scope | | +| **sharedKeys** | **String** | Comma separated key names for attribute with shared scope | | + +### Return type + +**String** + + +## getFirmware + +``` +String getFirmware(@Nonnull String deviceToken, @Nonnull String title, @Nonnull String version, @Nullable Integer size, @Nullable Integer chunk) +``` + +**GET** `/api/v1/{deviceToken}/firmware` + +Get Device Firmware (getFirmware) + +Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **title** | **String** | Title of the firmware, corresponds to the value of 'fw_title' attribute. | | +| **version** | **String** | Version of the firmware, corresponds to the value of 'fw_version' attribute. | | +| **size** | **Integer** | Size of the chunk. Optional. Omit to download the entire file without chunks. | [optional] [default to 0] | +| **chunk** | **Integer** | Index of the chunk. Optional. Omit to download the entire file without chunks. | [optional] [default to 0] | + +### Return type + +**String** + + +## getSoftware + +``` +String getSoftware(@Nonnull String deviceToken, @Nonnull String title, @Nonnull String version, @Nullable Integer size, @Nullable Integer chunk) +``` + +**GET** `/api/v1/{deviceToken}/software` + +Get Device Software (getSoftware) + +Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **title** | **String** | Title of the software, corresponds to the value of 'sw_title' attribute. | | +| **version** | **String** | Version of the software, corresponds to the value of 'sw_version' attribute. | | +| **size** | **Integer** | Size of the chunk. Optional. Omit to download the entire file without using chunks. | [optional] [default to 0] | +| **chunk** | **Integer** | Index of the chunk. Optional. Omit to download the entire file without using chunks. | [optional] [default to 0] | + +### Return type + +**String** + + +## postDeviceAttributes + +``` +String postDeviceAttributes(@Nonnull String deviceToken, @Nonnull String body) +``` + +**POST** `/api/v1/{deviceToken}/attributes` + +Post attributes (postDeviceAttributes) + +Post client attribute updates on behalf of device. Example of the request: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **body** | **String** | JSON with attribute key-value pairs. See API call description for example. | | + +### Return type + +**String** + + +## postRpcRequest + +``` +String postRpcRequest(@Nonnull String deviceToken, @Nonnull String body) +``` + +**POST** `/api/v1/{deviceToken}/rpc` + +Send the RPC command (postRpcRequest) + +Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **body** | **String** | The RPC request JSON | | + +### Return type + +**String** + + +## postTelemetry + +``` +String postTelemetry(@Nonnull String deviceToken, @Nonnull String body) +``` + +**POST** `/api/v1/{deviceToken}/telemetry` + +Post time series data (postTelemetry) + +Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **body** | **String** | | | + +### Return type + +**String** + + +## provisionDevice + +``` +String provisionDevice(@Nonnull String body) +``` + +**POST** `/api/v1/provision` + +Provision new device (provisionDevice) + +Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String** | JSON with provision request. See API call description for example. | | + +### Return type + +**String** + + +## replyToCommand + +``` +String replyToCommand(@Nonnull String deviceToken, @Nonnull String requestId, @Nonnull String body) +``` + +**POST** `/api/v1/{deviceToken}/rpc/{requestId}` + +Reply to RPC commands (replyToCommand) + +Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **requestId** | **String** | RPC request id from the incoming RPC request | | +| **body** | **String** | Reply to the RPC request, JSON. For example: {\"status\":\"success\"} | | + +### Return type + +**String** + + +## saveClaimingInfo + +``` +String saveClaimingInfo(@Nonnull String deviceToken, @Nullable String body) +``` + +**POST** `/api/v1/{deviceToken}/claim` + +Save claiming information (saveClaimingInfo) + +Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **body** | **String** | | [optional] | + +### Return type + +**String** + + +## subscribeToAttributes + +``` +String subscribeToAttributes(@Nonnull String deviceToken, @Nullable Long timeout) +``` + +**GET** `/api/v1/{deviceToken}/attributes/updates` + +Subscribe to attribute updates (subscribeToAttributes) (Deprecated) + +Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **timeout** | **Long** | Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. | [optional] [default to 0] | + +### Return type + +**String** + + +## subscribeToCommands + +``` +String subscribeToCommands(@Nonnull String deviceToken, @Nullable Long timeout) +``` + +**GET** `/api/v1/{deviceToken}/rpc` + +Subscribe to RPC commands (subscribeToCommands) (Deprecated) + +Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **timeout** | **Long** | Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. | [optional] [default to 0] | + +### Return type + +**String** + diff --git a/pe/docs/DeviceId.md b/pe/docs/DeviceId.md index b282757b..ba885a3a 100644 --- a/pe/docs/DeviceId.md +++ b/pe/docs/DeviceId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.DeviceId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/DeviceInfo.md b/pe/docs/DeviceInfo.md index 9db5a77e..7b3395c6 100644 --- a/pe/docs/DeviceInfo.md +++ b/pe/docs/DeviceInfo.md @@ -21,9 +21,9 @@ | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | | **active** | **Boolean** | Device active flag. | [optional] [readonly] | -| **deviceData** | **DeviceData** | JSON object with content specific to type of transport in the device profile. | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | 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] | +| **deviceData** | **DeviceData** | JSON object with content specific to type of transport in the device profile. | [optional] | diff --git a/pe/docs/DeviceProfileId.md b/pe/docs/DeviceProfileId.md index 6d554c70..6927dd30 100644 --- a/pe/docs/DeviceProfileId.md +++ b/pe/docs/DeviceProfileId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.DeviceProfileId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/Domain.md b/pe/docs/Domain.md index 07c5e8de..646bed33 100644 --- a/pe/docs/Domain.md +++ b/pe/docs/Domain.md @@ -16,7 +16,7 @@ A JSON value representing the Domain. | **name** | **String** | Domain name. Cannot be empty | | | **oauth2Enabled** | **Boolean** | Whether OAuth2 settings are enabled or not | [optional] | | **propagateToEdge** | **Boolean** | Whether OAuth2 settings are enabled on Edge or not | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | diff --git a/pe/docs/DomainId.md b/pe/docs/DomainId.md index a7406eb1..b831e844 100644 --- a/pe/docs/DomainId.md +++ b/pe/docs/DomainId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.DomainId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | | | diff --git a/pe/docs/DomainInfo.md b/pe/docs/DomainInfo.md index c6c36df6..72168f73 100644 --- a/pe/docs/DomainInfo.md +++ b/pe/docs/DomainInfo.md @@ -15,7 +15,7 @@ | **oauth2Enabled** | **Boolean** | Whether OAuth2 settings are enabled or not | [optional] | | **propagateToEdge** | **Boolean** | Whether OAuth2 settings are enabled on Edge or not | [optional] | | **oauth2ClientInfos** | **List\** | List of available oauth2 clients | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | diff --git a/pe/docs/Edge.md b/pe/docs/Edge.md index 1a831107..f5d88018 100644 --- a/pe/docs/Edge.md +++ b/pe/docs/Edge.md @@ -22,7 +22,7 @@ A JSON value representing the edge. | **edgeLicenseKey** | **String** | Edge license key obtained from license portal | | | **cloudEndpoint** | **String** | Edge uses this cloud URL to activate and periodically check it's license | | | **version** | **Long** | | [optional] | -| **ownerId** | **EntityId** | | [optional] [readonly] | +| **ownerId** | **EntityId** | | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the edge. May include: 'description' (string). | [optional] | diff --git a/pe/docs/EdgeId.md b/pe/docs/EdgeId.md index 6cb962d7..f04c5af9 100644 --- a/pe/docs/EdgeId.md +++ b/pe/docs/EdgeId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.EdgeId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/EdgeInfo.md b/pe/docs/EdgeInfo.md index 31bcb22a..25acd82a 100644 --- a/pe/docs/EdgeInfo.md +++ b/pe/docs/EdgeInfo.md @@ -22,7 +22,7 @@ | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | -| **ownerId** | **EntityId** | | [optional] [readonly] | +| **ownerId** | **EntityId** | | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the edge. May include: 'description' (string). | [optional] | diff --git a/pe/docs/EntityGroupId.md b/pe/docs/EntityGroupId.md index c4e56ecb..53d3ab43 100644 --- a/pe/docs/EntityGroupId.md +++ b/pe/docs/EntityGroupId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.EntityGroupId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/EntityGroupInfo.md b/pe/docs/EntityGroupInfo.md index dd8a60f1..1110e68d 100644 --- a/pe/docs/EntityGroupInfo.md +++ b/pe/docs/EntityGroupInfo.md @@ -15,7 +15,7 @@ | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the entity group. May include: 'description' (string), 'isPublic' (boolean, whether this group is shared publicly), 'publicCustomerId' (string, UUID of the public customer associated with this group). | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | JSON with the configuration for UI components: list of columns, settings, actions, etc | [optional] | | **version** | **Long** | | [optional] | -| **ownerIds** | **Set\** | List of the entity group owners. | | +| **ownerIds** | **Set\** | List of the entity group owners. | | | **groupAll** | **Boolean** | Indicates special group 'All' that contains all entities and can't be deleted. | [optional] | | **edgeGroupAll** | **Boolean** | Indicates special edge group 'All' that contains all entities and can't be deleted. | [optional] [readonly] | | **tenantId** | **TenantId** | | [optional] | diff --git a/pe/docs/EntityGroupInfoOwnerIdsInner.md b/pe/docs/EntityGroupInfoOwnerIdsInner.md new file mode 100644 index 00000000..44097d33 --- /dev/null +++ b/pe/docs/EntityGroupInfoOwnerIdsInner.md @@ -0,0 +1,23 @@ + +# EntityGroupInfoOwnerIdsInner + +`org.thingsboard.client.model.EntityGroupInfoOwnerIdsInner` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **id** | **UUID** | ID of the entity, time-based UUID v1 | | +| **entityType** | **EntityType** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/EntityView.md b/pe/docs/EntityView.md index 986d862e..c6b98988 100644 --- a/pe/docs/EntityView.md +++ b/pe/docs/EntityView.md @@ -20,7 +20,7 @@ A JSON object representing the entity view. | **version** | **Long** | | [optional] | | **id** | **EntityViewId** | JSON object with the Entity View Id. Specify this field to update the Entity View. Referencing non-existing Entity View Id will cause error. Omit this field to create new Entity View. | [optional] | | **createdTime** | **Long** | Timestamp of the Entity View creation, in milliseconds | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the entity view. May include: 'description' (string). | [optional] | diff --git a/pe/docs/EntityViewId.md b/pe/docs/EntityViewId.md index 2ac79613..48cd0b85 100644 --- a/pe/docs/EntityViewId.md +++ b/pe/docs/EntityViewId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.EntityViewId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/EntityViewInfo.md b/pe/docs/EntityViewInfo.md index 05a6f669..ee0cec48 100644 --- a/pe/docs/EntityViewInfo.md +++ b/pe/docs/EntityViewInfo.md @@ -20,7 +20,7 @@ | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the entity view. May include: 'description' (string). | [optional] | diff --git a/pe/docs/EventInfo.md b/pe/docs/EventInfo.md index 2af98e01..f9940f61 100644 --- a/pe/docs/EventInfo.md +++ b/pe/docs/EventInfo.md @@ -12,7 +12,7 @@ | **tenantId** | **TenantId** | JSON object with Tenant Id. | [optional] [readonly] | | **type** | **String** | Event type | [optional] | | **uid** | **String** | string | [optional] | -| **entityId** | **EntityId** | JSON object with Entity Id for which event is created. | [optional] [readonly] | +| **entityId** | **EntityId** | JSON object with Entity Id for which event is created. | [optional] | | **body** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | diff --git a/pe/docs/Failure.md b/pe/docs/Failure.md index af15d929..a4ce140d 100644 --- a/pe/docs/Failure.md +++ b/pe/docs/Failure.md @@ -10,7 +10,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **errorDetails** | **String** | A string containing details about the failure | [optional] | -| **status** | **String** | | [optional] | diff --git a/pe/docs/FeaturesInfo.md b/pe/docs/FeaturesInfo.md index dd9e5af5..7c1a8aa5 100644 --- a/pe/docs/FeaturesInfo.md +++ b/pe/docs/FeaturesInfo.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **whiteLabelingEnabled** | **Boolean** | | [optional] | | **smsEnabled** | **Boolean** | | [optional] | | **oauthEnabled** | **Boolean** | | [optional] | +| **whiteLabelingEnabled** | **Boolean** | | [optional] | +| **notificationEnabled** | **Boolean** | | [optional] | | **twoFaEnabled** | **Boolean** | | [optional] | | **emailEnabled** | **Boolean** | | [optional] | -| **notificationEnabled** | **Boolean** | | [optional] | diff --git a/pe/docs/GroupPermissionId.md b/pe/docs/GroupPermissionId.md index f8b2f4c4..6cb91b73 100644 --- a/pe/docs/GroupPermissionId.md +++ b/pe/docs/GroupPermissionId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.GroupPermissionId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/HomeMenuItem.md b/pe/docs/HomeMenuItem.md index 9042cddc..e0a5af6d 100644 --- a/pe/docs/HomeMenuItem.md +++ b/pe/docs/HomeMenuItem.md @@ -12,7 +12,6 @@ | **id** | **String** | Unique identifier for predefined menu items | [optional] [readonly] | | **name** | **String** | Name of the menu item | [optional] | | **icon** | **String** | URL of the menu item icon. Overrides 'materialIcon' | [optional] | -| **visible** | **Boolean** | Mark if menu item is visible for user | [optional] | | **pages** | **List\** | List of child menu items | [optional] | | **homeType** | **HomeMenuItemType** | DEFAULT or DASHBOARD. DASHBOARD means default home page presentation changed to refer to dashboard | [optional] | | **dashboardId** | **String** | Id of the Dashboard to open, when user clicks the menu item | [optional] | diff --git a/pe/docs/IntegrationId.md b/pe/docs/IntegrationId.md index 1617fa64..abe382db 100644 --- a/pe/docs/IntegrationId.md +++ b/pe/docs/IntegrationId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.IntegrationId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/JobId.md b/pe/docs/JobId.md index 6b5e3cb4..81852d83 100644 --- a/pe/docs/JobId.md +++ b/pe/docs/JobId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.JobId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/MobileAppBundleId.md b/pe/docs/MobileAppBundleId.md index bfa901f8..7c10daa1 100644 --- a/pe/docs/MobileAppBundleId.md +++ b/pe/docs/MobileAppBundleId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.MobileAppBundleId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | | | diff --git a/pe/docs/MobileAppId.md b/pe/docs/MobileAppId.md index 4b205e54..aee59bc3 100644 --- a/pe/docs/MobileAppId.md +++ b/pe/docs/MobileAppId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.MobileAppId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | | | diff --git a/pe/docs/MobileSelfRegistrationParams.md b/pe/docs/MobileSelfRegistrationParams.md index f2c8f3ff..131b5c80 100644 --- a/pe/docs/MobileSelfRegistrationParams.md +++ b/pe/docs/MobileSelfRegistrationParams.md @@ -9,19 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **enabled** | **Boolean** | Indicates if self-registration is allowed via sign-up form | [optional] | -| **title** | **String** | The text message to appear on login form | | -| **captcha** | **CaptchaParams** | Captcha site key for 'I'm not a robot' validation | | -| **signUpFields** | **List\** | List of sign-up form fields | | -| **showPrivacyPolicy** | **Boolean** | Show or hide 'Privacy Policy' | [optional] | -| **showTermsOfUse** | **Boolean** | Show or hide 'Terms of Use' | [optional] | -| **notificationRecipient** | **NotificationTargetId** | Recipient to use for notifications when new user self-registered. | [optional] | -| **customerTitlePrefix** | **String** | Prefix to add to created customer | [optional] | -| **customerGroupId** | **EntityGroupId** | Id of the customer group customer wil be added to. | [optional] | -| **permissions** | **List\** | Group Permissions to assign for the new customer user. | | -| **defaultDashboard** | **DefaultDashboardParams** | Default dashboard params | [optional] | -| **homeDashboard** | **HomeDashboardParams** | Home dashboard params | [optional] | -| **customMenuId** | **CustomMenuId** | Custom menu id | [optional] | | **privacyPolicy** | **String** | Privacy policy text. Supports HTML. | [optional] | | **termsOfUse** | **String** | Terms of User text. Supports HTML. | [optional] | | **redirect** | **MobileRedirectParams** | Mobile redirect params. | | diff --git a/pe/docs/NotificationId.md b/pe/docs/NotificationId.md index c3fa9b64..dd34b7eb 100644 --- a/pe/docs/NotificationId.md +++ b/pe/docs/NotificationId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.NotificationId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/NotificationRequestId.md b/pe/docs/NotificationRequestId.md index d532018f..c873ed0a 100644 --- a/pe/docs/NotificationRequestId.md +++ b/pe/docs/NotificationRequestId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.NotificationRequestId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/NotificationRuleId.md b/pe/docs/NotificationRuleId.md index ed79e89b..c54af744 100644 --- a/pe/docs/NotificationRuleId.md +++ b/pe/docs/NotificationRuleId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.NotificationRuleId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/NotificationRuleRecipientsConfig.md b/pe/docs/NotificationRuleRecipientsConfig.md index 14e18a09..84f99173 100644 --- a/pe/docs/NotificationRuleRecipientsConfig.md +++ b/pe/docs/NotificationRuleRecipientsConfig.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **triggerType** | **NotificationRuleTriggerType** | | | +| **triggerType** | **NotificationRuleTriggerType** | | [optional] | diff --git a/pe/docs/NotificationTargetId.md b/pe/docs/NotificationTargetId.md index 4863df8b..3d02acee 100644 --- a/pe/docs/NotificationTargetId.md +++ b/pe/docs/NotificationTargetId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.NotificationTargetId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/NotificationTemplateId.md b/pe/docs/NotificationTemplateId.md index fce9b549..8f4d00ce 100644 --- a/pe/docs/NotificationTemplateId.md +++ b/pe/docs/NotificationTemplateId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.NotificationTemplateId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/OAuth2Client.md b/pe/docs/OAuth2Client.md index e910032b..6d5f3b9b 100644 --- a/pe/docs/OAuth2Client.md +++ b/pe/docs/OAuth2Client.md @@ -27,7 +27,7 @@ | **loginButtonIcon** | **String** | Log in button icon for OAuth2 provider | [optional] | | **platforms** | **List\** | List of platforms for which usage of the OAuth2 client is allowed (empty for all allowed) | [optional] | | **name** | **String** | | [optional] [readonly] | -| **ownerId** | **EntityId** | | [optional] [readonly] | +| **ownerId** | **EntityId** | | [optional] | diff --git a/pe/docs/OAuth2ClientId.md b/pe/docs/OAuth2ClientId.md index 67682a4f..d553e524 100644 --- a/pe/docs/OAuth2ClientId.md +++ b/pe/docs/OAuth2ClientId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.OAuth2ClientId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | | | diff --git a/pe/docs/OtaPackageId.md b/pe/docs/OtaPackageId.md index a8f7df30..94de5cc9 100644 --- a/pe/docs/OtaPackageId.md +++ b/pe/docs/OtaPackageId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.OtaPackageId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/QueueId.md b/pe/docs/QueueId.md index 8b3e898c..2b52656a 100644 --- a/pe/docs/QueueId.md +++ b/pe/docs/QueueId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.QueueId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/QueueStatsId.md b/pe/docs/QueueStatsId.md index 9d169464..78bce8bc 100644 --- a/pe/docs/QueueStatsId.md +++ b/pe/docs/QueueStatsId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.QueueStatsId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/Report.md b/pe/docs/Report.md index 8b087b5e..ccd6f3c4 100644 --- a/pe/docs/Report.md +++ b/pe/docs/Report.md @@ -15,7 +15,7 @@ | **format** | **TbReportFormat** | | | | **name** | **String** | | | | **userId** | **UserId** | | | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | diff --git a/pe/docs/ReportId.md b/pe/docs/ReportId.md index 63550140..db659bef 100644 --- a/pe/docs/ReportId.md +++ b/pe/docs/ReportId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.ReportId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/ReportInfo.md b/pe/docs/ReportInfo.md index ab63b44b..989831f3 100644 --- a/pe/docs/ReportInfo.md +++ b/pe/docs/ReportInfo.md @@ -18,7 +18,7 @@ | **templateInfo** | **EntityInfo** | | [optional] | | **customerTitle** | **String** | | [optional] | | **userName** | **String** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | diff --git a/pe/docs/ReportTemplate.md b/pe/docs/ReportTemplate.md index ddb4f161..12ea7594 100644 --- a/pe/docs/ReportTemplate.md +++ b/pe/docs/ReportTemplate.md @@ -19,7 +19,7 @@ A JSON value representing the Report Template. | **description** | **String** | Description | [optional] | | **version** | **Long** | | [optional] | | **_configuration** | **ReportTemplateConfig** | a JSON value with report template configuration | | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | diff --git a/pe/docs/ReportTemplateId.md b/pe/docs/ReportTemplateId.md index f2dd6733..1cc0f169 100644 --- a/pe/docs/ReportTemplateId.md +++ b/pe/docs/ReportTemplateId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.ReportTemplateId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/ReportTemplateInfo.md b/pe/docs/ReportTemplateInfo.md index a0c905a5..00b4fbe3 100644 --- a/pe/docs/ReportTemplateInfo.md +++ b/pe/docs/ReportTemplateInfo.md @@ -17,7 +17,7 @@ | **description** | **String** | Description | [optional] | | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | diff --git a/pe/docs/ReportTimeSeriesChartSettings.md b/pe/docs/ReportTimeSeriesChartSettings.md index 939a0353..7b9dcfc9 100644 --- a/pe/docs/ReportTimeSeriesChartSettings.md +++ b/pe/docs/ReportTimeSeriesChartSettings.md @@ -23,8 +23,8 @@ | **legendLabelColor** | **String** | | [optional] | | **legendValueFont** | **Font** | | [optional] | | **legendValueColor** | **String** | | [optional] | -| **xaxis** | **TimeSeriesChartXAxisSettings** | | [optional] | | **yaxes** | **Map\** | | [optional] | +| **xaxis** | **TimeSeriesChartXAxisSettings** | | [optional] | | **thresholds** | **List\** | | [optional] | | **grid** | **TimeSeriesChartGridSettings** | | [optional] | | **yAxes** | **Map\** | | [optional] | diff --git a/pe/docs/Role.md b/pe/docs/Role.md index 6f6976df..45734ca7 100644 --- a/pe/docs/Role.md +++ b/pe/docs/Role.md @@ -17,7 +17,7 @@ A JSON value representing the role. | **version** | **Long** | | [optional] | | **id** | **RoleId** | JSON object with the Role Id. Specify this field to update the Role. Referencing non-existing Role Id will cause error. Omit this field to create new Role. | [optional] | | **createdTime** | **Long** | Timestamp of the role creation, in milliseconds | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the role. May include: 'description' (string). | [optional] | diff --git a/pe/docs/RoleId.md b/pe/docs/RoleId.md index 82750128..bf727b59 100644 --- a/pe/docs/RoleId.md +++ b/pe/docs/RoleId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.RoleId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/RpcId.md b/pe/docs/RpcId.md index 1cf525b7..d092145b 100644 --- a/pe/docs/RpcId.md +++ b/pe/docs/RpcId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.RpcId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/RuleChainId.md b/pe/docs/RuleChainId.md index 80204725..c807f0e9 100644 --- a/pe/docs/RuleChainId.md +++ b/pe/docs/RuleChainId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.RuleChainId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/RuleNodeId.md b/pe/docs/RuleNodeId.md index 910349c1..dd9399c5 100644 --- a/pe/docs/RuleNodeId.md +++ b/pe/docs/RuleNodeId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.RuleNodeId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/ScheduledReportInfo.md b/pe/docs/ScheduledReportInfo.md index b7d81e9f..8bfedc8b 100644 --- a/pe/docs/ScheduledReportInfo.md +++ b/pe/docs/ScheduledReportInfo.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | +| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | | **schedule** | **com.fasterxml.jackson.databind.JsonNode** | a JSON value with schedule time configuration | [optional] | @@ -20,7 +20,7 @@ | **templateInfo** | **EntityInfo** | Report template info | [optional] [readonly] | | **customerTitle** | **String** | Customer title | [optional] [readonly] | | **userName** | **String** | Report user name | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | diff --git a/pe/docs/SchedulerEvent.md b/pe/docs/SchedulerEvent.md index 528b1b11..e35ec3a1 100644 --- a/pe/docs/SchedulerEvent.md +++ b/pe/docs/SchedulerEvent.md @@ -13,14 +13,14 @@ A JSON value representing the Scheduler Event. | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | +| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | | **schedule** | **com.fasterxml.jackson.databind.JsonNode** | a JSON value with schedule time configuration | [optional] | | **enabled** | **Boolean** | Enable/disable scheduler | [optional] | | **version** | **Long** | | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | diff --git a/pe/docs/SchedulerEventId.md b/pe/docs/SchedulerEventId.md index 9561d8e0..597ab2ba 100644 --- a/pe/docs/SchedulerEventId.md +++ b/pe/docs/SchedulerEventId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.SchedulerEventId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/SchedulerEventInfo.md b/pe/docs/SchedulerEventInfo.md index 24ac6c4c..8ddc8760 100644 --- a/pe/docs/SchedulerEventInfo.md +++ b/pe/docs/SchedulerEventInfo.md @@ -11,13 +11,13 @@ | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | +| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | | **schedule** | **com.fasterxml.jackson.databind.JsonNode** | a JSON value with schedule time configuration | [optional] | | **enabled** | **Boolean** | Enable/disable scheduler | [optional] | | **version** | **Long** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | diff --git a/pe/docs/SchedulerEventWithCustomerInfo.md b/pe/docs/SchedulerEventWithCustomerInfo.md index 84b5295b..ba679df0 100644 --- a/pe/docs/SchedulerEventWithCustomerInfo.md +++ b/pe/docs/SchedulerEventWithCustomerInfo.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | +| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | | **schedule** | **com.fasterxml.jackson.databind.JsonNode** | a JSON value with schedule time configuration | [optional] | @@ -20,7 +20,7 @@ | **customerTitle** | **String** | Title of the customer | [optional] | | **customerIsPublic** | **Boolean** | Parameter that specifies if customer is public | [optional] [readonly] | | **timestamps** | **List\** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | diff --git a/pe/docs/SecretId.md b/pe/docs/SecretId.md index 47aa34fa..93863653 100644 --- a/pe/docs/SecretId.md +++ b/pe/docs/SecretId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.SecretId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/SelfRegistrationParams.md b/pe/docs/SelfRegistrationParams.md index a67a0180..feb55b87 100644 --- a/pe/docs/SelfRegistrationParams.md +++ b/pe/docs/SelfRegistrationParams.md @@ -15,12 +15,12 @@ | **enabled** | **Boolean** | | [optional] | | **homeDashboard** | **HomeDashboardParams** | | [optional] | | **notificationRecipient** | **NotificationTargetId** | | [optional] | -| **captcha** | **CaptchaParams** | | [optional] | | **signUpFields** | **List\** | | [optional] | | **defaultDashboard** | **DefaultDashboardParams** | | [optional] | | **customerTitlePrefix** | **String** | | [optional] | | **customMenuId** | **CustomMenuId** | | [optional] | | **customerGroupId** | **EntityGroupId** | | [optional] | +| **captcha** | **CaptchaParams** | | [optional] | diff --git a/pe/docs/ShortEntityView.md b/pe/docs/ShortEntityView.md index d4b7e211..6a69e94f 100644 --- a/pe/docs/ShortEntityView.md +++ b/pe/docs/ShortEntityView.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **EntityId** | Entity Id object | [readonly] | +| **id** | **EntityId** | Entity Id object | | | **name** | **String** | Name of the entity | [readonly] | diff --git a/pe/docs/Success.md b/pe/docs/Success.md index 9b3a48e7..238387cf 100644 --- a/pe/docs/Success.md +++ b/pe/docs/Success.md @@ -10,7 +10,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **generatedContent** | **String** | The text content generated by the model | [optional] | -| **status** | **String** | | [optional] | diff --git a/pe/docs/TbResource.md b/pe/docs/TbResource.md index 3b742711..bfa63893 100644 --- a/pe/docs/TbResource.md +++ b/pe/docs/TbResource.md @@ -25,8 +25,8 @@ A JSON value representing the Resource. | **preview** | **String** | | [optional] | | **name** | **String** | | [optional] [readonly] | | **_public** | **Boolean** | | [optional] | -| **link** | **String** | | [optional] [readonly] | | **publicLink** | **String** | | [optional] [readonly] | +| **link** | **String** | | [optional] [readonly] | diff --git a/pe/docs/TbResourceId.md b/pe/docs/TbResourceId.md index f0463682..8e007b5c 100644 --- a/pe/docs/TbResourceId.md +++ b/pe/docs/TbResourceId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.TbResourceId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/TbResourceInfo.md b/pe/docs/TbResourceInfo.md index 506b11ae..02741685 100644 --- a/pe/docs/TbResourceInfo.md +++ b/pe/docs/TbResourceInfo.md @@ -23,8 +23,8 @@ A JSON value representing the Resource Info. | **descriptor** | **com.fasterxml.jackson.databind.JsonNode** | Resource descriptor. | [optional] | | **name** | **String** | | [optional] [readonly] | | **_public** | **Boolean** | | [optional] | -| **link** | **String** | | [optional] [readonly] | | **publicLink** | **String** | | [optional] [readonly] | +| **link** | **String** | | [optional] [readonly] | diff --git a/pe/docs/TenantId.md b/pe/docs/TenantId.md index 40a30843..126fd3fb 100644 --- a/pe/docs/TenantId.md +++ b/pe/docs/TenantId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.TenantId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/TenantProfileId.md b/pe/docs/TenantProfileId.md index 828eb872..b60cca4e 100644 --- a/pe/docs/TenantProfileId.md +++ b/pe/docs/TenantProfileId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.TenantProfileId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/TimeSeriesOutput.md b/pe/docs/TimeSeriesOutput.md index 6407c70c..80699000 100644 --- a/pe/docs/TimeSeriesOutput.md +++ b/pe/docs/TimeSeriesOutput.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **strategy** | **TimeSeriesOutputStrategy** | | [optional] | diff --git a/pe/docs/TsKvEntry.md b/pe/docs/TsKvEntry.md index 65631283..bacf579d 100644 --- a/pe/docs/TsKvEntry.md +++ b/pe/docs/TsKvEntry.md @@ -10,13 +10,13 @@ | **ts** | **Long** | | [optional] | | **value** | **Object** | | [optional] | | **key** | **String** | | [optional] | +| **doubleValue** | **Double** | | [optional] | +| **longValue** | **Long** | | [optional] | | **booleanValue** | **Boolean** | | [optional] | -| **valueAsString** | **String** | | [optional] | | **dataType** | **DataType** | | [optional] | | **jsonValue** | **String** | | [optional] | | **strValue** | **String** | | [optional] | -| **longValue** | **Long** | | [optional] | -| **doubleValue** | **Double** | | [optional] | +| **valueAsString** | **String** | | [optional] | | **version** | **Long** | | [optional] | diff --git a/pe/docs/User.md b/pe/docs/User.md index bf29719b..749c3a6f 100644 --- a/pe/docs/User.md +++ b/pe/docs/User.md @@ -21,7 +21,7 @@ A JSON value representing the User. | **customMenuId** | **CustomMenuId** | | [optional] | | **version** | **Long** | | [optional] | | **name** | **String** | Duplicates the email of the user, readonly | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the user. May include: 'defaultDashboardId' (string, UUID of the default dashboard), 'defaultDashboardFullscreen' (boolean), 'homeDashboardId' (string, UUID of the home dashboard), 'homeDashboardHideToolbar' (boolean), 'lang' (string, user locale, e.g. 'en_US'), 'authProviderName' (string, name of the authentication provider). | [optional] | diff --git a/pe/docs/UserId.md b/pe/docs/UserId.md index 8cca6337..f46eeb29 100644 --- a/pe/docs/UserId.md +++ b/pe/docs/UserId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.UserId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/UserInfo.md b/pe/docs/UserInfo.md index 05343c56..85a5b5a3 100644 --- a/pe/docs/UserInfo.md +++ b/pe/docs/UserInfo.md @@ -21,7 +21,7 @@ | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | | **name** | **String** | Duplicates the email of the user, readonly | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the user. May include: 'defaultDashboardId' (string, UUID of the default dashboard), 'defaultDashboardFullscreen' (boolean), 'homeDashboardId' (string, UUID of the home dashboard), 'homeDashboardHideToolbar' (boolean), 'lang' (string, user locale, e.g. 'en_US'), 'authProviderName' (string, name of the authentication provider). | [optional] | diff --git a/pe/docs/WebSelfRegistrationParams.md b/pe/docs/WebSelfRegistrationParams.md index cd848086..df79e057 100644 --- a/pe/docs/WebSelfRegistrationParams.md +++ b/pe/docs/WebSelfRegistrationParams.md @@ -9,19 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **enabled** | **Boolean** | Indicates if self-registration is allowed via sign-up form | [optional] | -| **title** | **String** | The text message to appear on login form | | -| **captcha** | **CaptchaParams** | Captcha site key for 'I'm not a robot' validation | | -| **signUpFields** | **List\** | List of sign-up form fields | | -| **showPrivacyPolicy** | **Boolean** | Show or hide 'Privacy Policy' | [optional] | -| **showTermsOfUse** | **Boolean** | Show or hide 'Terms of Use' | [optional] | -| **notificationRecipient** | **NotificationTargetId** | Recipient to use for notifications when new user self-registered. | [optional] | -| **customerTitlePrefix** | **String** | Prefix to add to created customer | [optional] | -| **customerGroupId** | **EntityGroupId** | Id of the customer group customer wil be added to. | [optional] | -| **permissions** | **List\** | Group Permissions to assign for the new customer user. | | -| **defaultDashboard** | **DefaultDashboardParams** | Default dashboard params | [optional] | -| **homeDashboard** | **HomeDashboardParams** | Home dashboard params | [optional] | -| **customMenuId** | **CustomMenuId** | Custom menu id | [optional] | | **privacyPolicy** | **String** | Privacy policy text. Supports HTML. | [optional] | | **termsOfUse** | **String** | Terms of User text. Supports HTML. | [optional] | | **domainId** | **DomainId** | Domain name for self registration URL. Typically this matches the domain name from the Login White Labeling page. | | diff --git a/pe/docs/WebViewPage.md b/pe/docs/WebViewPage.md index 02e60f05..cf4e6bf8 100644 --- a/pe/docs/WebViewPage.md +++ b/pe/docs/WebViewPage.md @@ -10,7 +10,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **label** | **String** | Page label | [optional] | -| **visible** | **Boolean** | Indicates if page is visible | | | **icon** | **String** | URL of the page icon | [optional] | | **url** | **String** | Url | [optional] | diff --git a/pe/docs/WidgetTypeId.md b/pe/docs/WidgetTypeId.md index 0e778035..b69ab18f 100644 --- a/pe/docs/WidgetTypeId.md +++ b/pe/docs/WidgetTypeId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.WidgetTypeId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/docs/WidgetsBundleId.md b/pe/docs/WidgetsBundleId.md index b798823e..68f16a48 100644 --- a/pe/docs/WidgetsBundleId.md +++ b/pe/docs/WidgetsBundleId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.WidgetsBundleId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/pe/spec/openapi.json b/pe/spec/openapi.json index c84db2bb..ae8a55dc 100644 --- a/pe/spec/openapi.json +++ b/pe/spec/openapi.json @@ -97,6 +97,10 @@ "name": "dashboard-report-controller", "description": "Dashboard Report Controller" }, + { + "name": "device-api-controller", + "description": "Device Api Controller" + }, { "name": "device-connectivity-controller", "description": "Device Connectivity Controller" @@ -7732,7 +7736,7 @@ "api-key-controller" ], "summary": "Save API key for user (saveApiKey)", - "description": "Creates an API key for the given user and returns the token ONCE as 'ApiKey '.\n\nAvailable for any authorized user. ", + "description": "Creates an API key for the given user and returns the token ONCE as 'ApiKey \u003Cvalue\u003E'.\n\nAvailable for any authorized user. ", "operationId": "saveApiKey", "requestBody": { "content": { @@ -29512,19 +29516,175 @@ ] } }, - "/api/device-connectivity/gateway-launch/{deviceId}/docker-compose/download": { + "/api/v1/provision": { + "post": { + "tags": [ + "device-api-controller" + ], + "summary": "Provision new device (provisionDevice)", + "description": "Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: \n\n```json\n{\n \"deviceName\": \"NEW_DEVICE_NAME\",\n \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\",\n \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\"\n}\n```\n\nWhere 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials:\n\n```json\n{\n \"credentialsType\":\"ACCESS_TOKEN\",\n \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\",\n \"status\":\"SUCCESS\"\n}\n```\n\n", + "operationId": "provisionDevice", + "requestBody": { + "description": "JSON with provision request. See API call description for example.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid request body", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + } + } + }, + "/api/v1/{deviceToken}/attributes": { "get": { "tags": [ - "device-connectivity-controller" + "device-api-controller" ], - "summary": "Download generated docker-compose.yml file for gateway (downloadGatewayDockerCompose)", - "description": "Download generated docker-compose.yml for gateway.", - "operationId": "downloadGatewayDockerCompose", + "summary": "Get attributes (getDeviceAttributes)", + "description": "Returns all attributes that belong to device. Use optional 'clientKeys' and/or 'sharedKeys' parameter to return specific attributes. \n Example of the result: \n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "getDeviceAttributes", "parameters": [ { - "name": "deviceId", + "name": "deviceToken", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Your device access token.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "clientKeys", + "in": "query", + "description": "Comma separated key names for attribute with client scope", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sharedKeys", + "in": "query", + "description": "Comma separated key names for attribute with shared scope", "required": true, "schema": { "type": "string" @@ -29535,10 +29695,9 @@ "200": { "description": "OK", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "string" } } } @@ -29648,57 +29807,44 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/device-connectivity/{deviceId}": { - "get": { + } + }, + "post": { "tags": [ - "device-connectivity-controller" + "device-api-controller" ], - "summary": "Get commands to publish device telemetry (getDevicePublishTelemetryCommands)", - "description": "Fetch the list of commands to publish device telemetry based on device profile If the user has the authority of 'Tenant Administrator', the server checks that the device is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the device is assigned to the same customer. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDevicePublishTelemetryCommands", + "summary": "Post attributes (postDeviceAttributes)", + "description": "Post client attribute updates on behalf of device. \n Example of the request: \n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "postDeviceAttributes", "parameters": [ { - "name": "deviceId", + "name": "deviceToken", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Your device access token.", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "description": "JSON with attribute key-value pairs. See API call description for example.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" - }, - "examples": { - "http": { - "description": "http", - "value": "curl -v -X POST http://localhost:8080/api/v1/0ySs4FTOn5WU15XLmal8/telemetry --header Content-Type:application/json --data {temperature:25}" - }, - "mqtt": { - "description": "mqtt", - "value": "mosquitto_pub -d -q 1 -h localhost -t v1/devices/me/telemetry -i myClient1 -u myUsername1 -P myPassword -m {temperature:25}" - }, - "coap": { - "description": "coap", - "value": "coap-client -m POST coap://localhost:5683/api/v1/0ySs4FTOn5WU15XLmal8/telemetry -t json -e {temperature:25}" - } + "type": "string" } } } @@ -29715,7 +29861,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -29808,44 +29954,46 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/device-connectivity/{protocol}/certificate/download": { + "/api/v1/{deviceToken}/attributes/updates": { "get": { "tags": [ - "device-connectivity-controller" + "device-api-controller" ], - "summary": "Download server certificate using file path defined in device.connectivity properties (downloadServerCertificate)", - "description": "Download server certificate.", - "operationId": "downloadServerCertificate", + "summary": "Subscribe to attribute updates (subscribeToAttributes) (Deprecated)", + "description": "Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. \n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "subscribeToAttributes", "parameters": [ { - "name": "protocol", + "name": "deviceToken", "in": "path", - "description": "A string value representing the device connectivity protocol. Possible values: 'mqtt', 'mqtts', 'http', 'https', 'coap', 'coaps'", + "description": "Your device access token.", "required": true, "schema": { "type": "string" } + }, + { + "name": "timeout", + "in": "query", + "description": "Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side.", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } } ], "responses": { "200": { "description": "OK", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "string" } } } @@ -29955,49 +30103,33 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/customer/device/{deviceName}/claim": { + "/api/v1/{deviceToken}/claim": { "post": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Claim device (claimDevice)", - "description": "Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. \nIn order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. \nSee official documentation for more details regarding claiming.\n\nAvailable for users with 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", - "operationId": "claimDevice", + "summary": "Save claiming information (saveClaimingInfo)", + "description": "Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation.\n Example of the request payload: \n\n```json\n{\"secretKey\":\"value\", \"durationMs\":60000}\n```\n\nNote: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used.\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "saveClaimingInfo", "parameters": [ { - "name": "deviceName", + "name": "deviceToken", "in": "path", - "description": "Unique name of the device which is going to be claimed", + "description": "Your device access token.", "required": true, "schema": { "type": "string" } - }, - { - "name": "subCustomerId", - "in": "query", - "required": false, - "schema": { - "type": "string" - } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ClaimRequest" + "type": "string" } } } @@ -30118,32 +30250,66 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - }, - "delete": { + } + } + }, + "/api/v1/{deviceToken}/firmware": { + "get": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Reclaim device (reClaimDevice)", - "description": "Reclaiming means the device will be unassigned from the customer and the device will be available for claiming again.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", - "operationId": "reClaimDevice", + "summary": "Get Device Firmware (getFirmware)", + "description": "Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. \n\nOptional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. \n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "getFirmware", "parameters": [ { - "name": "deviceName", + "name": "deviceToken", "in": "path", - "description": "Unique name of the device which is going to be reclaimed", + "description": "Your device access token.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "title", + "in": "query", + "description": "Title of the firmware, corresponds to the value of 'fw_title' attribute.", "required": true, "schema": { "type": "string" } + }, + { + "name": "version", + "in": "query", + "description": "Version of the firmware, corresponds to the value of 'fw_version' attribute.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "size", + "in": "query", + "description": "Size of the chunk. Optional. Omit to download the entire file without chunks.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "name": "chunk", + "in": "query", + "description": "Index of the chunk. Optional. Omit to download the entire file without chunks.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } } ], "responses": { @@ -30262,118 +30428,36 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/customer/{customerId}/deviceInfos": { + "/api/v1/{deviceToken}/rpc": { "get": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Get Customer Device Infos (getCustomerDeviceInfos)", - "description": "Returns a page of device info objects owned by the specified customer. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerDeviceInfos", + "summary": "Subscribe to RPC commands (subscribeToCommands) (Deprecated)", + "description": "Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. \n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "subscribeToCommands", "parameters": [ { - "name": "customerId", + "name": "deviceToken", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Your device access token.", "required": true, "schema": { "type": "string" } }, { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "active", - "in": "query", - "description": "A boolean value representing the device active flag.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", + "name": "timeout", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side.", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "integer", + "format": "int64", + "default": 0 } } ], @@ -30383,7 +30467,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceInfo" + "type": "string" } } } @@ -30493,131 +30577,64 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/customer/{customerId}/devices": { - "get": { + } + }, + "post": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Get Customer Devices (getCustomerDevices)", - "description": "Returns a page of devices objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerDevices", + "summary": "Send the RPC command (postRpcRequest)", + "description": "Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example:\n\n```json\n{\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}}\n```\n\nThe response contains arbitrary JSON with the RPC reply. For example: \n\n```json\n{\"result\": 4}\n```\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "postRpcRequest", "parameters": [ { - "name": "customerId", + "name": "deviceToken", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "Your device access token.", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "Device type as the name of the device profile", - "required": false, "schema": { "type": "string" } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], + "requestBody": { + "description": "The RPC request JSON", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "OK", + "description": "RPC request to server was sent to Rule Engine.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "type": "string" } } } }, "400": { - "description": "Bad Request", + "description": "Invalid structure of the request.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } + "type": "string" + } + } + } + }, + "413": { + "description": "Request payload too large.", + "content": { + "application/json": { + "schema": { + "type": "string" } } } @@ -30706,92 +30723,43 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/device": { + "/api/v1/{deviceToken}/rpc/{requestId}": { "post": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Create Or Update Device (saveDevice)", - "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error.\n\nDevice name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveDevice", + "summary": "Reply to RPC commands (replyToCommand)", + "description": "Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON.\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "replyToCommand", "parameters": [ { - "name": "accessToken", - "in": "query", - "description": "Optional value of the device credentials to be used during device creation. If omitted, access token will be auto-generated.", - "required": false, + "name": "deviceToken", + "in": "path", + "description": "Your device access token.", + "required": true, "schema": { "type": "string" } }, { - "name": "entityGroupId", - "in": "query", - "required": false, + "name": "requestId", + "in": "path", + "description": "RPC request id from the incoming RPC request", + "required": true, "schema": { "type": "string" } - }, - { - "name": "entityGroupIds", - "in": "query", - "description": "A list of entity group ids, separated by comma ','", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "nameConflictPolicy", - "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", - "required": false, - "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" - } - }, - { - "name": "uniquifySeparator", - "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", - "required": false, - "schema": { - "type": "string", - "default": "_" - } - }, - { - "name": "uniquifyStrategy", - "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", - "required": false, - "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" - } } ], "requestBody": { - "description": "A JSON value representing the device.", + "description": "Reply to the RPC request, JSON. For example: {\"status\":\"success\"}", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "string" } } }, @@ -30799,32 +30767,31 @@ }, "responses": { "200": { - "description": "OK", + "description": "RPC reply to command request was sent to Core.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "string" } } } }, "400": { - "description": "Bad Request", + "description": "Invalid structure of the request.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid request body", - "errorCode": 31, - "timestamp": 1609459200000 - } - } + "type": "string" + } + } + } + }, + "413": { + "description": "Request payload is too large.", + "content": { + "application/json": { + "schema": { + "type": "string" } } } @@ -30913,94 +30880,75 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/device-with-credentials": { - "post": { + "/api/v1/{deviceToken}/software": { + "get": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Create Device (saveDevice) with credentials ", - "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \"Access token\" with device profile ID below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: \"Access token\" with device profile default below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: \"X509\" with device profile ID below: \n\nNote: credentialsId - format Sha3Hash, certificateValue - format PEM (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: \"MQTT_BASIC\" with device profile ID below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of LwM2M device and RPK credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveDeviceWithCredentials", + "summary": "Get Device Software (getSoftware)", + "description": "Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. \n\nOptional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. \n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "getSoftware", "parameters": [ { - "name": "entityGroupId", - "in": "query", - "required": false, + "name": "deviceToken", + "in": "path", + "description": "Your device access token.", + "required": true, "schema": { "type": "string" } }, { - "name": "entityGroupIds", + "name": "title", "in": "query", - "description": "A list of entity group ids, separated by comma ','", - "required": false, + "description": "Title of the software, corresponds to the value of 'sw_title' attribute.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } }, { - "name": "nameConflictPolicy", + "name": "version", "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", - "required": false, + "description": "Version of the software, corresponds to the value of 'sw_version' attribute.", + "required": true, "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" + "type": "string" } }, { - "name": "uniquifySeparator", + "name": "size", "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", + "description": "Size of the chunk. Optional. Omit to download the entire file without using chunks.", "required": false, "schema": { - "type": "string", - "default": "_" + "type": "integer", + "format": "int32", + "default": 0 } }, { - "name": "uniquifyStrategy", + "name": "chunk", "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "description": "Index of the chunk. Optional. Omit to download the entire file without using chunks.", "required": false, "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" + "type": "integer", + "format": "int32", + "default": 0 } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SaveDeviceWithCredentialsRequest" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "string" } } } @@ -31017,7 +30965,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -31110,30 +31058,33 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/device/bulk_import": { + "/api/v1/{deviceToken}/telemetry": { "post": { "tags": [ - "device-controller" + "device-api-controller" + ], + "summary": "Post time series data (postTelemetry)", + "description": "Post time series data on behalf of device. \n Example of the request: The request payload is a JSON document with three possible formats:\n\nSimple format without timestamp. In such a case, current server time will be used: \n\n\n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\n\n\n\n Single JSON object with timestamp: \n\n\n\n```json\n{\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}\n```\n\n\n\n JSON array with timestamps: \n\n\n\n```json\n[\n{\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, \n{\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}}\n]\n```\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "postTelemetry", + "parameters": [ + { + "name": "deviceToken", + "in": "path", + "description": "Your device access token.", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Import the bulk of devices (processDevicesBulkImport)", - "description": "There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "processDevicesBulkImport", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkImportRequest" + "type": "string" } } }, @@ -31145,7 +31096,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkImportResultDevice" + "type": "string" } } } @@ -31255,42 +31206,36 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/device/credentials": { - "post": { + "/api/device-connectivity/gateway-launch/{deviceId}/docker-compose/download": { + "get": { "tags": [ - "device-controller" + "device-connectivity-controller" ], - "summary": "Update device credentials (updateDeviceCredentials)", - "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials.\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \"Access token\" with device ID and with device ID below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: \"X509\" with device profile ID below: \n\nNote: credentialsId - format Sha3Hash, certificateValue - format PEM (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: \"MQTT_BASIC\" with device profile ID below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of LwM2M device and RPK credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "updateDeviceCredentials", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceCredentials" - } + "summary": "Download generated docker-compose.yml file for gateway (downloadGatewayDockerCompose)", + "description": "Download generated docker-compose.yml for gateway.", + "operationId": "downloadGatewayDockerCompose", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "$ref": "#/components/schemas/DeviceCredentials" + "type": "string", + "format": "binary" } } } @@ -31307,7 +31252,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -31411,14 +31356,14 @@ ] } }, - "/api/device/info/{deviceId}": { + "/api/device-connectivity/{deviceId}": { "get": { "tags": [ - "device-controller" + "device-connectivity-controller" ], - "summary": "Get Device (getDeviceInfoById)", - "description": "Fetch the Device info object based on the provided Device Id. Device Info is an extension of the default Device object that contains information about the owner name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getDeviceInfoById", + "summary": "Get commands to publish device telemetry (getDevicePublishTelemetryCommands)", + "description": "Fetch the list of commands to publish device telemetry based on device profile If the user has the authority of 'Tenant Administrator', the server checks that the device is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the device is assigned to the same customer. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDevicePublishTelemetryCommands", "parameters": [ { "name": "deviceId", @@ -31436,144 +31381,20 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceInfo" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" + "$ref": "#/components/schemas/JsonNode" }, "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/device/types": { - "get": { - "tags": [ - "device-controller" - ], - "summary": "Get Device Types (getDeviceTypes)", - "description": "Deprecated. See 'getDeviceProfileNames' API from Device Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceTypes", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitySubtype" + "http": { + "description": "http", + "value": "curl -v -X POST http://localhost:8080/api/v1/0ySs4FTOn5WU15XLmal8/telemetry --header Content-Type:application/json --data {temperature:25}" + }, + "mqtt": { + "description": "mqtt", + "value": "mosquitto_pub -d -q 1 -h localhost -t v1/devices/me/telemetry -i myClient1 -u myUsername1 -P myPassword -m {temperature:25}" + }, + "coap": { + "description": "coap", + "value": "coap-client -m POST coap://localhost:5683/api/v1/0ySs4FTOn5WU15XLmal8/telemetry -t json -e {temperature:25}" } } } @@ -31685,7 +31506,6 @@ } } }, - "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -31696,19 +31516,19 @@ ] } }, - "/api/device/{deviceId}": { + "/api/device-connectivity/{protocol}/certificate/download": { "get": { "tags": [ - "device-controller" + "device-connectivity-controller" ], - "summary": "Get Device (getDeviceById)", - "description": "Fetch the Device object based on the provided Device Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getDeviceById", + "summary": "Download server certificate using file path defined in device.connectivity properties (downloadServerCertificate)", + "description": "Download server certificate.", + "operationId": "downloadServerCertificate", "parameters": [ { - "name": "deviceId", + "name": "protocol", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the device connectivity protocol. Possible values: 'mqtt', 'mqtts', 'http', 'https', 'coap', 'coaps'", "required": true, "schema": { "type": "string" @@ -31719,9 +31539,10 @@ "200": { "description": "OK", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "string", + "format": "binary" } } } @@ -31840,28 +31661,54 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/customer/device/{deviceName}/claim": { + "post": { "tags": [ "device-controller" ], - "summary": "Delete device (deleteDevice)", - "description": "Deletes the device, it's credentials and all the relations (from and to the device). Referencing non-existing device Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteDevice", + "summary": "Claim device (claimDevice)", + "description": "Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. \nIn order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. \nSee official documentation for more details regarding claiming.\n\nAvailable for users with 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", + "operationId": "claimDevice", "parameters": [ { - "name": "deviceId", + "name": "deviceName", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Unique name of the device which is going to be claimed", "required": true, "schema": { "type": "string" } + }, + { + "name": "subCustomerId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClaimRequest" + } + } + } + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } }, "400": { "description": "Bad Request", @@ -31875,7 +31722,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -31977,21 +31824,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/device/{deviceId}/credentials": { - "get": { + }, + "delete": { "tags": [ "device-controller" ], - "summary": "Get Device Credentials (getDeviceCredentialsByDeviceId)", - "description": "If during device creation there wasn't specified any credentials, platform generates random 'ACCESS_TOKEN' credentials.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ_CREDENTIALS' permission for the entity (entities).", - "operationId": "getDeviceCredentialsByDeviceId", + "summary": "Reclaim device (reClaimDevice)", + "description": "Reclaiming means the device will be unassigned from the customer and the device will be available for claiming again.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", + "operationId": "reClaimDevice", "parameters": [ { - "name": "deviceId", + "name": "deviceName", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Unique name of the device which is going to be reclaimed", "required": true, "schema": { "type": "string" @@ -32004,7 +31849,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceCredentials" + "type": "string" } } } @@ -32125,15 +31970,24 @@ ] } }, - "/api/deviceInfos/all": { + "/api/customer/{customerId}/deviceInfos": { "get": { "tags": [ "device-controller" ], - "summary": "Get All Device Infos for current user (getAllDeviceInfos)", - "description": "Returns a page of device info objects owned by the tenant or the customer of a current user. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllDeviceInfos", + "summary": "Get Customer Device Infos (getCustomerDeviceInfos)", + "description": "Returns a page of device info objects owned by the specified customer. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerDeviceInfos", "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "pageSize", "in": "query", @@ -32347,25 +32201,89 @@ ] } }, - "/api/devices": { + "/api/customer/{customerId}/devices": { "get": { "tags": [ "device-controller" ], - "summary": "Get Devices By Ids (getDevicesByIds)", - "description": "Requested devices must be owned by tenant or assigned to customer which user is performing the request. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getDevicesByIds", + "summary": "Get Customer Devices (getCustomerDevices)", + "description": "Returns a page of devices objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerDevices", "parameters": [ { - "name": "deviceIds", + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", "in": "query", - "description": "A list of devices ids, separated by comma ','", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "Device type as the name of the device profile", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -32375,10 +32293,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -32497,19 +32412,83 @@ "ApiKeyForm": [] } ] - }, + } + }, + "/api/device": { "post": { "tags": [ "device-controller" ], - "summary": "Find related devices (findDevicesByQuery)", - "description": "Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "findDevicesByQuery", + "summary": "Create Or Update Device (saveDevice)", + "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error.\n\nDevice name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveDevice", + "parameters": [ + { + "name": "accessToken", + "in": "query", + "description": "Optional value of the device credentials to be used during device creation. If omitted, access token will be auto-generated.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "entityGroupId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "entityGroupIds", + "in": "query", + "description": "A list of entity group ids, separated by comma ','", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "nameConflictPolicy", + "in": "query", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", + "required": false, + "schema": { + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" + } + }, + { + "name": "uniquifySeparator", + "in": "query", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", + "required": false, + "schema": { + "type": "string", + "default": "_" + } + }, + { + "name": "uniquifyStrategy", + "in": "query", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "required": false, + "schema": { + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" + } + } + ], "requestBody": { + "description": "A JSON value representing the device.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceSearchQuery" + "$ref": "#/components/schemas/Device" } } }, @@ -32521,10 +32500,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } + "$ref": "#/components/schemas/Device" } } } @@ -32645,46 +32621,83 @@ ] } }, - "/api/devices/count/{otaPackageType}/{deviceProfileId}": { - "get": { + "/api/device-with-credentials": { + "post": { "tags": [ "device-controller" ], - "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", - "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "countByDeviceProfileAndEmptyOtaPackage", + "summary": "Create Device (saveDevice) with credentials ", + "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile default\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"X509\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\nNote: \u003Cb\u003EcredentialsId\u003C/b\u003E - format \u003Cb\u003ESha3Hash\u003C/b\u003E, \u003Cb\u003EcertificateValue\u003C/b\u003E - format \u003Cb\u003EPEM\u003C/b\u003E (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"MQTT_BASIC\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of \u003Cb\u003ELwM2M\u003C/b\u003E device and \u003Cb\u003ERPK\u003C/b\u003E credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveDeviceWithCredentials", "parameters": [ { - "name": "otaPackageType", - "in": "path", - "description": "OTA package type", - "required": true, + "name": "entityGroupId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "entityGroupIds", + "in": "query", + "description": "A list of entity group ids, separated by comma ','", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "nameConflictPolicy", + "in": "query", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", + "required": false, + "schema": { + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" + } + }, + { + "name": "uniquifySeparator", + "in": "query", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", + "required": false, "schema": { "type": "string", - "enum": [ - "FIRMWARE", - "SOFTWARE" - ] + "default": "_" } }, { - "name": "deviceProfileId", - "in": "path", - "description": "Device Profile Id. I.g. '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "uniquifyStrategy", + "in": "query", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SaveDeviceWithCredentialsRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/Device" } } } @@ -32701,7 +32714,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -32805,53 +32818,31 @@ ] } }, - "/api/devices/count/{otaPackageType}/{otaPackageId}/{entityGroupId}": { - "get": { + "/api/device/bulk_import": { + "post": { "tags": [ "device-controller" ], - "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", - "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "countByDeviceGroupAndEmptyOtaPackage", - "parameters": [ - { - "name": "otaPackageType", - "in": "path", - "description": "OTA package type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "FIRMWARE", - "SOFTWARE" - ] - } - }, - { - "name": "otaPackageId", - "in": "path", - "required": true, - "schema": { - "type": "string" + "summary": "Import the bulk of devices (processDevicesBulkImport)", + "description": "There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "processDevicesBulkImport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkImportRequest" + } } }, - { - "name": "entityGroupId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/BulkImportResultDevice" } } } @@ -32868,7 +32859,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -32972,90 +32963,31 @@ ] } }, - "/api/entityGroup/{entityGroupId}/devices": { - "get": { + "/api/device/credentials": { + "post": { "tags": [ "device-controller" ], - "summary": "Get devices by Entity Group Id (getDevicesByEntityGroupId)", - "description": "Returns a page of Device objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getDevicesByEntityGroupId", - "parameters": [ - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] + "summary": "Update device credentials (updateDeviceCredentials)", + "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials.\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice ID\u003C/b\u003E and with \u003Cb\u003Edevice ID\u003C/b\u003E below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: \u003Cb\u003E\"X509\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\nNote: \u003Cb\u003EcredentialsId\u003C/b\u003E - format \u003Cb\u003ESha3Hash\u003C/b\u003E, \u003Cb\u003EcertificateValue\u003C/b\u003E - format \u003Cb\u003EPEM\u003C/b\u003E (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: \u003Cb\u003E\"MQTT_BASIC\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of \u003Cb\u003ELwM2M\u003C/b\u003E device and \u003Cb\u003ERPK\u003C/b\u003E credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -\u003E \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "updateDeviceCredentials", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceCredentials" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "$ref": "#/components/schemas/DeviceCredentials" } } } @@ -33072,7 +33004,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -33176,19 +33108,19 @@ ] } }, - "/api/tenant/device": { + "/api/device/info/{deviceId}": { "get": { "tags": [ "device-controller" ], - "summary": "Get Tenant Device (getTenantDevice)", - "description": "Requested device must be owned by tenant that the user belongs to. Device name is an unique property of device. So it can be used to identify the device.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getTenantDeviceByName", + "summary": "Get Device (getDeviceInfoById)", + "description": "Fetch the Device info object based on the provided Device Id. Device Info is an extension of the default Device object that contains information about the owner name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getDeviceInfoById", "parameters": [ { - "name": "deviceName", - "in": "query", - "description": "A string value representing the Device name.", + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -33201,7 +33133,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "$ref": "#/components/schemas/DeviceInfo" } } } @@ -33322,90 +33254,24 @@ ] } }, - "/api/tenant/devices": { + "/api/device/types": { "get": { "tags": [ "device-controller" ], - "summary": "Get Tenant Devices (getTenantDevices)", - "description": "Returns a page of devices owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getTenantDevices", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "Device type as the name of the device profile", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "summary": "Get Device Types (getDeviceTypes)", + "description": "Deprecated. See 'getDeviceProfileNames' API from Device Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -33516,6 +33382,7 @@ } } }, + "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -33526,24 +33393,15 @@ ] } }, - "/api/tenant/{tenantId}/device/{deviceId}": { - "post": { + "/api/device/{deviceId}": { + "get": { "tags": [ "device-controller" ], - "summary": "Assign device to tenant (assignDeviceToTenant)", - "description": "Creates assignment of the device to tenant. Thereafter tenant will be able to reassign the device to a customer.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'ASSIGN_TO_TENANT' permission for the entity (entities).", - "operationId": "assignDeviceToTenant", + "summary": "Get Device (getDeviceById)", + "description": "Fetch the Device object based on the provided Device Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getDeviceById", "parameters": [ - { - "name": "tenantId", - "in": "path", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "deviceId", "in": "path", @@ -33577,7 +33435,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -33679,95 +33537,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/user/devices": { - "get": { + }, + "delete": { "tags": [ "device-controller" ], - "summary": "Get Devices (getUserDevices)", - "description": "Returns a page of devices that are available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUserDevices", + "summary": "Delete device (deleteDevice)", + "description": "Deletes the device, it's credentials and all the relations (from and to the device). Referencing non-existing device Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteDevice", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "type", - "in": "query", - "description": "Device type as the name of the device profile", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataDevice" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -33885,30 +33676,32 @@ ] } }, - "/api/deviceGroupOtaPackage": { - "post": { + "/api/device/{deviceId}/credentials": { + "get": { "tags": [ - "device-group-ota-package-controller" + "device-controller" ], - "summary": "saveDeviceGroupOtaPackage", - "operationId": "saveDeviceGroupOtaPackage", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceGroupOtaPackage" - } + "summary": "Get Device Credentials (getDeviceCredentialsByDeviceId)", + "description": "If during device creation there wasn't specified any credentials, platform generates random 'ACCESS_TOKEN' credentials.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ_CREDENTIALS' permission for the entity (entities).", + "operationId": "getDeviceCredentialsByDeviceId", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceGroupOtaPackage" + "$ref": "#/components/schemas/DeviceCredentials" } } } @@ -33925,7 +33718,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -34029,29 +33822,99 @@ ] } }, - "/api/deviceGroupOtaPackage/{groupId}/{firmwareType}": { + "/api/deviceInfos/all": { "get": { "tags": [ - "device-group-ota-package-controller" + "device-controller" ], - "summary": "getFirmwareById", - "operationId": "getFirmwareById", + "summary": "Get All Device Infos for current user (getAllDeviceInfos)", + "description": "Returns a page of device info objects owned by the tenant or the customer of a current user. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllDeviceInfos", "parameters": [ { - "name": "groupId", - "in": "path", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "firmwareType", - "in": "path", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "active", + "in": "query", + "description": "A boolean value representing the device active flag.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -34060,7 +33923,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceGroupOtaPackage" + "$ref": "#/components/schemas/PageDataDeviceInfo" } } } @@ -34181,26 +34044,41 @@ ] } }, - "/api/deviceGroupOtaPackage/{id}": { - "delete": { + "/api/devices": { + "get": { "tags": [ - "device-group-ota-package-controller" + "device-controller" ], - "summary": "deleteDeviceGroupOtaPackage", - "operationId": "deleteDeviceGroupOtaPackage", + "summary": "Get Devices By Ids (getDevicesByIds)", + "description": "Requested devices must be owned by tenant or assigned to customer which user is performing the request. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getDevicesByIds", "parameters": [ { - "name": "id", - "in": "path", + "name": "deviceIds", + "in": "query", + "description": "A list of devices ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } + } + } + } }, "400": { "description": "Bad Request", @@ -34316,172 +34194,24 @@ "ApiKeyForm": [] } ] - } - }, - "/api/deviceProfile": { + }, "post": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Create Or Update Device Profile (saveDeviceProfile)", - "description": "Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. \n\nDevice profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant.\n\n# Device profile data definition\n\nDevice profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. \n\n```json\n{\n \"alarms\":[\n ],\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"DISABLED\",\n \"provisionDeviceSecret\":null\n },\n \"transportConfiguration\":{\n \"type\":\"DEFAULT\"\n }\n}\n```\n\n```json\n{\n \"alarms\":[\n {\n \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\",\n \"alarmType\":\"Temperature Alarm\",\n \"clearRule\":{\n \"schedule\":null,\n \"condition\":{\n \"spec\":{\n \"type\":\"SIMPLE\"\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":30.0,\n \"dynamicValue\":null\n },\n \"operation\":\"LESS\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"propagate\":false,\n \"createRules\":{\n \"MAJOR\":{\n \"schedule\":{\n \"type\":\"SPECIFIC_TIME\",\n \"endsOn\":64800000,\n \"startsOn\":43200000,\n \"timezone\":\"Europe/Kiev\",\n \"daysOfWeek\":[\n 1,\n 3,\n 5\n ]\n },\n \"condition\":{\n \"spec\":{\n \"type\":\"DURATION\",\n \"unit\":\"MINUTES\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":30,\n \"dynamicValue\":null\n }\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"COMPLEX\",\n \"operation\":\"OR\",\n \"predicates\":[\n {\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":50.0,\n \"dynamicValue\":null\n },\n \"operation\":\"LESS_OR_EQUAL\"\n },\n {\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":30.0,\n \"dynamicValue\":null\n },\n \"operation\":\"GREATER\"\n }\n ]\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"WARNING\":{\n \"schedule\":{\n \"type\":\"CUSTOM\",\n \"items\":[\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":1\n },\n {\n \"endsOn\":64800000,\n \"enabled\":true,\n \"startsOn\":43200000,\n \"dayOfWeek\":2\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":3\n },\n {\n \"endsOn\":57600000,\n \"enabled\":true,\n \"startsOn\":36000000,\n \"dayOfWeek\":4\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":5\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":6\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":7\n }\n ],\n \"timezone\":\"Europe/Kiev\"\n },\n \"condition\":{\n \"spec\":{\n \"type\":\"REPEATING\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":5,\n \"dynamicValue\":null\n }\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"tempConstant\",\n \"type\":\"CONSTANT\"\n },\n \"value\":30,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":0.0,\n \"dynamicValue\":{\n \"inherit\":false,\n \"sourceType\":\"CURRENT_DEVICE\",\n \"sourceAttribute\":\"tempThreshold\"\n }\n },\n \"operation\":\"EQUAL\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"CRITICAL\":{\n \"schedule\":null,\n \"condition\":{\n \"spec\":{\n \"type\":\"SIMPLE\"\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":50.0,\n \"dynamicValue\":null\n },\n \"operation\":\"GREATER\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n }\n },\n \"propagateRelationTypes\":null\n }\n ],\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"ALLOW_CREATE_NEW_DEVICES\",\n \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\"\n },\n \"transportConfiguration\":{\n \"type\":\"MQTT\",\n \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\",\n \"deviceAttributesTopic\":\"v1/devices/me/attributes\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"PROTOBUF\",\n \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\",\n \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\",\n \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\",\n \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\"\n }\n }\n}\n```\n\nLet's review some specific objects examples related to the device profile configuration:\n\n# Alarm Schedule\n\nAlarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, \n\n```json\n\"schedule\": null\n```\n\nmeans alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week:\n\n## Specific Time Schedule\n\n```json\n{\n \"schedule\":{\n \"type\":\"SPECIFIC_TIME\",\n \"endsOn\":64800000,\n \"startsOn\":43200000,\n \"timezone\":\"Europe/Kiev\",\n \"daysOfWeek\":[\n 1,\n 3,\n 5\n ]\n }\n}\n```\n\n## Custom Schedule\n\n```json\n{\n \"schedule\":{\n \"type\":\"CUSTOM\",\n \"items\":[\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":1\n },\n {\n \"endsOn\":64800000,\n \"enabled\":true,\n \"startsOn\":43200000,\n \"dayOfWeek\":2\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":3\n },\n {\n \"endsOn\":57600000,\n \"enabled\":true,\n \"startsOn\":36000000,\n \"dayOfWeek\":4\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":5\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":6\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":7\n }\n ],\n \"timezone\":\"Europe/Kiev\"\n }\n}\n```\n\n# Alarm condition type (**'spec'**)\n\nAlarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes.\n\nNote, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent).\n\n**'sourceType'** of the **'sourceAttribute'** can be: \n * 'CURRENT_DEVICE';\n * 'CURRENT_CUSTOMER';\n * 'CURRENT_TENANT'.\n\n**'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER).\n\n## Repeating alarm condition\n\n```json\n{\n \"spec\":{\n \"type\":\"REPEATING\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":5,\n \"dynamicValue\":{\n \"inherit\":true,\n \"sourceType\":\"CURRENT_DEVICE\",\n \"sourceAttribute\":\"tempAttr\"\n }\n }\n }\n}\n```\n\n## Duration alarm condition\n\n```json\n{\n \"spec\":{\n \"type\":\"DURATION\",\n \"unit\":\"MINUTES\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":30,\n \"dynamicValue\":null\n }\n }\n}\n```\n\n**'unit'** can be: \n * 'SECONDS';\n * 'MINUTES';\n * 'HOURS';\n * 'DAYS'.\n\n# Key Filters\n\nKey filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object:\n\n## Alarm Filter Key\n\nFilter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported:\n * 'ATTRIBUTE' - used for attributes values;\n * 'TIME_SERIES' - used for time series values;\n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type;\n * 'CONSTANT' - constant value specified.\n\nLet's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value < 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value < 10 or value > 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\nYou may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below:\n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"inherit\": false,\n \"sourceType\": \"CURRENT_TENANT\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nNote that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true.\n\n# Provision Configuration\n\nThere are 3 types of device provision configuration for the device profile: \n * 'DISABLED';\n * 'ALLOW_CREATE_NEW_DEVICES';\n * 'CHECK_PRE_PROVISIONED_DEVICES'.\n\nPlease refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details.\n\n# Transport Configuration\n\n5 transport configuration types are available:\n * 'DEFAULT';\n * 'MQTT';\n * 'LWM2M';\n * 'COAP';\n * 'SNMP'.\n\nDefault type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types.\n\nSee another example of COAP transport configuration below:\n\n```json\n{\n \"type\":\"COAP\",\n \"clientSettings\":{\n \"edrxCycle\":null,\n \"powerMode\":\"DRX\",\n \"psmActivityTimer\":null,\n \"pagingTransmissionWindow\":null\n },\n \"coapDeviceTypeConfiguration\":{\n \"coapDeviceType\":\"DEFAULT\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"JSON\"\n }\n }\n}\n```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveDeviceProfile", + "summary": "Find related devices (findDevicesByQuery)", + "description": "Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "findDevicesByQuery", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfile" + "$ref": "#/components/schemas/DeviceSearchQuery" } } }, "required": true }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceProfile" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid request body", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/deviceProfile/devices/keys/attributes": { - "get": { - "tags": [ - "device-profile-controller" - ], - "summary": "Get attribute keys (getAttributesKeys)", - "description": "Get a set of unique attribute keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAttributesKeys", - "parameters": [ - { - "name": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "description": "OK", @@ -34490,7 +34220,7 @@ "schema": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/Device" } } } @@ -34508,7 +34238,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -34612,20 +34342,33 @@ ] } }, - "/api/deviceProfile/devices/keys/timeseries": { + "/api/devices/count/{otaPackageType}/{deviceProfileId}": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get time series keys (getDeviceProfileTimeseriesKeys)", - "description": "Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getDeviceProfileTimeseriesKeys", + "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", + "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "countByDeviceProfileAndEmptyOtaPackage", "parameters": [ + { + "name": "otaPackageType", + "in": "path", + "description": "OTA package type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] + } + }, { "name": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, + "in": "path", + "description": "Device Profile Id. I.g. '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } @@ -34637,10 +34380,8 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "integer", + "format": "int64" } } } @@ -34761,23 +34502,42 @@ ] } }, - "/api/deviceProfile/names": { + "/api/devices/count/{otaPackageType}/{otaPackageId}/{entityGroupId}": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get Device Profile names (getDeviceProfileNames)", - "description": "Returns a set of unique device profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceProfileNames", + "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", + "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "countByDeviceGroupAndEmptyOtaPackage", "parameters": [ { - "name": "activeOnly", - "in": "query", - "description": "Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices.", - "required": false, + "name": "otaPackageType", + "in": "path", + "description": "OTA package type", + "required": true, "schema": { - "type": "boolean", - "default": false + "type": "string", + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] + } + }, + { + "name": "otaPackageId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityGroupId", + "in": "path", + "required": true, + "schema": { + "type": "string" } } ], @@ -34787,10 +34547,8 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityInfo" - } + "type": "integer", + "format": "int64" } } } @@ -34911,31 +34669,80 @@ ] } }, - "/api/deviceProfile/{deviceProfileId}": { + "/api/entityGroup/{entityGroupId}/devices": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get Device Profile (getDeviceProfileById)", - "description": "Fetch the Device Profile object based on the provided Device Profile Id. The server checks that the device profile is owned by the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getDeviceProfileById", + "summary": "Get devices by Entity Group Id (getDevicesByEntityGroupId)", + "description": "Returns a page of Device objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getDevicesByEntityGroupId", "parameters": [ { - "name": "deviceProfileId", + "name": "entityGroupId", "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "inlineImages", + "name": "pageSize", "in": "query", - "description": "Inline images as a data URL (Base64)", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", "required": false, "schema": { - "type": "boolean" + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -34945,7 +34752,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfile" + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -35064,19 +34871,21 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/tenant/device": { + "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Delete device profile (deleteDeviceProfile)", - "description": "Deletes the device profile. Referencing non-existing device profile Id will cause an error. Can't delete the device profile if it is referenced by existing devices.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteDeviceProfile", + "summary": "Get Tenant Device (getTenantDevice)", + "description": "Requested device must be owned by tenant that the user belongs to. Device name is an unique property of device. So it can be used to identify the device.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getTenantDeviceByName", "parameters": [ { - "name": "deviceProfileId", - "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "deviceName", + "in": "query", + "description": "A string value representing the Device name.", "required": true, "schema": { "type": "string" @@ -35085,7 +34894,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + } }, "400": { "description": "Bad Request", @@ -35203,23 +35019,81 @@ ] } }, - "/api/deviceProfile/{deviceProfileId}/default": { - "post": { + "/api/tenant/devices": { + "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Make Device Profile Default (setDefaultDeviceProfile)", - "description": "Marks device profile as default within a tenant scope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setDefaultDeviceProfile", + "summary": "Get Tenant Devices (getTenantDevices)", + "description": "Returns a page of devices owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getTenantDevices", "parameters": [ { - "name": "deviceProfileId", - "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "Device type as the name of the device profile", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -35228,7 +35102,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfile" + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -35245,7 +35119,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -35349,21 +35223,41 @@ ] } }, - "/api/deviceProfileInfo/default": { - "get": { + "/api/tenant/{tenantId}/device/{deviceId}": { + "post": { "tags": [ - "device-profile-controller" + "device-controller" + ], + "summary": "Assign device to tenant (assignDeviceToTenant)", + "description": "Creates assignment of the device to tenant. Thereafter tenant will be able to reassign the device to a customer.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'ASSIGN_TO_TENANT' permission for the entity (entities).", + "operationId": "assignDeviceToTenant", + "parameters": [ + { + "name": "tenantId", + "in": "path", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Get Default Device Profile (getDefaultDeviceProfileInfo)", - "description": "Fetch the Default Device Profile Info object. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDefaultDeviceProfileInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfileInfo" + "$ref": "#/components/schemas/Device" } } } @@ -35380,7 +35274,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -35484,23 +35378,81 @@ ] } }, - "/api/deviceProfileInfo/{deviceProfileId}": { + "/api/user/devices": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get Device Profile Info (getDeviceProfileInfoById)", - "description": "Fetch the Device Profile Info object based on the provided Device Profile Id. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceProfileInfoById", + "summary": "Get Devices (getUserDevices)", + "description": "Returns a page of devices that are available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserDevices", "parameters": [ { - "name": "deviceProfileId", - "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "type", + "in": "query", + "description": "Device type as the name of the device profile", + "required": false, "schema": { "type": "string" } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -35509,7 +35461,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfileInfo" + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -35630,98 +35582,30 @@ ] } }, - "/api/deviceProfileInfos": { - "get": { + "/api/deviceGroupOtaPackage": { + "post": { "tags": [ - "device-profile-controller" + "device-group-ota-package-controller" ], - "summary": "Get Device Profiles for transport type (getDeviceProfileInfos)", - "description": "Returns a page of devices profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceProfileInfos", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device profile name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "transportType", - "description", - "isDefault" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "summary": "saveDeviceGroupOtaPackage", + "operationId": "saveDeviceGroupOtaPackage", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceGroupOtaPackage" + } } }, - { - "name": "transportType", - "in": "query", - "description": "Type of the transport", - "required": false, - "schema": { - "type": "string", - "enum": [ - "DEFAULT", - "MQTT", - "COAP", - "LWM2M", - "SNMP" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceProfileInfo" + "$ref": "#/components/schemas/DeviceGroupOtaPackage" } } } @@ -35738,7 +35622,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -35842,25 +35726,28 @@ ] } }, - "/api/deviceProfileInfos/list": { + "/api/deviceGroupOtaPackage/{groupId}/{firmwareType}": { "get": { "tags": [ - "device-profile-controller" + "device-group-ota-package-controller" ], - "summary": "Get Device Profile Infos By Ids (getDeviceProfileInfosByIds)", - "description": "Requested device profiles must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getDeviceProfileInfosByIds", + "summary": "getFirmwareById", + "operationId": "getFirmwareById", "parameters": [ { - "name": "deviceProfileIds", - "in": "query", - "description": "A list of device profile ids, separated by comma ','", + "name": "groupId", + "in": "path", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" + } + }, + { + "name": "firmwareType", + "in": "path", + "required": true, + "schema": { + "type": "string" } } ], @@ -35870,10 +35757,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceProfileInfo" - } + "$ref": "#/components/schemas/DeviceGroupOtaPackage" } } } @@ -35994,85 +35878,26 @@ ] } }, - "/api/deviceProfiles": { - "get": { + "/api/deviceGroupOtaPackage/{id}": { + "delete": { "tags": [ - "device-profile-controller" + "device-group-ota-package-controller" ], - "summary": "Get Device Profiles (getDeviceProfiles)", - "description": "Returns a page of devices profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getDeviceProfiles", + "summary": "deleteDeviceGroupOtaPackage", + "operationId": "deleteDeviceGroupOtaPackage", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "id", + "in": "path", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device profile name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "transportType", - "description", - "isDefault" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataDeviceProfile" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -36190,33 +36015,19 @@ ] } }, - "/api/domain": { + "/api/deviceProfile": { "post": { "tags": [ - "domain-controller" - ], - "summary": "Save or Update Domain (saveDomain)", - "description": "Create or update the Domain. When creating domain, platform generates Domain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Domain Id will be present in the response. Specify existing Domain Id to update the domain. Referencing non-existing Domain Id will cause 'Not Found' error.\n\nDomain name is unique for entire platform setup.\n\n\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveDomain", - "parameters": [ - { - "name": "oauth2ClientIds", - "in": "query", - "description": "A list of oauth2 client registration ids, separated by comma ','", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } + "device-profile-controller" ], + "summary": "Create Or Update Device Profile (saveDeviceProfile)", + "description": "Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. \n\nDevice profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant.\n\n# Device profile data definition\n\nDevice profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. \n\n```json\n{\n \"alarms\":[\n ],\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"DISABLED\",\n \"provisionDeviceSecret\":null\n },\n \"transportConfiguration\":{\n \"type\":\"DEFAULT\"\n }\n}\n```\n\n```json\n{\n \"alarms\":[\n {\n \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\",\n \"alarmType\":\"Temperature Alarm\",\n \"clearRule\":{\n \"schedule\":null,\n \"condition\":{\n \"spec\":{\n \"type\":\"SIMPLE\"\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":30.0,\n \"dynamicValue\":null\n },\n \"operation\":\"LESS\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"propagate\":false,\n \"createRules\":{\n \"MAJOR\":{\n \"schedule\":{\n \"type\":\"SPECIFIC_TIME\",\n \"endsOn\":64800000,\n \"startsOn\":43200000,\n \"timezone\":\"Europe/Kiev\",\n \"daysOfWeek\":[\n 1,\n 3,\n 5\n ]\n },\n \"condition\":{\n \"spec\":{\n \"type\":\"DURATION\",\n \"unit\":\"MINUTES\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":30,\n \"dynamicValue\":null\n }\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"COMPLEX\",\n \"operation\":\"OR\",\n \"predicates\":[\n {\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":50.0,\n \"dynamicValue\":null\n },\n \"operation\":\"LESS_OR_EQUAL\"\n },\n {\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":30.0,\n \"dynamicValue\":null\n },\n \"operation\":\"GREATER\"\n }\n ]\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"WARNING\":{\n \"schedule\":{\n \"type\":\"CUSTOM\",\n \"items\":[\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":1\n },\n {\n \"endsOn\":64800000,\n \"enabled\":true,\n \"startsOn\":43200000,\n \"dayOfWeek\":2\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":3\n },\n {\n \"endsOn\":57600000,\n \"enabled\":true,\n \"startsOn\":36000000,\n \"dayOfWeek\":4\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":5\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":6\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":7\n }\n ],\n \"timezone\":\"Europe/Kiev\"\n },\n \"condition\":{\n \"spec\":{\n \"type\":\"REPEATING\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":5,\n \"dynamicValue\":null\n }\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"tempConstant\",\n \"type\":\"CONSTANT\"\n },\n \"value\":30,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":0.0,\n \"dynamicValue\":{\n \"inherit\":false,\n \"sourceType\":\"CURRENT_DEVICE\",\n \"sourceAttribute\":\"tempThreshold\"\n }\n },\n \"operation\":\"EQUAL\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"CRITICAL\":{\n \"schedule\":null,\n \"condition\":{\n \"spec\":{\n \"type\":\"SIMPLE\"\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":50.0,\n \"dynamicValue\":null\n },\n \"operation\":\"GREATER\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n }\n },\n \"propagateRelationTypes\":null\n }\n ],\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"ALLOW_CREATE_NEW_DEVICES\",\n \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\"\n },\n \"transportConfiguration\":{\n \"type\":\"MQTT\",\n \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\",\n \"deviceAttributesTopic\":\"v1/devices/me/attributes\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"PROTOBUF\",\n \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\",\n \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\",\n \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\",\n \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\"\n }\n }\n}\n```\n\nLet's review some specific objects examples related to the device profile configuration:\n\n# Alarm Schedule\n\nAlarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, \n\n```json\n\"schedule\": null\n```\n\nmeans alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week:\n\n## Specific Time Schedule\n\n```json\n{\n \"schedule\":{\n \"type\":\"SPECIFIC_TIME\",\n \"endsOn\":64800000,\n \"startsOn\":43200000,\n \"timezone\":\"Europe/Kiev\",\n \"daysOfWeek\":[\n 1,\n 3,\n 5\n ]\n }\n}\n```\n\n## Custom Schedule\n\n```json\n{\n \"schedule\":{\n \"type\":\"CUSTOM\",\n \"items\":[\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":1\n },\n {\n \"endsOn\":64800000,\n \"enabled\":true,\n \"startsOn\":43200000,\n \"dayOfWeek\":2\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":3\n },\n {\n \"endsOn\":57600000,\n \"enabled\":true,\n \"startsOn\":36000000,\n \"dayOfWeek\":4\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":5\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":6\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":7\n }\n ],\n \"timezone\":\"Europe/Kiev\"\n }\n}\n```\n\n# Alarm condition type (**'spec'**)\n\nAlarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes.\n\nNote, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent).\n\n**'sourceType'** of the **'sourceAttribute'** can be: \n * 'CURRENT_DEVICE';\n * 'CURRENT_CUSTOMER';\n * 'CURRENT_TENANT'.\n\n**'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER).\n\n## Repeating alarm condition\n\n```json\n{\n \"spec\":{\n \"type\":\"REPEATING\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":5,\n \"dynamicValue\":{\n \"inherit\":true,\n \"sourceType\":\"CURRENT_DEVICE\",\n \"sourceAttribute\":\"tempAttr\"\n }\n }\n }\n}\n```\n\n## Duration alarm condition\n\n```json\n{\n \"spec\":{\n \"type\":\"DURATION\",\n \"unit\":\"MINUTES\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":30,\n \"dynamicValue\":null\n }\n }\n}\n```\n\n**'unit'** can be: \n * 'SECONDS';\n * 'MINUTES';\n * 'HOURS';\n * 'DAYS'.\n\n# Key Filters\n\nKey filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object:\n\n## Alarm Filter Key\n\nFilter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported:\n * 'ATTRIBUTE' - used for attributes values;\n * 'TIME_SERIES' - used for time series values;\n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type;\n * 'CONSTANT' - constant value specified.\n\nLet's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value \u003C 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value \u003C 10 or value \u003E 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value \u003C 10 or (value \u003E 50 && value \u003C 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\nYou may also want to replace hardcoded values (for example, temperature \u003E 20) with the more dynamic expression (for example, temperature \u003E value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below:\n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"inherit\": false,\n \"sourceType\": \"CURRENT_TENANT\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nNote that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true.\n\n# Provision Configuration\n\nThere are 3 types of device provision configuration for the device profile: \n * 'DISABLED';\n * 'ALLOW_CREATE_NEW_DEVICES';\n * 'CHECK_PRE_PROVISIONED_DEVICES'.\n\nPlease refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details.\n\n# Transport Configuration\n\n5 transport configuration types are available:\n * 'DEFAULT';\n * 'MQTT';\n * 'LWM2M';\n * 'COAP';\n * 'SNMP'.\n\nDefault type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types.\n\nSee another example of COAP transport configuration below:\n\n```json\n{\n \"type\":\"COAP\",\n \"clientSettings\":{\n \"edrxCycle\":null,\n \"powerMode\":\"DRX\",\n \"psmActivityTimer\":null,\n \"pagingTransmissionWindow\":null\n },\n \"coapDeviceTypeConfiguration\":{\n \"coapDeviceType\":\"DEFAULT\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"JSON\"\n }\n }\n}\n```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveDeviceProfile", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Domain" + "$ref": "#/components/schemas/DeviceProfile" } } }, @@ -36228,7 +36039,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Domain" + "$ref": "#/components/schemas/DeviceProfile" } } } @@ -36349,22 +36160,22 @@ ] } }, - "/api/domain/info/{id}": { + "/api/deviceProfile/devices/keys/attributes": { "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Get Domain info by Id (getDomainInfoById)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDomainInfoById", + "summary": "Get attribute keys (getAttributesKeys)", + "description": "Get a set of unique attribute keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAttributesKeys", "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "deviceProfileId", + "in": "query", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], @@ -36374,7 +36185,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DomainInfo" + "type": "array", + "items": { + "type": "string" + } } } } @@ -36495,60 +36309,172 @@ ] } }, - "/api/domain/infos": { + "/api/deviceProfile/devices/keys/timeseries": { "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Get Domain infos (getDomainInfos)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDomainInfos", + "summary": "Get time series keys (getDeviceProfileTimeseriesKeys)", + "description": "Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getDeviceProfileTimeseriesKeys", "parameters": [ { - "name": "pageSize", + "name": "deviceProfileId", "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, "schema": { - "type": "integer", - "format": "int32" + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } } }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on domain's name", - "required": false, - "schema": { - "type": "string" + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } } }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ { - "name": "sortOrder", + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/deviceProfile/names": { + "get": { + "tags": [ + "device-profile-controller" + ], + "summary": "Get Device Profile names (getDeviceProfileNames)", + "description": "Returns a set of unique device profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileNames", + "parameters": [ + { + "name": "activeOnly", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices.", "required": false, "schema": { - "type": "string" + "type": "boolean", + "default": false } } ], @@ -36558,7 +36484,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDomainInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityInfo" + } } } } @@ -36679,28 +36608,44 @@ ] } }, - "/api/domain/{id}": { - "delete": { + "/api/deviceProfile/{deviceProfileId}": { + "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Delete Domain by ID (deleteDomain)", - "description": "Deletes Domain by ID. Referencing non-existing domain Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "deleteDomain", + "summary": "Get Device Profile (getDeviceProfileById)", + "description": "Fetch the Device Profile object based on the provided Device Profile Id. The server checks that the device profile is owned by the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getDeviceProfileById", "parameters": [ { - "name": "id", + "name": "deviceProfileId", "in": "path", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" + } + }, + { + "name": "inlineImages", + "in": "query", + "description": "Inline images as a data URL (Base64)", + "required": false, + "schema": { + "type": "boolean" } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceProfile" + } + } + } }, "400": { "description": "Bad Request", @@ -36816,41 +36761,25 @@ "ApiKeyForm": [] } ] - } - }, - "/api/domain/{id}/oauth2Clients": { - "put": { + }, + "delete": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Update oauth2 clients (updateOauth2Clients)", - "description": "Update oauth2 clients for the specified domain. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "updateOauth2Clients", + "summary": "Delete device profile (deleteDeviceProfile)", + "description": "Deletes the device profile. Referencing non-existing device profile Id will cause an error. Can't delete the device profile if it is referenced by existing devices.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteDeviceProfile", "parameters": [ { - "name": "id", + "name": "deviceProfileId", "in": "path", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK" @@ -36971,99 +36900,23 @@ ] } }, - "/api/customer/{customerId}/edgeInfos": { - "get": { + "/api/deviceProfile/{deviceProfileId}/default": { + "post": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Get Customer Edge Infos (getCustomerEdgeInfos)", - "description": "Returns a page of edge info objects owned by the specified customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerEdgeInfos", + "summary": "Make Device Profile Default (setDefaultDeviceProfile)", + "description": "Marks device profile as default within a tenant scope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setDefaultDeviceProfile", "parameters": [ { - "name": "customerId", + "name": "deviceProfileId", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -37072,7 +36925,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdgeInfo" + "$ref": "#/components/schemas/DeviceProfile" } } } @@ -37089,7 +36942,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -37193,99 +37046,21 @@ ] } }, - "/api/customer/{customerId}/edges": { + "/api/deviceProfileInfo/default": { "get": { "tags": [ - "edge-controller" - ], - "summary": "Get Customer Edges (getCustomerEdges)", - "description": "Returns a page of edges objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerEdges", - "parameters": [ - { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } + "device-profile-controller" ], + "summary": "Get Default Device Profile (getDefaultDeviceProfileInfo)", + "description": "Fetch the Default Device Profile Info object. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDefaultDeviceProfileInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "$ref": "#/components/schemas/DeviceProfileInfo" } } } @@ -37406,53 +37181,32 @@ ] } }, - "/api/edge": { - "post": { + "/api/deviceProfileInfo/{deviceProfileId}": { + "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Create Or Update Edge (saveEdge)", - "description": "Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error.\n\nEdge name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the edge names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Edge entity. ", - "operationId": "saveEdge", + "summary": "Get Device Profile Info (getDeviceProfileInfoById)", + "description": "Fetch the Device Profile Info object based on the provided Device Profile Id. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileInfoById", "parameters": [ { - "name": "entityGroupId", - "in": "query", - "required": false, + "name": "deviceProfileId", + "in": "path", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } - }, - { - "name": "entityGroupIds", - "in": "query", - "description": "A list of entity group ids, separated by comma ','", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Edge" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/DeviceProfileInfo" } } } @@ -37469,7 +37223,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -37573,31 +37327,98 @@ ] } }, - "/api/edge/bulk_import": { - "post": { + "/api/deviceProfileInfos": { + "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Import the bulk of edges (processEdgesBulkImport)", - "description": "There's an ability to import the bulk of edges using the only .csv file.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "processEdgesBulkImport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkImportRequest" - } + "summary": "Get Device Profiles for transport type (getDeviceProfileInfos)", + "description": "Returns a page of devices profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileInfos", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device profile name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "transportType", + "description", + "isDefault" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "transportType", + "in": "query", + "description": "Type of the transport", + "required": false, + "schema": { + "type": "string", + "enum": [ + "DEFAULT", + "MQTT", + "COAP", + "LWM2M", + "SNMP" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkImportResultEdge" + "$ref": "#/components/schemas/PageDataDeviceProfileInfo" } } } @@ -37614,7 +37435,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -37718,22 +37539,25 @@ ] } }, - "/api/edge/info/{edgeId}": { + "/api/deviceProfileInfos/list": { "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Get Edge Info (getEdgeInfoById)", - "description": "Get the Edge info object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeInfoById", + "summary": "Get Device Profile Infos By Ids (getDeviceProfileInfosByIds)", + "description": "Requested device profiles must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getDeviceProfileInfosByIds", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "deviceProfileIds", + "in": "query", + "description": "A list of device profile ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -37743,7 +37567,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdgeInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceProfileInfo" + } } } } @@ -37864,35 +37691,71 @@ ] } }, - "/api/edge/instructions/install/{edgeId}/{method}": { + "/api/deviceProfiles": { "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Get Edge Install Instructions (getEdgeInstallInstructions)", - "description": "Get an install instructions for provided edge id.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeInstallInstructions", + "summary": "Get Device Profiles (getDeviceProfiles)", + "description": "Returns a page of devices profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getDeviceProfiles", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "method", - "in": "path", - "description": "Installation method ('docker', 'ubuntu' or 'centos')", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device profile name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, "schema": { "type": "string", "enum": [ - "docker", - "ubuntu", - "centos" + "createdTime", + "name", + "type", + "transportType", + "description", + "isDefault" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" ] } } @@ -37903,7 +37766,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdgeInstructions" + "$ref": "#/components/schemas/PageDataDeviceProfile" } } } @@ -38024,46 +37887,45 @@ ] } }, - "/api/edge/instructions/upgrade/{edgeVersion}/{method}": { - "get": { + "/api/domain": { + "post": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Get Edge Upgrade Instructions (getEdgeUpgradeInstructions)", - "description": "Get an upgrade instructions for provided edge version.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeUpgradeInstructions", + "summary": "Save or Update Domain (saveDomain)", + "description": "Create or update the Domain. When creating domain, platform generates Domain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Domain Id will be present in the response. Specify existing Domain Id to update the domain. Referencing non-existing Domain Id will cause 'Not Found' error.\n\nDomain name is unique for entire platform setup.\n\n\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveDomain", "parameters": [ { - "name": "edgeVersion", - "in": "path", - "description": "Edge version", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "method", - "in": "path", - "description": "Upgrade method ('docker', 'ubuntu' or 'centos')", - "required": true, + "name": "oauth2ClientIds", + "in": "query", + "description": "A list of oauth2 client registration ids, separated by comma ','", + "required": false, "schema": { - "type": "string", - "enum": [ - "docker", - "ubuntu", - "centos" - ] + "type": "array", + "items": { + "type": "string" + } } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Domain" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdgeInstructions" + "$ref": "#/components/schemas/Domain" } } } @@ -38080,7 +37942,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -38184,22 +38046,22 @@ ] } }, - "/api/edge/missingToRelatedRuleChains/{edgeId}": { + "/api/domain/info/{id}": { "get": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Find missing rule chains (findMissingToRelatedRuleChains)", - "description": "Returns list of rule chains ids that are not assigned to particular edge, but these rule chains are present in the already assigned rule chains to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "findMissingToRelatedRuleChains", + "summary": "Get Domain info by Id (getDomainInfoById)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDomainInfoById", "parameters": [ { - "name": "edgeId", + "name": "id", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], @@ -38209,7 +38071,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/DomainInfo" } } } @@ -38330,20 +38192,58 @@ ] } }, - "/api/edge/sync/{edgeId}": { - "post": { + "/api/domain/infos": { + "get": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Sync edge (syncEdge)", - "description": "Starts synchronization process between edge and cloud. \nAll entities that are assigned to particular edge are going to be send to remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "syncEdge", + "summary": "Get Domain infos (getDomainInfos)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDomainInfos", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on domain's name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, "schema": { "type": "string" } @@ -38355,7 +38255,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/PageDataDomainInfo" } } } @@ -38372,7 +38272,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -38476,27 +38376,28 @@ ] } }, - "/api/edge/types": { - "get": { + "/api/domain/{id}": { + "delete": { "tags": [ - "edge-controller" + "domain-controller" + ], + "summary": "Delete Domain by ID (deleteDomain)", + "description": "Deletes Domain by ID. Referencing non-existing domain Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteDomain", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - "summary": "Get Edge Types (getEdgeTypes)", - "description": "Returns a set of unique edge types based on edges that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeTypes", "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitySubtype" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -38614,36 +38515,43 @@ ] } }, - "/api/edge/{edgeId}": { - "get": { + "/api/domain/{id}/oauth2Clients": { + "put": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Get Edge (getEdgeById)", - "description": "Get the Edge object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeById", + "summary": "Update oauth2 clients (updateOauth2Clients)", + "description": "Update oauth2 clients for the specified domain. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "updateOauth2Clients", "parameters": [ { - "name": "edgeId", + "name": "id", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Edge" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" } } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -38758,28 +38666,113 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/customer/{customerId}/edgeInfos": { + "get": { "tags": [ "edge-controller" ], - "summary": "Delete edge (deleteEdge)", - "description": "Deletes the edge. Referencing non-existing edge Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteEdge", + "summary": "Get Customer Edge Infos (getCustomerEdgeInfos)", + "description": "Returns a page of edge info objects owned by the specified customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerEdgeInfos", "parameters": [ { - "name": "edgeId", + "name": "customerId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, "schema": { "type": "string" } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEdgeInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -38897,23 +38890,90 @@ ] } }, - "/api/edge/{edgeId}/upgrade/available": { + "/api/customer/{customerId}/edges": { "get": { "tags": [ "edge-controller" ], - "summary": "Is edge upgrade enabled (isEdgeUpgradeAvailable)", - "description": "Returns 'true' if upgrade available for connected edge, 'false' - otherwise.", - "operationId": "isEdgeUpgradeAvailable", + "summary": "Get Customer Edges (getCustomerEdges)", + "description": "Returns a page of edges objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerEdges", "parameters": [ { - "name": "edgeId", + "name": "customerId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, "schema": { "type": "string" } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -38922,7 +38982,7 @@ "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -39043,34 +39103,46 @@ ] } }, - "/api/edge/{edgeId}/{ruleChainId}/root": { + "/api/edge": { "post": { "tags": [ "edge-controller" ], - "summary": "Set root rule chain for provided edge (setEdgeRootRuleChain)", - "description": "Change root rule chain of the edge to the new provided rule chain. \nThis operation will send a notification to update root rule chain on remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setEdgeRootRuleChain", + "summary": "Create Or Update Edge (saveEdge)", + "description": "Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error.\n\nEdge name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the edge names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Edge entity. ", + "operationId": "saveEdge", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "entityGroupId", + "in": "query", + "required": false, "schema": { "type": "string" } }, { - "name": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "entityGroupIds", + "in": "query", + "description": "A list of entity group ids, separated by comma ','", + "required": false, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Edge" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -39198,99 +39270,31 @@ ] } }, - "/api/edgeInfos/all": { - "get": { + "/api/edge/bulk_import": { + "post": { "tags": [ "edge-controller" ], - "summary": "Get All Edge Infos for current user (getAllEdgeInfos)", - "description": "Returns a page of edge info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllEdgeInfos", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] + "summary": "Import the bulk of edges (processEdgesBulkImport)", + "description": "There's an ability to import the bulk of edges using the only .csv file.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "processEdgesBulkImport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkImportRequest" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdgeInfo" + "$ref": "#/components/schemas/BulkImportResultEdge" } } } @@ -39307,7 +39311,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -39411,72 +39415,23 @@ ] } }, - "/api/edges": { + "/api/edge/info/{edgeId}": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edges (getEdges)", - "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEdges", + "summary": "Get Edge Info (getEdgeInfoById)", + "description": "Get the Edge info object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeInfoById", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -39485,7 +39440,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "$ref": "#/components/schemas/EdgeInfo" } } } @@ -39604,34 +39559,48 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/edge/instructions/install/{edgeId}/{method}": { + "get": { "tags": [ "edge-controller" ], - "summary": "Find related edges (findEdgesByQuery)", - "description": "Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findEdgesByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EdgeSearchQuery" - } + "summary": "Get Edge Install Instructions (getEdgeInstallInstructions)", + "description": "Get an install instructions for provided edge id.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeInstallInstructions", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "method", + "in": "path", + "description": "Installation method ('docker', 'ubuntu' or 'centos')", + "required": true, + "schema": { + "type": "string", + "enum": [ + "docker", + "ubuntu", + "centos" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Edge" - } + "$ref": "#/components/schemas/EdgeInstructions" } } } @@ -39648,7 +39617,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -39752,21 +39721,46 @@ ] } }, - "/api/edges/enabled": { + "/api/edge/instructions/upgrade/{edgeVersion}/{method}": { "get": { "tags": [ "edge-controller" ], - "summary": "Is edges support enabled (isEdgesSupportEnabled)", - "description": "Returns 'true' if edges support enabled on server, 'false' - otherwise.", - "operationId": "isEdgesSupportEnabled", + "summary": "Get Edge Upgrade Instructions (getEdgeUpgradeInstructions)", + "description": "Get an upgrade instructions for provided edge version.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeUpgradeInstructions", + "parameters": [ + { + "name": "edgeVersion", + "in": "path", + "description": "Edge version", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "method", + "in": "path", + "description": "Upgrade method ('docker', 'ubuntu' or 'centos')", + "required": true, + "schema": { + "type": "string", + "enum": [ + "docker", + "ubuntu", + "centos" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/EdgeInstructions" } } } @@ -39887,25 +39881,22 @@ ] } }, - "/api/edges/list": { + "/api/edge/missingToRelatedRuleChains/{edgeId}": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Edges By Ids (getEdgeList)", - "description": "Requested edges must be owned by tenant or assigned to customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeList", + "summary": "Find missing rule chains (findMissingToRelatedRuleChains)", + "description": "Returns list of rule chains ids that are not assigned to particular edge, but these rule chains are present in the already assigned rule chains to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "findMissingToRelatedRuleChains", "parameters": [ { - "name": "edgeIds", - "in": "query", - "description": "A list of edges ids, separated by comma ','", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -39915,10 +39906,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Edge" - } + "type": "string" } } } @@ -40039,81 +40027,23 @@ ] } }, - "/api/entityGroup/{entityGroupId}/edges": { - "get": { + "/api/edge/sync/{edgeId}": { + "post": { "tags": [ "edge-controller" ], - "summary": "Get edges by Entity Group Id (getEdgesByEntityGroupId)", - "description": "Returns a page of Edge objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEdgesByEntityGroupId", + "summary": "Sync edge (syncEdge)", + "description": "Starts synchronization process between edge and cloud. \nAll entities that are assigned to particular edge are going to be send to remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "syncEdge", "parameters": [ { - "name": "entityGroupId", + "name": "edgeId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -40122,7 +40052,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "type": "string" } } } @@ -40139,7 +40069,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -40243,39 +40173,24 @@ ] } }, - "/api/license/activateInstance": { - "post": { + "/api/edge/types": { + "get": { "tags": [ "edge-controller" ], - "summary": "Activate edge instance (activateInstance)", - "description": "Activates edge license on license portal.", - "operationId": "activateInstance", - "parameters": [ - { - "name": "licenseSecret", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "releaseDate", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Get Edge Types (getEdgeTypes)", + "description": "Returns a set of unique edge types based on edges that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -40292,7 +40207,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -40396,31 +40311,32 @@ ] } }, - "/api/license/checkInstance": { - "post": { + "/api/edge/{edgeId}": { + "get": { "tags": [ "edge-controller" ], - "summary": "Check edge license (checkInstance)", - "description": "Checks license request from edge service by forwarding request to license portal.", - "operationId": "checkInstance", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } + "summary": "Get Edge (getEdgeById)", + "description": "Get the Edge object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeById", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/Edge" } } } @@ -40437,7 +40353,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -40539,21 +40455,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/tenant/edge": { - "get": { + }, + "delete": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edge by name (getTenantEdgeByName)", - "description": "Requested edge must be owned by tenant or customer that the user belongs to. Edge name is an unique property of edge. So it can be used to identify the edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEdgeByName", + "summary": "Delete edge (deleteEdge)", + "description": "Deletes the edge. Referencing non-existing edge Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteEdge", "parameters": [ { - "name": "edgeName", - "in": "query", - "description": "Unique name of the edge", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -40562,14 +40476,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Edge" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -40687,81 +40594,23 @@ ] } }, - "/api/tenant/edges": { + "/api/edge/{edgeId}/upgrade/available": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edges (getTenantEdges)", - "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEdges", + "summary": "Is edge upgrade enabled (isEdgeUpgradeAvailable)", + "description": "Returns 'true' if upgrade available for connected edge, 'false' - otherwise.", + "operationId": "isEdgeUpgradeAvailable", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, "schema": { "type": "string" } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -40770,7 +40619,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "type": "boolean" } } } @@ -40891,81 +40740,32 @@ ] } }, - "/api/user/edges": { - "get": { + "/api/edge/{edgeId}/{ruleChainId}/root": { + "post": { "tags": [ "edge-controller" ], - "summary": "Get Edges (getUserEdges)", - "description": "Returns a page of edges available for current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUserEdges", + "summary": "Set root rule chain for provided edge (setEdgeRootRuleChain)", + "description": "Change root rule chain of the edge to the new provided rule chain. \nThis operation will send a notification to update root rule chain on remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setEdgeRootRuleChain", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, "schema": { "type": "string" } }, { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -40974,7 +40774,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "$ref": "#/components/schemas/Edge" } } } @@ -40991,7 +40791,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -41095,24 +40895,15 @@ ] } }, - "/api/edge/{edgeId}/events": { + "/api/edgeInfos/all": { "get": { "tags": [ - "edge-event-controller" + "edge-controller" ], - "summary": "Get Edge Events (getEdgeEvents)", - "description": "Returns a page of edge events for the requested edge. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. ", - "operationId": "getEdgeEvents", + "summary": "Get All Edge Infos for current user (getAllEdgeInfos)", + "description": "Returns a page of edge info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllEdgeInfos", "parameters": [ - { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pageSize", "in": "query", @@ -41133,10 +40924,28 @@ "format": "int32" } }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the edge event type name.", + "description": "The case insensitive 'substring' filter based on the edge name.", "required": false, "schema": { "type": "string" @@ -41170,26 +40979,6 @@ "DESC" ] } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Edge events with creation time before it won't be queried", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Edge events with creation time after it won't be queried", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } } ], "responses": { @@ -41198,7 +40987,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdgeEvent" + "$ref": "#/components/schemas/PageDataEdgeInfo" } } } @@ -41319,24 +41108,81 @@ ] } }, - "/api/entities/vc/branches": { + "/api/edges": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" + ], + "summary": "Get Tenant Edges (getEdges)", + "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEdges", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } ], - "summary": "List branches (listBranches)", - "description": "Lists branches available in the remote repository. \n\nResponse example: \n```json\n[\n {\n \"name\": \"master\",\n \"default\": true\n },\n {\n \"name\": \"dev\",\n \"default\": false\n },\n {\n \"name\": \"dev-2\",\n \"default\": false\n }\n]\n```", - "operationId": "listBranches", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BranchInfo" - } + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -41455,53 +41301,34 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entities/vc/diff/{entityType}/{internalEntityUuid}": { - "get": { + }, + "post": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Compare entity data to version (compareEntityDataToVersion)", - "description": "Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "compareEntityDataToVersion", - "parameters": [ - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "internalEntityUuid", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Find related edges (findEdgesByQuery)", + "description": "Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findEdgesByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EdgeSearchQuery" + } } }, - { - "name": "versionId", - "in": "query", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityDataDiff" + "type": "array", + "items": { + "$ref": "#/components/schemas/Edge" + } } } } @@ -41518,7 +41345,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -41622,32 +41449,21 @@ ] } }, - "/api/entities/vc/entity": { - "post": { + "/api/edges/enabled": { + "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Load entities version (loadEntitiesVersion)", - "description": "Loads specific version of remote entities (or single entity) by request. Supported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are multiple types of request. Each of them requires branch name (`branch`) and version id (`versionId`). Request of type `SINGLE_ENTITY` is needed to restore a concrete version of a specific entity. It contains id of a remote entity (`externalEntityId`), internal entity id (`internalEntityId`) and additional configuration (`config`):\n- `loadRelations` - to update relations list (in case `saveRelations` option was enabled during version creation);\n- `loadAttributes` - to load entity attributes (if `saveAttributes` config option was enabled);\n- `loadCredentials` - to update device credentials (if `saveCredentials` option was enabled during version creation);\n- `loadPermissions` - when loading user group, to update group permission list;\n- `loadGroupEntities` - when loading an entity group, to load its entities as well;\n- `autoGenerateIntegrationKey` - if loading integration version, to autogenerate routing key.\n\nAn example of such request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n \n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n \n \"externalEntityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b7944123-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"loadRelations\": false,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n}\n```\n\nAnother request type (`ENTITY_TYPE`) is needed to load specific version of the whole entity types. It contains a structure with entity types to load and configs for each entity type (`entityTypes`). For each specified entity type, the method will load all remote entities of this type that are present at the version. A config for each entity type contains the same options as in `SINGLE_ENTITY` request type, and additionally contains following options:\n- `removeOtherEntities` - to remove local entities that are not present on the remote - basically to overwrite local entity type with the remote one;\n- `findExistingEntityByName` - when you are loading some remote entities that are not yet present at this tenant, try to find existing entity by name and update it rather than create new.\n\nHere is an example of the request to completely restore version of the whole device entity type:\n```json\n{\n \"type\": \"ENTITY_TYPE\",\n\n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n\n \"entityTypes\": {\n \"DEVICE\": {\n \"removeOtherEntities\": true,\n \"findExistingEntityByName\": false,\n \"loadRelations\": true,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n }\n}\n```\n\nThe response will contain generated request UUID that is to be used to check the status of operation via `getVersionLoadRequestStatus`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "loadEntitiesVersion", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionLoadRequest" - } - } - }, - "required": true - }, + "summary": "Is edges support enabled (isEdgesSupportEnabled)", + "description": "Returns 'true' if edges support enabled on server, 'false' - otherwise.", + "operationId": "isEdgesSupportEnabled", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string", - "format": "uuid" + "type": "boolean" } } } @@ -41664,7 +41480,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -41768,31 +41584,25 @@ ] } }, - "/api/entities/vc/entity/{entityType}/{versionId}": { + "/api/edges/list": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "List entities at version (listEntitiesAtVersion)", - "description": "Returns a list of remote entities of a specific entity type that are available at a concrete version. \nEach entity item in the result has `externalId` property. Entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listEntitiesAtVersion", + "summary": "Get Edges By Ids (getEdgeList)", + "description": "Requested edges must be owned by tenant or assigned to customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeList", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "versionId", - "in": "path", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "name": "edgeIds", + "in": "query", + "description": "A list of edges ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -41804,7 +41614,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/VersionedEntityInfo" + "$ref": "#/components/schemas/Edge" } } } @@ -41926,23 +41736,80 @@ ] } }, - "/api/entities/vc/entity/{requestId}/status": { + "/api/entityGroup/{entityGroupId}/edges": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Get version load request status (getVersionLoadRequestStatus)", - "description": "Returns the status of previously made version load request. The structure contains following parameters:\n- `done` - if the request was successfully processed;\n- `result` - a list of load results for each entity type:\n - `created` - created entities count;\n - `updated` - updated entities count;\n - `deleted` - removed entities count;\n - `groupsCreated` - created entity groups count;\n - `groupsUpdated` - updated entity groups count;\n - `groupsDeleted` - removed entity groups count.\n- `error` - if an error occurred during processing, error info:\n - `type` - error type;\n - `source` - an external id of remote entity;\n - `target` - if failed to find referenced entity by external id - this external id;\n - `message` - error message.\n\nAn example of successfully processed request status:\n```json\n{\n \"done\": true,\n \"result\": [\n {\n \"entityType\": \"DEVICE\",\n \"created\": 10,\n \"updated\": 5,\n \"deleted\": 5,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 1,\n \"groupsDeleted\": 1\n },\n {\n \"entityType\": \"ASSET\",\n \"created\": 4,\n \"updated\": 0,\n \"deleted\": 8,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 0,\n \"groupsDeleted\": 2\n }\n ]\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getVersionLoadRequestStatus", + "summary": "Get edges by Entity Group Id (getEdgesByEntityGroupId)", + "description": "Returns a page of Edge objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEdgesByEntityGroupId", "parameters": [ { - "name": "requestId", + "name": "entityGroupId", "in": "path", - "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { "type": "string", - "format": "uuid" + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -41952,7 +41819,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VersionLoadResult" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -42073,19 +41940,26 @@ ] } }, - "/api/entities/vc/entity/{versionId}": { - "get": { + "/api/license/activateInstance": { + "post": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "List all entities at version (listAllEntitiesAtVersion)", - "description": "Returns a list of all remote entities available in a specific version. Response type is the same as for listAllEntitiesAtVersion API method. \nReturned entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listAllEntitiesAtVersion", + "summary": "Activate edge instance (activateInstance)", + "description": "Activates edge license on license portal.", + "operationId": "activateInstance", "parameters": [ { - "name": "versionId", - "in": "path", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "name": "licenseSecret", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "releaseDate", + "in": "query", "required": true, "schema": { "type": "string" @@ -42098,10 +41972,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VersionedEntityInfo" - } + "$ref": "#/components/schemas/JsonNode" } } } @@ -42118,7 +41989,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -42222,61 +42093,31 @@ ] } }, - "/api/entities/vc/info/{versionId}/{entityType}/{externalEntityUuid}": { - "get": { + "/api/license/checkInstance": { + "post": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Get entity data info (getEntityDataInfo)", - "description": "Retrieves short info about the remote entity by external id at a concrete version. \nReturned entity data info contains following properties: `hasRelations` (whether stored entity data contains relations), `hasAttributes` (contains attributes), `hasCredentials` (whether stored device data has credentials), `hasPermissions` (user group data contains group permission list) and `hasGroupEntities` (entity group data contains group entities).\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEntityDataInfo", - "parameters": [ - { - "name": "versionId", - "in": "path", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "externalEntityUuid", - "in": "path", - "description": "A string value representing external entity id", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Check edge license (checkInstance)", + "description": "Checks license request from edge service by forwarding request to license portal.", + "operationId": "checkInstance", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } } }, - { - "name": "internalEntityId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityDataInfo" + "$ref": "#/components/schemas/JsonNode" } } } @@ -42293,7 +42134,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -42397,77 +42238,23 @@ ] } }, - "/api/entities/vc/version": { + "/api/tenant/edge": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "List all versions (listVersions)", - "description": "Lists all available versions in a branch for all entity types. \nIf specified branch does not exist - empty page data will be returned. The response format is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listVersions", + "summary": "Get Tenant Edge by name (getTenantEdgeByName)", + "description": "Requested edge must be owned by tenant or customer that the user belongs to. Edge name is an unique property of edge. So it can be used to identify the edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEdgeByName", "parameters": [ { - "name": "branch", - "in": "query", - "description": "The name of the working branch, for example 'master'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "edgeName", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "Unique name of the edge", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity version name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "timestamp" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -42476,7 +42263,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityVersion" + "$ref": "#/components/schemas/Edge" } } } @@ -42595,32 +42382,92 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/tenant/edges": { + "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Save entities version (saveEntitiesVersion)", - "description": "Creates a new version of entities (or a single entity) by request.\nSupported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are two available types of request: `SINGLE_ENTITY` and `COMPLEX`. Each of them contains version name (`versionName`) and name of a branch (`branch`) to create version (commit) in. If specified branch does not exists in a remote repo, then new empty branch will be created. Request of the `SINGLE_ENTITY` type has id of an entity (`entityId`) and additional configuration (`config`) which has following options: \n- `saveRelations` - whether to add inbound and outbound relations of type COMMON to created entity version;\n- `saveAttributes` - to save attributes of server scope (and also shared scope for devices);\n- `saveCredentials` - when saving a version of a device, to add its credentials to the version;\n- `savePermissions` - when saving a user group - to save group permission list;\n- `saveGroupEntities` - when saving an entity group - to save its entities as well.\n\nAn example of a `SINGLE_ENTITY` version create request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n\n \"versionName\": \"Version 1.0\",\n \"branch\": \"dev\",\n\n \"entityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": false\n }\n}\n```\n\nSecond request type (`COMPLEX`), additionally to `branch` and `versionName`, contains following properties:\n- `entityTypes` - a structure with entity types to export and configuration for each entity type; this configuration has all the options available for `SINGLE_ENTITY` and additionally has these ones: \n - `allEntities` and `entityIds` - if you want to save the version of all entities of the entity type then set `allEntities` param to true, otherwise set it to false and specify `entityIds` - in case entity type is group entity, list of specific entity groups, or if not - list of entities;\n - `syncStrategy` - synchronization strategy to use for this entity type: when set to `OVERWRITE` then the list of remote entities of this type will be overwritten by newly added entities. If set to `MERGE` - existing remote entities of this entity type will not be removed, new entities will just be added on top (or existing remote entities will be updated).\n- `syncStrategy` - default synchronization strategy to use when it is not specified for an entity type.\n\nExample for this type of request:\n```json\n{\n \"type\": \"COMPLEX\",\n\n \"versionName\": \"Devices and profiles: release 2\",\n \"branch\": \"master\",\n\n \"syncStrategy\": \"OVERWRITE\",\n \"entityTypes\": {\n \"DEVICE\": {\n \"syncStrategy\": null,\n \"allEntities\": true,\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": true\n },\n \"DEVICE_PROFILE\": {\n \"syncStrategy\": \"MERGE\",\n \"allEntities\": false,\n \"entityIds\": [\n \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n ],\n \"saveRelations\": true\n }\n }\n}\n```\n\nResponse wil contain generated request UUID, that can be then used to retrieve status of operation via `getVersionCreateRequestStatus`.\n\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveEntitiesVersion", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionCreateRequest" - } + "summary": "Get Tenant Edges (getTenantEdges)", + "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEdges", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -42637,7 +42484,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -42741,57 +42588,48 @@ ] } }, - "/api/entities/vc/version/{entityType}": { + "/api/user/edges": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "List entity type versions (listEntityTypeVersions)", - "description": "Returns list of versions of an entity type in a branch. This is a collected list of versions that were created for entities of this type in a remote branch. \nIf specified branch does not exist - empty page data will be returned. The response structure is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listEntityTypeVersions", + "summary": "Get Edges (getUserEdges)", + "description": "Returns a page of edges available for current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserEdges", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "branch", + "name": "pageSize", "in": "query", - "description": "The name of the working branch, for example 'master'", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "string", + "minimum": 1 } }, { - "name": "pageSize", + "name": "page", "in": "query", - "description": "Maximum amount of entities in a one page", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "minimum": 0 } }, { - "name": "page", + "name": "type", "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, + "description": "A string value representing the edge type. For example, 'default'", + "required": false, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the entity version name.", + "description": "The case insensitive 'substring' filter based on the edge name.", "required": false, "schema": { "type": "string" @@ -42805,7 +42643,11 @@ "schema": { "type": "string", "enum": [ - "timestamp" + "createdTime", + "name", + "type", + "label", + "customerTitle" ] } }, @@ -42829,7 +42671,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityVersion" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -42950,52 +42792,24 @@ ] } }, - "/api/entities/vc/version/{entityType}/{externalEntityUuid}": { + "/api/edge/{edgeId}/events": { "get": { "tags": [ - "entities-version-control-controller" + "edge-event-controller" ], - "summary": "List entity versions (listEntityVersions)", - "description": "Returns list of versions for a specific entity in a concrete branch. \nYou need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. \nIf specified branch does not exist - empty page data will be returned. \n\nEach version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe \"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe \"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe \"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listEntityVersions", + "summary": "Get Edge Events (getEdgeEvents)", + "description": "Returns a page of edge events for the requested edge. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. ", + "operationId": "getEdgeEvents", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "externalEntityUuid", + "name": "edgeId", "in": "path", - "description": "A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "branch", - "in": "query", - "description": "The name of the working branch, for example 'master'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, - { - "name": "internalEntityId", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, { "name": "pageSize", "in": "query", @@ -43019,7 +42833,7 @@ { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the entity version name.", + "description": "The case insensitive 'substring' filter based on the edge event type name.", "required": false, "schema": { "type": "string" @@ -43033,7 +42847,11 @@ "schema": { "type": "string", "enum": [ - "timestamp" + "createdTime", + "name", + "type", + "label", + "customerTitle" ] } }, @@ -43049,6 +42867,26 @@ "DESC" ] } + }, + { + "name": "startTime", + "in": "query", + "description": "Timestamp. Edge events with creation time before it won't be queried", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Edge events with creation time after it won't be queried", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -43057,7 +42895,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityVersion" + "$ref": "#/components/schemas/PageDataEdgeEvent" } } } @@ -43178,33 +43016,24 @@ ] } }, - "/api/entities/vc/version/{requestId}/status": { + "/api/entities/vc/branches": { "get": { "tags": [ "entities-version-control-controller" ], - "summary": "Get version create request status (getVersionCreateRequestStatus)", - "description": "Returns the status of previously made version create request. \n\nThis status contains following properties:\n- `done` - whether request processing is finished;\n- `version` - created version info: timestamp, version id (commit hash), commit name and commit author;\n- `added` - count of items that were created in the remote repo;\n- `modified` - modified items count;\n- `removed` - removed items count;\n- `error` - error message, if an error occurred while handling the request.\n\nAn example of successful status:\n```json\n{\n \"done\": true,\n \"added\": 10,\n \"modified\": 2,\n \"removed\": 5,\n \"version\": {\n \"timestamp\": 1655198528000,\n \"id\":\"8a834dd389ed80e0759ba8ee338b3f1fd160a114\",\n \"name\": \"My devices v2.0\",\n \"author\": \"John Doe\"\n },\n \"error\": null\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getVersionCreateRequestStatus", - "parameters": [ - { - "name": "requestId", - "in": "path", - "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], + "summary": "List branches (listBranches)", + "description": "Lists branches available in the remote repository. \n\nResponse example: \n```json\n[\n {\n \"name\": \"master\",\n \"default\": true\n },\n {\n \"name\": \"dev\",\n \"default\": false\n },\n {\n \"name\": \"dev-2\",\n \"default\": false\n }\n]\n```", + "operationId": "listBranches", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VersionCreationResult" + "type": "array", + "items": { + "$ref": "#/components/schemas/BranchInfo" + } } } } @@ -43325,38 +43154,41 @@ ] } }, - "/api/allEntityGroups/edge/{edgeId}/{groupType}": { + "/api/entities/vc/diff/{entityType}/{internalEntityUuid}": { "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Get All Edge Entity Groups by entity type (getAllEdgeEntityGroups)", - "description": "Fetch the list of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllEdgeEntityGroups", + "summary": "Compare entity data to version (compareEntityDataToVersion)", + "description": "Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "compareEntityDataToVersion", "parameters": [ { - "name": "edgeId", + "name": "entityType", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/EntityType" } }, { - "name": "groupType", + "name": "internalEntityUuid", "in": "path", - "description": "EntityGroup type", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string", - "enum": [ - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD" - ] + "format": "uuid" + } + }, + { + "name": "versionId", + "in": "query", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "required": true, + "schema": { + "type": "string" } } ], @@ -43366,10 +43198,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupInfo" - } + "$ref": "#/components/schemas/EntityDataDiff" } } } @@ -43490,57 +43319,32 @@ ] } }, - "/api/edge/{edgeId}/entityGroup/{entityGroupId}/{groupType}": { + "/api/entities/vc/entity": { "post": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Assign entity group to edge (assignEntityGroupToEdge)", - "description": "Creates assignment of an existing entity group to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once entity group will be delivered to edge service, edge will request entities of this group to be send to edge. Once entities will be delivered to edge service, they are going to be available for usage on remote edge instance.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "assignEntityGroupToEdge", - "parameters": [ - { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "groupType", - "in": "path", - "description": "EntityGroup type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD" - ] + "summary": "Load entities version (loadEntitiesVersion)", + "description": "Loads specific version of remote entities (or single entity) by request. Supported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are multiple types of request. Each of them requires branch name (`branch`) and version id (`versionId`). Request of type `SINGLE_ENTITY` is needed to restore a concrete version of a specific entity. It contains id of a remote entity (`externalEntityId`), internal entity id (`internalEntityId`) and additional configuration (`config`):\n- `loadRelations` - to update relations list (in case `saveRelations` option was enabled during version creation);\n- `loadAttributes` - to load entity attributes (if `saveAttributes` config option was enabled);\n- `loadCredentials` - to update device credentials (if `saveCredentials` option was enabled during version creation);\n- `loadPermissions` - when loading user group, to update group permission list;\n- `loadGroupEntities` - when loading an entity group, to load its entities as well;\n- `autoGenerateIntegrationKey` - if loading integration version, to autogenerate routing key.\n\nAn example of such request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n \n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n \n \"externalEntityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b7944123-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"loadRelations\": false,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n}\n```\n\nAnother request type (`ENTITY_TYPE`) is needed to load specific version of the whole entity types. It contains a structure with entity types to load and configs for each entity type (`entityTypes`). For each specified entity type, the method will load all remote entities of this type that are present at the version. A config for each entity type contains the same options as in `SINGLE_ENTITY` request type, and additionally contains following options:\n- `removeOtherEntities` - to remove local entities that are not present on the remote - basically to overwrite local entity type with the remote one;\n- `findExistingEntityByName` - when you are loading some remote entities that are not yet present at this tenant, try to find existing entity by name and update it rather than create new.\n\nHere is an example of the request to completely restore version of the whole device entity type:\n```json\n{\n \"type\": \"ENTITY_TYPE\",\n\n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n\n \"entityTypes\": {\n \"DEVICE\": {\n \"removeOtherEntities\": true,\n \"findExistingEntityByName\": false,\n \"loadRelations\": true,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n }\n}\n```\n\nThe response will contain generated request UUID that is to be used to check the status of operation via `getVersionLoadRequestStatus`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "loadEntitiesVersion", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionLoadRequest" + } } }, - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroup" + "type": "string", + "format": "uuid" } } } @@ -43659,44 +43463,30 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/entities/vc/entity/{entityType}/{versionId}": { + "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Unassign entity group from edge (unassignEntityGroupFromEdge)", - "description": "Clears assignment of the entity group to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity group and entities inside this group locally.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "unassignEntityGroupFromEdge", + "summary": "List entities at version (listEntitiesAtVersion)", + "description": "Returns a list of remote entities of a specific entity type that are available at a concrete version. \nEach entity item in the result has `externalId` property. Entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntitiesAtVersion", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "groupType", + "name": "entityType", "in": "path", - "description": "EntityGroup type", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { - "type": "string", - "enum": [ - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD" - ] + "$ref": "#/components/schemas/EntityType" } }, { - "name": "entityGroupId", + "name": "versionId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "required": true, "schema": { "type": "string" @@ -43709,7 +43499,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroup" + "type": "array", + "items": { + "$ref": "#/components/schemas/VersionedEntityInfo" + } } } } @@ -43830,31 +43623,33 @@ ] } }, - "/api/entityGroup": { - "post": { + "/api/entities/vc/entity/{requestId}/status": { + "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Create Or Update Entity Group (saveEntityGroup)", - "description": "Create or update the Entity Group. When creating Entity Group, platform generates Entity Group Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Entity Group Id will be present in the response. Specify existing Entity Group Id to update the group. Referencing non-existing Entity Group Id will cause 'Not Found' error.Remove 'id', 'tenantId' and optionally 'ownerId' from the request body example (below) to create new Entity Group entity. When 'ownerId' is not set (or null), it defaults to the current user's owner (Tenant for tenant admins, Customer for customer users). \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "saveEntityGroup", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityGroup" - } + "summary": "Get version load request status (getVersionLoadRequestStatus)", + "description": "Returns the status of previously made version load request. The structure contains following parameters:\n- `done` - if the request was successfully processed;\n- `result` - a list of load results for each entity type:\n - `created` - created entities count;\n - `updated` - updated entities count;\n - `deleted` - removed entities count;\n - `groupsCreated` - created entity groups count;\n - `groupsUpdated` - updated entity groups count;\n - `groupsDeleted` - removed entity groups count.\n- `error` - if an error occurred during processing, error info:\n - `type` - error type;\n - `source` - an external id of remote entity;\n - `target` - if failed to find referenced entity by external id - this external id;\n - `message` - error message.\n\nAn example of successfully processed request status:\n```json\n{\n \"done\": true,\n \"result\": [\n {\n \"entityType\": \"DEVICE\",\n \"created\": 10,\n \"updated\": 5,\n \"deleted\": 5,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 1,\n \"groupsDeleted\": 1\n },\n {\n \"entityType\": \"ASSET\",\n \"created\": 4,\n \"updated\": 0,\n \"deleted\": 8,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 0,\n \"groupsDeleted\": 2\n }\n ]\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getVersionLoadRequestStatus", + "parameters": [ + { + "name": "requestId", + "in": "path", + "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string", + "format": "uuid" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroupInfo" + "$ref": "#/components/schemas/VersionLoadResult" } } } @@ -43871,7 +43666,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -43975,54 +43770,22 @@ ] } }, - "/api/entityGroup/all/{ownerType}/{ownerId}/{groupType}": { + "/api/entities/vc/entity/{versionId}": { "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Get special group All by owner and entity type (getEntityGroupsByOwnerAndType)", - "description": "Fetch reserved group 'All' based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupAllByOwnerAndType", + "summary": "List all entities at version (listAllEntitiesAtVersion)", + "description": "Returns a list of all remote entities available in a specific version. Response type is the same as for listAllEntitiesAtVersion API method. \nReturned entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listAllEntitiesAtVersion", "parameters": [ { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", + "name": "versionId", "in": "path", - "description": "A string value representing the Tenant or Customer id", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "required": true, "schema": { "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - { - "name": "groupType", - "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] } } ], @@ -44032,7 +43795,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroupInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/VersionedEntityInfo" + } } } } @@ -44153,23 +43919,52 @@ ] } }, - "/api/entityGroup/{entityGroupId}": { + "/api/entities/vc/info/{versionId}/{entityType}/{externalEntityUuid}": { "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Get Entity Group Info (getEntityGroupById)", - "description": "Fetch the Entity Group object based on the provided Entity Group Id. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupById", + "summary": "Get entity data info (getEntityDataInfo)", + "description": "Retrieves short info about the remote entity by external id at a concrete version. \nReturned entity data info contains following properties: `hasRelations` (whether stored entity data contains relations), `hasAttributes` (contains attributes), `hasCredentials` (whether stored device data has credentials), `hasPermissions` (user group data contains group permission list) and `hasGroupEntities` (entity group data contains group entities).\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEntityDataInfo", "parameters": [ { - "name": "entityGroupId", + "name": "versionId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "required": true, "schema": { "type": "string" } + }, + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "externalEntityUuid", + "in": "path", + "description": "A string value representing external entity id", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "internalEntityId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } } ], "responses": { @@ -44178,7 +43973,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroupInfo" + "$ref": "#/components/schemas/EntityDataInfo" } } } @@ -44297,28 +44092,91 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/entities/vc/version": { + "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Delete Entity Group (deleteEntityGroup)", - "description": "Deletes the entity group but does not delete the entities in the group, since they are also present in reserved group 'All'. Referencing non-existing Entity Group Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for specified group.", - "operationId": "deleteEntityGroup", + "summary": "List all versions (listVersions)", + "description": "Lists all available versions in a branch for all entity types. \nIf specified branch does not exist - empty page data will be returned. The response format is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listVersions", "parameters": [ { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "branch", + "in": "query", + "description": "The name of the working branch, for example 'master'", "required": true, "schema": { "type": "string" } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity version name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "timestamp" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityVersion" + } + } + } }, "400": { "description": "Bad Request", @@ -44434,36 +44292,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entityGroup/{entityGroupId}/addEntities": { + }, "post": { "tags": [ - "entity-group-controller" - ], - "summary": "Add entities to the group (addEntitiesToEntityGroup)", - "description": "Add entities to the specified entity group. This operation is idempotent: entities that are already members of the group are silently ignored. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'ADD_TO_GROUP' permission for specified group.", - "operationId": "addEntitiesToEntityGroup", - "parameters": [ - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "entities-version-control-controller" ], + "summary": "Save entities version (saveEntitiesVersion)", + "description": "Creates a new version of entities (or a single entity) by request.\nSupported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are two available types of request: `SINGLE_ENTITY` and `COMPLEX`. Each of them contains version name (`versionName`) and name of a branch (`branch`) to create version (commit) in. If specified branch does not exists in a remote repo, then new empty branch will be created. Request of the `SINGLE_ENTITY` type has id of an entity (`entityId`) and additional configuration (`config`) which has following options: \n- `saveRelations` - whether to add inbound and outbound relations of type COMMON to created entity version;\n- `saveAttributes` - to save attributes of server scope (and also shared scope for devices);\n- `saveCredentials` - when saving a version of a device, to add its credentials to the version;\n- `savePermissions` - when saving a user group - to save group permission list;\n- `saveGroupEntities` - when saving an entity group - to save its entities as well.\n\nAn example of a `SINGLE_ENTITY` version create request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n\n \"versionName\": \"Version 1.0\",\n \"branch\": \"dev\",\n\n \"entityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": false\n }\n}\n```\n\nSecond request type (`COMPLEX`), additionally to `branch` and `versionName`, contains following properties:\n- `entityTypes` - a structure with entity types to export and configuration for each entity type; this configuration has all the options available for `SINGLE_ENTITY` and additionally has these ones: \n - `allEntities` and `entityIds` - if you want to save the version of all entities of the entity type then set `allEntities` param to true, otherwise set it to false and specify `entityIds` - in case entity type is group entity, list of specific entity groups, or if not - list of entities;\n - `syncStrategy` - synchronization strategy to use for this entity type: when set to `OVERWRITE` then the list of remote entities of this type will be overwritten by newly added entities. If set to `MERGE` - existing remote entities of this entity type will not be removed, new entities will just be added on top (or existing remote entities will be updated).\n- `syncStrategy` - default synchronization strategy to use when it is not specified for an entity type.\n\nExample for this type of request:\n```json\n{\n \"type\": \"COMPLEX\",\n\n \"versionName\": \"Devices and profiles: release 2\",\n \"branch\": \"master\",\n\n \"syncStrategy\": \"OVERWRITE\",\n \"entityTypes\": {\n \"DEVICE\": {\n \"syncStrategy\": null,\n \"allEntities\": true,\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": true\n },\n \"DEVICE_PROFILE\": {\n \"syncStrategy\": \"MERGE\",\n \"allEntities\": false,\n \"entityIds\": [\n \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n ],\n \"saveRelations\": true\n }\n }\n}\n```\n\nResponse wil contain generated request UUID, that can be then used to retrieve status of operation via `getVersionCreateRequestStatus`.\n\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveEntitiesVersion", "requestBody": { "content": { "application/json": { "schema": { - "type": "array", - "description": "A list of entity ids", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/VersionCreateRequest" } } }, @@ -44471,7 +44312,15 @@ }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "uuid" + } + } + } }, "400": { "description": "Bad Request", @@ -44589,43 +44438,99 @@ ] } }, - "/api/entityGroup/{entityGroupId}/deleteEntities": { - "post": { + "/api/entities/vc/version/{entityType}": { + "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Remove entities from the group (removeEntitiesFromEntityGroup)", - "description": "Removes entities from the specified entity group. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'REMOVE_FROM_GROUP' permission for specified group.", - "operationId": "removeEntitiesFromEntityGroup", + "summary": "List entity type versions (listEntityTypeVersions)", + "description": "Returns list of versions of an entity type in a branch. This is a collected list of versions that were created for entities of this type in a remote branch. \nIf specified branch does not exist - empty page data will be returned. The response structure is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntityTypeVersions", "parameters": [ { - "name": "entityGroupId", + "name": "entityType", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "branch", + "in": "query", + "description": "The name of the working branch, for example 'master'", "required": true, "schema": { "type": "string" } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity version name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "timestamp" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "A list of entity ids", - "items": { - "type": "string" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityVersion" } } } }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - }, "400": { "description": "Bad Request", "content": { @@ -44638,7 +44543,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -44742,32 +44647,60 @@ ] } }, - "/api/entityGroup/{entityGroupId}/entities": { + "/api/entities/vc/version/{entityType}/{externalEntityUuid}": { "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Get Group Entities (getEntities)", - "description": "Returns a page of Short Entity View objects that belongs to specified Entity Group Id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntities", + "summary": "List entity versions (listEntityVersions)", + "description": "Returns list of versions for a specific entity in a concrete branch. \nYou need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. \nIf specified branch does not exist - empty page data will be returned. \n\nEach version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntityVersions", "parameters": [ { - "name": "entityGroupId", + "name": "entityType", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "externalEntityUuid", + "in": "path", + "description": "A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "branch", + "in": "query", + "description": "The name of the working branch, for example 'master'", "required": true, "schema": { "type": "string" } }, + { + "name": "internalEntityId", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, { "name": "pageSize", "in": "query", "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string", - "minimum": 1 + "type": "integer", + "format": "int32" } }, { @@ -44776,14 +44709,14 @@ "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string", - "minimum": 0 + "type": "integer", + "format": "int32" } }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "description": "The case insensitive 'substring' filter based on the entity version name.", "required": false, "schema": { "type": "string" @@ -44795,7 +44728,10 @@ "description": "Property of entity to sort by", "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "timestamp" + ] } }, { @@ -44818,7 +44754,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataShortEntityView" + "$ref": "#/components/schemas/PageDataEntityVersion" } } } @@ -44939,28 +44875,36 @@ ] } }, - "/api/entityGroup/{entityGroupId}/makePrivate": { - "post": { + "/api/entities/vc/version/{requestId}/status": { + "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Make Entity Group Private (makeEntityGroupPrivate)", - "description": "Make the entity group not available for non authorized users. Every group is private by default. This call is useful to hide the group that was previously made public.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "makeEntityGroupPrivate", + "summary": "Get version create request status (getVersionCreateRequestStatus)", + "description": "Returns the status of previously made version create request. \n\nThis status contains following properties:\n- `done` - whether request processing is finished;\n- `version` - created version info: timestamp, version id (commit hash), commit name and commit author;\n- `added` - count of items that were created in the remote repo;\n- `modified` - modified items count;\n- `removed` - removed items count;\n- `error` - error message, if an error occurred while handling the request.\n\nAn example of successful status:\n```json\n{\n \"done\": true,\n \"added\": 10,\n \"modified\": 2,\n \"removed\": 5,\n \"version\": {\n \"timestamp\": 1655198528000,\n \"id\":\"8a834dd389ed80e0759ba8ee338b3f1fd160a114\",\n \"name\": \"My devices v2.0\",\n \"author\": \"John Doe\"\n },\n \"error\": null\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getVersionCreateRequestStatus", "parameters": [ { - "name": "entityGroupId", + "name": "requestId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionCreationResult" + } + } + } }, "400": { "description": "Bad Request", @@ -44974,7 +44918,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -45078,28 +45022,54 @@ ] } }, - "/api/entityGroup/{entityGroupId}/makePublic": { - "post": { + "/api/allEntityGroups/edge/{edgeId}/{groupType}": { + "get": { "tags": [ "entity-group-controller" ], - "summary": "Make Entity Group Publicly available (makeEntityGroupPublic)", - "description": "Make the entity group available for non authorized users. Useful for public dashboards that will be embedded into the public websites. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "makeEntityGroupPublic", + "summary": "Get All Edge Entity Groups by entity type (getAllEdgeEntityGroups)", + "description": "Fetch the list of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllEdgeEntityGroups", "parameters": [ { - "name": "entityGroupId", + "name": "edgeId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "groupType", + "in": "path", + "description": "EntityGroup type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD" + ] + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } + } + } + } }, "400": { "description": "Bad Request", @@ -45113,7 +45083,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -45217,15 +45187,40 @@ ] } }, - "/api/entityGroup/{entityGroupId}/share": { + "/api/edge/{edgeId}/entityGroup/{entityGroupId}/{groupType}": { "post": { "tags": [ "entity-group-controller" ], - "summary": "Share the Entity Group (shareEntityGroup)", - "description": "Share the entity group with certain user group based on the provided Share Group Request. The request is quite flexible and processing of the request involves multiple security checks using platform RBAC feature.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "shareEntityGroup", + "summary": "Assign entity group to edge (assignEntityGroupToEdge)", + "description": "Creates assignment of an existing entity group to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once entity group will be delivered to edge service, edge will request entities of this group to be send to edge. Once entities will be delivered to edge service, they are going to be available for usage on remote edge instance.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "assignEntityGroupToEdge", "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "groupType", + "in": "path", + "description": "EntityGroup type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD" + ] + } + }, { "name": "entityGroupId", "in": "path", @@ -45236,19 +45231,16 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShareGroupRequest" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityGroup" + } + } + } }, "400": { "description": "Bad Request", @@ -45364,30 +45356,44 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entityGroup/{entityGroupId}/{entityId}": { - "get": { + }, + "delete": { "tags": [ "entity-group-controller" ], - "summary": "Get Group Entity (getGroupEntity)", - "description": "Fetch the Short Entity View object based on the group and entity id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getGroupEntity", + "summary": "Unassign entity group from edge (unassignEntityGroupFromEdge)", + "description": "Clears assignment of the entity group to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity group and entities inside this group locally.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "unassignEntityGroupFromEdge", "parameters": [ { - "name": "entityGroupId", + "name": "edgeId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "entityId", + "name": "groupType", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "EntityGroup type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD" + ] + } + }, + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -45400,7 +45406,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShortEntityView" + "$ref": "#/components/schemas/EntityGroup" } } } @@ -45521,46 +45527,34 @@ ] } }, - "/api/entityGroup/{entityGroupId}/{userGroupId}/{roleId}/share": { + "/api/entityGroup": { "post": { "tags": [ "entity-group-controller" ], - "summary": "Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroup)", - "description": "Share the entity group with specified user group using specified role. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "shareEntityGroupToChildOwnerUserGroup", - "parameters": [ - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "userGroupId", - "in": "path", - "description": "A string value representing the Entity(User) Group Id that you would like to share with. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Create Or Update Entity Group (saveEntityGroup)", + "description": "Create or update the Entity Group. When creating Entity Group, platform generates Entity Group Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Entity Group Id will be present in the response. Specify existing Entity Group Id to update the group. Referencing non-existing Entity Group Id will cause 'Not Found' error.Remove 'id', 'tenantId' and optionally 'ownerId' from the request body example (below) to create new Entity Group entity. When 'ownerId' is not set (or null), it defaults to the current user's owner (Tenant for tenant admins, Customer for customer users). \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "saveEntityGroup", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityGroup" + } } }, - { - "name": "roleId", - "in": "path", - "description": "A string value representing the Role Id that describes set of permissions you would like to share (read, write, etc). For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityGroupInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -45678,14 +45672,14 @@ ] } }, - "/api/entityGroup/{ownerType}/{ownerId}/{groupType}/{groupName}": { + "/api/entityGroup/all/{ownerType}/{ownerId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group by owner, type and name (getEntityGroupByOwnerAndNameAndType)", - "description": "Fetch the Entity Group object based on the provided Entity Group Id. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupByOwnerAndNameAndType", + "summary": "Get special group All by owner and entity type (getEntityGroupsByOwnerAndType)", + "description": "Fetch reserved group 'All' based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupAllByOwnerAndType", "parameters": [ { "name": "ownerType", @@ -45727,11 +45721,148 @@ "EDGE" ] } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityGroupInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ { - "name": "groupName", + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Entity Group Info (getEntityGroupById)", + "description": "Fetch the Entity Group object based on the provided Entity Group Id. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupById", + "parameters": [ + { + "name": "entityGroupId", "in": "path", - "description": "Entity Group name", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -45863,16 +45994,14 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entityGroupInfo/{entityGroupId}": { - "get": { + }, + "delete": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Info (getEntityGroupEntityInfoById)", - "description": "Fetch the Entity Group Entity Info object based on the provided Entity Group Id. Entity Info is a lightweight object that contains only id and name of the entity group. \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfoById", + "summary": "Delete Entity Group (deleteEntityGroup)", + "description": "Deletes the entity group but does not delete the entities in the group, since they are also present in reserved group 'All'. Referencing non-existing Entity Group Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for specified group.", + "operationId": "deleteEntityGroup", "parameters": [ { "name": "entityGroupId", @@ -45886,14 +46015,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -46011,42 +46133,43 @@ ] } }, - "/api/entityGroupInfos": { - "get": { + "/api/entityGroup/{entityGroupId}/addEntities": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Infos by Ids (getEntityGroupEntityInfosByIds)", - "description": "Fetch the list of Entity Group Entity Info objects based on the provided entity group ids list. Entity Info is a lightweight object that contains only id and name of the entity group. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfosByIds", + "summary": "Add entities to the group (addEntitiesToEntityGroup)", + "description": "Add entities to the specified entity group. This operation is idempotent: entities that are already members of the group are silently ignored. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'ADD_TO_GROUP' permission for specified group.", + "operationId": "addEntitiesToEntityGroup", "parameters": [ { - "name": "entityGroupIds", - "in": "query", - "description": "A list of group ids, separated by comma ','", + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityInfo" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "A list of entity ids", + "items": { + "type": "string" } } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -46059,7 +46182,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -46163,105 +46286,43 @@ ] } }, - "/api/entityGroupInfos/{groupType}": { - "get": { + "/api/entityGroup/{entityGroupId}/deleteEntities": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Infos by entity type and page link (getEntityGroupEntityInfosByTypeAndPageLink)", - "description": "Returns a page of Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfosByTypeAndPageLink", + "summary": "Remove entities from the group (removeEntitiesFromEntityGroup)", + "description": "Removes entities from the specified entity group. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'REMOVE_FROM_GROUP' permission for specified group.", + "operationId": "removeEntitiesFromEntityGroup", "parameters": [ { - "name": "groupType", + "name": "entityGroupId", "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "includeShared", - "in": "query", - "description": "Whether to include shared entity groups.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "A list of entity ids", + "items": { + "type": "string" } } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -46274,7 +46335,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -46378,31 +46439,22 @@ ] } }, - "/api/entityGroupInfos/{groupType}/shared": { + "/api/entityGroup/{entityGroupId}/entities": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Shared Entity Group Entity Infos by entity type and page link (getSharedEntityGroupEntityInfosByTypeAndPageLink)", - "description": "Returns a page of Shared Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getSharedEntityGroupEntityInfosByTypeAndPageLink", + "summary": "Get Group Entities (getEntities)", + "description": "Returns a page of Short Entity View objects that belongs to specified Entity Group Id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntities", "parameters": [ { - "name": "groupType", + "name": "entityGroupId", "in": "path", - "description": "Entity Group type", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] + "type": "string" } }, { @@ -46463,7 +46515,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" + "$ref": "#/components/schemas/PageDataShortEntityView" } } } @@ -46584,118 +46636,28 @@ ] } }, - "/api/entityGroupInfos/{ownerType}/{ownerId}/{groupType}": { - "get": { + "/api/entityGroup/{entityGroupId}/makePrivate": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Infos by owner and entity type and page link (getEntityGroupEntityInfosByOwnerAndTypeAndPageLink)", - "description": "Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfosByOwnerAndTypeAndPageLink", + "summary": "Make Entity Group Private (makeEntityGroupPrivate)", + "description": "Make the entity group not available for non authorized users. Every group is private by default. This call is useful to hide the group that was previously made public.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "makeEntityGroupPrivate", "parameters": [ { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the Tenant or Customer id", - "required": true, - "schema": { - "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - { - "name": "groupType", + "name": "entityGroupId", "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -46709,7 +46671,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -46813,118 +46775,28 @@ ] } }, - "/api/entityGroupInfosHierarchy/{ownerType}/{ownerId}/{groupType}": { - "get": { + "/api/entityGroup/{entityGroupId}/makePublic": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Infos for all owners starting from specified than ending with owner of current user (getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink)", - "description": "Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink", + "summary": "Make Entity Group Publicly available (makeEntityGroupPublic)", + "description": "Make the entity group available for non authorized users. Useful for public dashboards that will be embedded into the public websites. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "makeEntityGroupPublic", "parameters": [ { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the Tenant or Customer id", - "required": true, - "schema": { - "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - { - "name": "groupType", + "name": "entityGroupId", "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -46938,7 +46810,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -47042,103 +46914,39 @@ ] } }, - "/api/entityGroups/edge/{edgeId}/{groupType}": { - "get": { + "/api/entityGroup/{entityGroupId}/share": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Edge Entity Groups by entity type (getEdgeEntityGroups)", - "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getEdgeEntityGroups", + "summary": "Share the Entity Group (shareEntityGroup)", + "description": "Share the entity group with certain user group based on the provided Share Group Request. The request is quite flexible and processing of the request involves multiple security checks using platform RBAC feature.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "shareEntityGroup", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "groupType", + "name": "entityGroupId", "in": "path", - "description": "EntityGroup type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD" - ] - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEntityGroupInfo" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShareGroupRequest" } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -47151,7 +46959,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -47255,25 +47063,31 @@ ] } }, - "/api/entityGroups/list": { + "/api/entityGroup/{entityGroupId}/{entityId}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by Ids (getEntityGroupsByIds)", - "description": "Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupsByIds", + "summary": "Get Group Entity (getGroupEntity)", + "description": "Fetch the Short Entity View object based on the group and entity id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getGroupEntity", "parameters": [ { - "name": "entityGroupIds", - "in": "query", - "description": "A list of group ids, separated by comma ','", + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } } ], @@ -47283,10 +47097,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupInfo" - } + "$ref": "#/components/schemas/ShortEntityView" } } } @@ -47407,37 +47218,37 @@ ] } }, - "/api/entityGroups/{entityType}/{entityId}": { - "get": { + "/api/entityGroup/{entityGroupId}/{userGroupId}/{roleId}/share": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by Entity Id (getEntityGroupsForEntity)", - "description": "Returns a list of groups that contain the specified Entity Id. For example, all device groups that contain specific device. The list always contain at least one element - special group 'All'.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getEntityGroupsForEntity", + "summary": "Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroup)", + "description": "Share the entity group with specified user group using specified role. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "shareEntityGroupToChildOwnerUserGroup", "parameters": [ { - "name": "entityType", + "name": "entityGroupId", "in": "path", - "description": "Entity Group type", + "description": "A string value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] + "type": "string" } }, { - "name": "entityId", + "name": "userGroupId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the Entity(User) Group Id that you would like to share with. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "roleId", + "in": "path", + "description": "A string value representing the Role Id that describes set of permissions you would like to share (read, write, etc). For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -47446,17 +47257,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupId" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -47470,7 +47271,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -47574,15 +47375,38 @@ ] } }, - "/api/entityGroups/{groupType}": { + "/api/entityGroup/{ownerType}/{ownerId}/{groupType}/{groupName}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by entity type and page link (getEntityGroupsByTypeAndPageLink)", - "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupsByTypeAndPageLink", + "summary": "Get Entity Group by owner, type and name (getEntityGroupByOwnerAndNameAndType)", + "description": "Fetch the Entity Group object based on the provided Entity Group Id. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupByOwnerAndNameAndType", "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, { "name": "groupType", "in": "path", @@ -47602,63 +47426,158 @@ } }, { - "name": "includeShared", - "in": "query", - "description": "Whether to include shared entity groups.", - "required": false, + "name": "groupName", + "in": "path", + "description": "Entity Group name", + "required": true, "schema": { - "type": "boolean" + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityGroupInfo" + } + } } }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "string", - "minimum": 0 + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } } }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/entityGroupInfo/{entityGroupId}": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Entity Group Entity Info (getEntityGroupEntityInfoById)", + "description": "Fetch the Entity Group Entity Info object based on the provided Entity Group Id. Entity Info is a lightweight object that contains only id and name of the entity group. \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfoById", + "parameters": [ + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -47668,7 +47587,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityGroupInfo" + "$ref": "#/components/schemas/EntityInfo" } } } @@ -47789,40 +47708,25 @@ ] } }, - "/api/entityGroups/{groupType}/all": { + "/api/entityGroupInfos": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by entity type (getAllEntityGroupsByType)", - "description": "Fetch the list of Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getAllEntityGroupsByType", + "summary": "Get Entity Group Entity Infos by Ids (getEntityGroupEntityInfosByIds)", + "description": "Fetch the list of Entity Group Entity Info objects based on the provided entity group ids list. Entity Info is a lightweight object that contains only id and name of the entity group. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfosByIds", "parameters": [ { - "name": "groupType", - "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "includeShared", + "name": "entityGroupIds", "in": "query", - "description": "Whether to include shared entity groups.", - "required": false, + "description": "A list of group ids, separated by comma ','", + "required": true, "schema": { - "type": "boolean" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -47834,7 +47738,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityGroupInfo" + "$ref": "#/components/schemas/EntityInfo" } } } @@ -47956,14 +47860,14 @@ ] } }, - "/api/entityGroups/{groupType}/shared": { + "/api/entityGroupInfos/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Shared Entity Groups by entity type and page link (getSharedEntityGroupsByTypeAndPageLink)", - "description": "Returns a page of Shared Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getSharedEntityGroupsByTypeAndPageLink", + "summary": "Get Entity Group Entity Infos by entity type and page link (getEntityGroupEntityInfosByTypeAndPageLink)", + "description": "Returns a page of Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfosByTypeAndPageLink", "parameters": [ { "name": "groupType", @@ -47983,6 +47887,15 @@ ] } }, + { + "name": "includeShared", + "in": "query", + "description": "Whether to include shared entity groups.", + "required": false, + "schema": { + "type": "boolean" + } + }, { "name": "pageSize", "in": "query", @@ -48041,7 +47954,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityGroupInfo" + "$ref": "#/components/schemas/PageDataEntityInfo" } } } @@ -48162,196 +48075,15 @@ ] } }, - "/api/entityGroups/{groupType}/shared/all": { - "get": { - "tags": [ - "entity-group-controller" - ], - "summary": "Get Shared Entity Groups by entity type (getAllSharedEntityGroups)", - "description": "Fetch the list of Shared Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getAllSharedEntityGroups", - "parameters": [ - { - "name": "groupType", - "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupInfo" - } - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/entityGroups/{ownerType}/{ownerId}/{groupType}": { + "/api/entityGroupInfos/{groupType}/shared": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by owner and entity type and page link (getEntityGroupsByOwnerAndTypeAndPageLink)", - "description": "Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupsByOwnerAndTypeAndPageLink", + "summary": "Get Shared Entity Group Entity Infos by entity type and page link (getSharedEntityGroupEntityInfosByTypeAndPageLink)", + "description": "Returns a page of Shared Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getSharedEntityGroupEntityInfosByTypeAndPageLink", "parameters": [ - { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the Tenant or Customer id", - "required": true, - "schema": { - "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, { "name": "groupType", "in": "path", @@ -48428,7 +48160,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityGroupInfo" + "$ref": "#/components/schemas/PageDataEntityInfo" } } } @@ -48549,14 +48281,14 @@ ] } }, - "/api/entityGroups/{ownerType}/{ownerId}/{groupType}/all": { + "/api/entityGroupInfos/{ownerType}/{ownerId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType)", - "description": "Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getAllEntityGroupsByOwnerAndType", + "summary": "Get Entity Group Entity Infos by owner and entity type and page link (getEntityGroupEntityInfosByOwnerAndTypeAndPageLink)", + "description": "Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfosByOwnerAndTypeAndPageLink", "parameters": [ { "name": "ownerType", @@ -48598,6 +48330,57 @@ "EDGE" ] } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -48606,10 +48389,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupInfo" - } + "$ref": "#/components/schemas/PageDataEntityInfo" } } } @@ -48730,14 +48510,14 @@ ] } }, - "/api/entityGroupsHierarchy/{ownerType}/{ownerId}/{groupType}": { + "/api/entityGroupInfosHierarchy/{ownerType}/{ownerId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups for all owners starting from specified than ending with owner of current user (getEntityGroupsHierarchyByOwnerAndTypeAndPageLink)", - "description": "Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupsHierarchyByOwnerAndTypeAndPageLink", + "summary": "Get Entity Group Entity Infos for all owners starting from specified than ending with owner of current user (getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink)", + "description": "Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink", "parameters": [ { "name": "ownerType", @@ -48838,7 +48618,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityGroupInfo" + "$ref": "#/components/schemas/PageDataEntityInfo" } } } @@ -48959,175 +48739,40 @@ ] } }, - "/api/ownerInfo/{ownerType}/{ownerId}": { + "/api/entityGroups/edge/{edgeId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Owner Info (getOwnerInfo)", - "description": "Fetch the owner info (tenant or customer) presented as Entity Info object based on the provided owner Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getOwnerInfo", + "summary": "Get Edge Entity Groups by entity type (getEdgeEntityGroups)", + "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getEdgeEntityGroups", "parameters": [ { - "name": "ownerType", + "name": "edgeId", "in": "path", - "description": "Tenant or Customer", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] + "type": "string" } }, { - "name": "ownerId", + "name": "groupType", "in": "path", - "description": "A string value representing the Tenant or Customer id", + "description": "EntityGroup type", "required": true, "schema": { - "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityInfo" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } + "type": "string", + "enum": [ + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD" + ] } - } - }, - "security": [ - { - "HttpLoginForm": [] }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/ownerInfos": { - "get": { - "tags": [ - "entity-group-controller" - ], - "summary": "Get Owner Infos (getOwnerInfos)", - "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getOwnerInfos", - "parameters": [ { "name": "pageSize", "in": "query", @@ -49186,7 +48831,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" + "$ref": "#/components/schemas/PageDataEntityGroupInfo" } } } @@ -49307,64 +48952,25 @@ ] } }, - "/api/owners": { + "/api/entityGroups/list": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Owners (getOwners)", - "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getOwners", + "summary": "Get Entity Groups by Ids (getEntityGroupsByIds)", + "description": "Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupsByIds", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", + "name": "entityGroupIds", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A list of group ids, separated by comma ','", "required": true, "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "array", + "items": { + "type": "string" + } } } ], @@ -49374,7 +48980,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataContactBasedObject" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } } } } @@ -49495,32 +49104,53 @@ ] } }, - "/api/alarmsQuery/count": { - "post": { + "/api/entityGroups/{entityType}/{entityId}": { + "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" ], - "summary": "Count Alarms by Query (countAlarmsByQuery)", - "description": "Returns the number of alarms that match the query definition.", - "operationId": "countAlarmsByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlarmCountQuery" - } + "summary": "Get Entity Groups by Entity Id (getEntityGroupsForEntity)", + "description": "Returns a list of groups that contain the specified Entity Id. For example, all device groups that contain specific device. The list always contain at least one element - special group 'All'.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getEntityGroupsForEntity", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] } }, - "required": true - }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupId" + } } } } @@ -49537,7 +49167,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -49641,31 +49271,101 @@ ] } }, - "/api/alarmsQuery/find": { - "post": { + "/api/entityGroups/{groupType}": { + "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" ], - "summary": "Find Alarms by Query", - "description": "This method description defines how Alarm Data Query extends the Entity Data Query. See method 'Find Entity Data by Query' first to get the info about 'Entity Data Query'.\n\n The platform will first search the entities that match the entity and key filters. Then, the platform will use 'Alarm Page Link' to filter the alarms related to those entities. Finally, platform fetch the properties of alarm that are defined in the **'alarmFields'** and combine them with the other entity, attribute and latest time series fields to return the result. \n\n See example of the alarm query below. The query will search first 100 active alarms with type 'Temperature Alarm' or 'Fire Alarm' for any device with current temperature > 0. The query will return combination of the entity fields: name of the device, device model and latest temperature reading and alarms fields: createdTime, type, severity and status: \n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 100,\n \"textSearch\": null,\n \"searchPropagatedAlarms\": false,\n \"statusList\": [\n \"ACTIVE\"\n ],\n \"severityList\": [\n \"CRITICAL\",\n \"MAJOR\"\n ],\n \"typeList\": [\n \"Temperature Alarm\",\n \"Fire Alarm\"\n ],\n \"sortOrder\": {\n \"key\": {\n \"key\": \"createdTime\",\n \"type\": \"ALARM_FIELD\"\n },\n \"direction\": \"DESC\"\n },\n \"timeWindow\": 86400000\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"alarmFields\": [\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"createdTime\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"type\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"severity\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"status\"\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ]\n}\n```", - "operationId": "findAlarmDataByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlarmDataQuery" - } + "summary": "Get Entity Groups by entity type and page link (getEntityGroupsByTypeAndPageLink)", + "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupsByTypeAndPageLink", + "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] } }, - "required": true - }, + { + "name": "includeShared", + "in": "query", + "description": "Whether to include shared entity groups.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAlarmData" + "$ref": "#/components/schemas/PageDataEntityGroupInfo" } } } @@ -49682,7 +49382,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -49786,20 +49486,53 @@ ] } }, - "/api/edqs/state": { + "/api/entityGroups/{groupType}/all": { "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" + ], + "summary": "Get Entity Groups by entity type (getAllEntityGroupsByType)", + "description": "Fetch the list of Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getAllEntityGroupsByType", + "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, + { + "name": "includeShared", + "in": "query", + "description": "Whether to include shared entity groups.", + "required": false, + "schema": { + "type": "boolean" + } + } ], - "summary": "getEdqsState", - "operationId": "getEdqsState", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdqsState" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } } } } @@ -49920,169 +49653,92 @@ ] } }, - "/api/edqs/system/request": { - "post": { + "/api/entityGroups/{groupType}/shared": { + "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" ], - "summary": "processSystemEdqsRequest", - "operationId": "processSystemEdqsRequest", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToCoreEdqsRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid request body", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } + "summary": "Get Shared Entity Groups by entity type and page link (getSharedEntityGroupsByTypeAndPageLink)", + "description": "Returns a page of Shared Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getSharedEntityGroupsByTypeAndPageLink", + "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] } }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" } }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ { - "HttpLoginForm": [] + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } }, { - "ApiKeyForm": [] + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } - ] - } - }, - "/api/entitiesQuery/count": { - "post": { - "tags": [ - "entity-query-controller" ], - "summary": "Count Entities by Query", - "description": "Allows to run complex queries to search the count of platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the number of entities that match the query definition.\n\n# Query Definition\n\n\n\nMain **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\"\n\nOptional **key filters** allow to filter results of the entity filter by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\".\n\nLet's review the example:\n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"entityType\": \"DEVICE\"\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"active\"\n },\n \"valueType\": \"BOOLEAN\",\n \"predicate\": {\n \"operation\": \"EQUAL\",\n \"value\": {\n \"defaultValue\": true,\n \"dynamicValue\": null\n },\n \"type\": \"BOOLEAN\"\n }\n }\n ]\n}\n```\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:\n\n # Entity Filters\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases.\n\n## Single Entity\n\nAllows to filter only one entity based on the id. For example, this entity filter selects certain device:\n\n```json\n{\n \"type\": \"singleEntity\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Group Entities Filter\n\nAllows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"entityGroup\",\n \"groupType\": \"DEVICE\",\n \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n}\n```\n\n## Entity List Filter\n\nAllows to filter entities of the same type using their ids. For example, this entity filter selects two devices:\n\n```json\n{\n \"type\": \"entityList\",\n \"entityType\": \"DEVICE\",\n \"entityList\": [\n \"e6501f30-2a7a-11ec-94eb-213c95f54092\",\n \"e6657bf0-2a7a-11ec-94eb-213c95f54092\"\n ]\n}\n```\n\n## Entity Name Filter\n\nAllows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality':\n\n```json\n{\n \"type\": \"entityName\",\n \"entityType\": \"DEVICE\",\n \"entityNameFilter\": \"Air Quality\"\n}\n```\n\n## Entity Type Filter\n\nAllows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers:\n\n```json\n{\n \"type\": \"entityType\",\n \"entityType\": \"CUSTOMER\"\n}\n```\n\n## Group List Filter\n\nReturn multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"entityGroupList\",\n \"groupType\": \"DEVICE\",\n \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"]\n}\n```\n\n## Group Name Filter\n\nAllows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"CAT\"\n}\n```\n\n## Entities by Group Name Filter\n\nAllows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters':\n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': \n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"},\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n## Entity owner Filter\n\nAllows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"stateEntityOwner\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Asset Type Filter\n\nAllows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla':\n\n```json\n{\n \"type\": \"assetType\",\n \"assetType\": \"charging station\",\n \"assetNameFilter\": \"Tesla\"\n}\n```\n\n## Device Type Filter\n\nAllows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC':\n\n```json\n{\n \"type\": \"deviceType\",\n \"deviceType\": \"Temperature Sensor\",\n \"deviceNameFilter\": \"ABC\"\n}\n```\n\n## Edge Type Filter\n\nAllows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada':\n\n```json\n{\n \"type\": \"edgeType\",\n \"edgeType\": \"Factory\",\n \"edgeNameFilter\": \"Nevada\"\n}\n```\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```\n\n## Api Usage Filter\n\nAllows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"apiUsageState\",\n \"customerId\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"CUSTOMER\"\n }\n}\n```\n\n## Relations Query Filter\n\nAllows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'.\n\nFor example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"relationsQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"filters\": [\n {\n \"relationType\": \"Contains\",\n \"entityTypes\": [\n \"DEVICE\",\n \"ASSET\"\n ]\n }\n ]\n}\n```\n\n## Asset Search Query\n\nAllows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions.\n\nFor example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"assetSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"assetTypes\": [\n \"charging station\"\n ]\n}\n```\n\n## Device Search Query\n\nAllows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"deviceTypes\": [\n \"Air Quality Sensor\",\n \"Charging port\"\n ]\n}\n```\n\n## Entity View Query\n\nAllows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"entityViewSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"entityViewTypes\": [\n \"Concrete mixer\"\n ]\n}\n```\n\n## Edge Search Query\n\nAllows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"edgeTypes\": [\n \"Factory\"\n ]\n}\n```\n\n # Key Filters\nKey Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees:\n\n```json\n{\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n}\n```\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail.\n\n## Filter Key\n\nFilter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: \n\n * 'CLIENT_ATTRIBUTE' - used for client attributes; \n * 'SHARED_ATTRIBUTE' - used for shared attributes; \n * 'SERVER_ATTRIBUTE' - used for server attributes; \n * 'ATTRIBUTE' - used for any of the above; \n * 'TIME_SERIES' - used for time series values; \n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n\n\n Let's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value < 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value < 10 or value > 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\n You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: \n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\n Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "countEntitiesByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityCountQuery" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/PageDataEntityGroupInfo" } } } @@ -50099,7 +49755,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -50203,31 +49859,44 @@ ] } }, - "/api/entitiesQuery/find": { - "post": { + "/api/entityGroups/{groupType}/shared/all": { + "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" ], - "summary": "Find Entity Data by Query", - "description": "Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data.\n\n# Query Definition\n\n\n\nMain **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\"\n\nOptional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\".\n\nThe **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity.\n\nThe **page link** contains information about the page to fetch and the sort ordering.\n\nLet's review the example:\n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\",\n \"inherit\": false\n }\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n },\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"label\"\n },\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"additionalInfo\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ],\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 10,\n \"sortOrder\": {\n \"key\": {\n \"key\": \"name\",\n \"type\": \"ENTITY_FIELD\"\n },\n \"direction\": \"ASC\"\n }\n }\n}\n```\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:\n\n # Entity Filters\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases.\n\n## Single Entity\n\nAllows to filter only one entity based on the id. For example, this entity filter selects certain device:\n\n```json\n{\n \"type\": \"singleEntity\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Group Entities Filter\n\nAllows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"entityGroup\",\n \"groupType\": \"DEVICE\",\n \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n}\n```\n\n## Entity List Filter\n\nAllows to filter entities of the same type using their ids. For example, this entity filter selects two devices:\n\n```json\n{\n \"type\": \"entityList\",\n \"entityType\": \"DEVICE\",\n \"entityList\": [\n \"e6501f30-2a7a-11ec-94eb-213c95f54092\",\n \"e6657bf0-2a7a-11ec-94eb-213c95f54092\"\n ]\n}\n```\n\n## Entity Name Filter\n\nAllows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality':\n\n```json\n{\n \"type\": \"entityName\",\n \"entityType\": \"DEVICE\",\n \"entityNameFilter\": \"Air Quality\"\n}\n```\n\n## Entity Type Filter\n\nAllows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers:\n\n```json\n{\n \"type\": \"entityType\",\n \"entityType\": \"CUSTOMER\"\n}\n```\n\n## Group List Filter\n\nReturn multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"entityGroupList\",\n \"groupType\": \"DEVICE\",\n \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"]\n}\n```\n\n## Group Name Filter\n\nAllows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"CAT\"\n}\n```\n\n## Entities by Group Name Filter\n\nAllows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters':\n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': \n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"},\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n## Entity owner Filter\n\nAllows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"stateEntityOwner\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Asset Type Filter\n\nAllows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla':\n\n```json\n{\n \"type\": \"assetType\",\n \"assetType\": \"charging station\",\n \"assetNameFilter\": \"Tesla\"\n}\n```\n\n## Device Type Filter\n\nAllows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC':\n\n```json\n{\n \"type\": \"deviceType\",\n \"deviceType\": \"Temperature Sensor\",\n \"deviceNameFilter\": \"ABC\"\n}\n```\n\n## Edge Type Filter\n\nAllows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada':\n\n```json\n{\n \"type\": \"edgeType\",\n \"edgeType\": \"Factory\",\n \"edgeNameFilter\": \"Nevada\"\n}\n```\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```\n\n## Api Usage Filter\n\nAllows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"apiUsageState\",\n \"customerId\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"CUSTOMER\"\n }\n}\n```\n\n## Relations Query Filter\n\nAllows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'.\n\nFor example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"relationsQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"filters\": [\n {\n \"relationType\": \"Contains\",\n \"entityTypes\": [\n \"DEVICE\",\n \"ASSET\"\n ]\n }\n ]\n}\n```\n\n## Asset Search Query\n\nAllows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions.\n\nFor example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"assetSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"assetTypes\": [\n \"charging station\"\n ]\n}\n```\n\n## Device Search Query\n\nAllows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"deviceTypes\": [\n \"Air Quality Sensor\",\n \"Charging port\"\n ]\n}\n```\n\n## Entity View Query\n\nAllows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"entityViewSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"entityViewTypes\": [\n \"Concrete mixer\"\n ]\n}\n```\n\n## Edge Search Query\n\nAllows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"edgeTypes\": [\n \"Factory\"\n ]\n}\n```\n\n # Key Filters\nKey Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees:\n\n```json\n{\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n}\n```\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail.\n\n## Filter Key\n\nFilter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: \n\n * 'CLIENT_ATTRIBUTE' - used for client attributes; \n * 'SHARED_ATTRIBUTE' - used for shared attributes; \n * 'SERVER_ATTRIBUTE' - used for server attributes; \n * 'ATTRIBUTE' - used for any of the above; \n * 'TIME_SERIES' - used for time series values; \n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n\n\n Let's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value < 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value < 10 or value > 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\n You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: \n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\n Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findEntityDataByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityDataQuery" - } + "summary": "Get Shared Entity Groups by entity type (getAllSharedEntityGroups)", + "description": "Fetch the list of Shared Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getAllSharedEntityGroups", + "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityData" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } } } } @@ -50244,7 +49913,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -50348,65 +50017,115 @@ ] } }, - "/api/entitiesQuery/find/keys": { - "post": { + "/api/entityGroups/{ownerType}/{ownerId}/{groupType}": { + "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" ], - "summary": "Find Available Entity Keys by Query (deprecated)", - "description": "**Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead.\n\nReturns unique time series and/or attribute key names from entities matching the query.\n\nExecutes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names.\n\nPrimarily used for UI features like autocomplete suggestions.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "findAvailableEntityKeysByQuery", + "summary": "Get Entity Groups by owner and entity type and page link (getEntityGroupsByOwnerAndTypeAndPageLink)", + "description": "Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupsByOwnerAndTypeAndPageLink", "parameters": [ { - "name": "timeseries", + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, + { + "name": "pageSize", "in": "query", - "description": "When true, includes unique time series key names in the response.\nWhen false, the 'timeseries' list will be empty.", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "boolean" + "type": "string", + "minimum": 1 } }, { - "name": "attributes", + "name": "page", "in": "query", - "description": "When true, includes unique attribute key names in the response.\nWhen false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope.", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "boolean" + "type": "string", + "minimum": 0 } }, { - "name": "scope", + "name": "textSearch", "in": "query", - "description": "Filters attribute keys by scope. Only applies when 'attributes' is true.\nIf not specified, returns attribute keys from all scopes.", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { "type": "string", "enum": [ - "SERVER_SCOPE", - "SHARED_SCOPE", - "CLIENT_SCOPE" + "ASC", + "DESC" ] } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityDataQuery" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AvailableEntityKeys" + "$ref": "#/components/schemas/PageDataEntityGroupInfo" } } } @@ -50423,7 +50142,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -50517,7 +50236,6 @@ } } }, - "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -50528,77 +50246,67 @@ ] } }, - "/api/v2/entitiesQuery/find/keys": { - "post": { + "/api/entityGroups/{ownerType}/{ownerId}/{groupType}/all": { + "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" ], - "summary": "Find Available Entity Keys By Query", - "description": "Discovers unique time series and/or attribute key names available on entities that match the given query.\nWorks in two steps: first, the request body (an Entity Data Query) is executed to find matching entities\n(page size is capped at 100); then, all distinct key names are collected from those entities.\n\nOptionally, each key can include a sample — the most recent value (by timestamp) for that key\nacross all matched entities.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "findAvailableEntityKeysByQueryV2", + "summary": "Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType)", + "description": "Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getAllEntityGroupsByOwnerAndType", "parameters": [ { - "name": "includeTimeseries", - "in": "query", - "description": "When true, includes unique time series keys in the response.\nWhen false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true.", - "required": false, + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, "schema": { - "type": "boolean", - "default": true + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] } }, { - "name": "includeAttributes", - "in": "query", - "description": "When true, includes unique attribute keys in the response.\nWhen false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true.", - "required": false, + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, "schema": { - "type": "boolean", - "default": true - } + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" }, { - "name": "scopes", - "in": "query", - "description": "Filters attribute keys by scope. Only applies when 'includeAttributes' is true.\nWhen not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities,\nserver scope only for other entity types.", - "required": false, + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, "schema": { "type": "string", "enum": [ - "SERVER_SCOPE", - "SHARED_SCOPE", - "CLIENT_SCOPE" + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" ] } - }, - { - "name": "includeSamples", - "in": "query", - "description": "When true, each key entry includes a 'sample' object with the most recent value and timestamp.\nWhen false, only key names are returned (sample is omitted from JSON).", - "required": false, - "schema": { - "type": "boolean", - "default": false - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityDataQuery" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AvailableEntityKeysV2" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } } } } @@ -50615,7 +50323,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -50719,67 +50427,105 @@ ] } }, - "/api/relation": { + "/api/entityGroupsHierarchy/{ownerType}/{ownerId}/{groupType}": { "get": { "tags": [ - "entity-relation-controller" + "entity-group-controller" ], - "summary": "Get Relation (getRelation)", - "description": "Returns relation object between two specified entities if present. Otherwise throws exception. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "getRelation", + "summary": "Get Entity Groups for all owners starting from specified than ending with owner of current user (getEntityGroupsHierarchyByOwnerAndTypeAndPageLink)", + "description": "Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupsHierarchyByOwnerAndTypeAndPageLink", "parameters": [ { - "name": "fromId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", "required": true, "schema": { "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] } }, { - "name": "fromType", + "name": "pageSize", "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "string", + "minimum": 1 } }, { - "name": "relationType", + "name": "page", "in": "query", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string" + "type": "string", + "minimum": 0 } }, { - "name": "relationTypeGroup", + "name": "textSearch", "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", "required": false, "schema": { "type": "string" } }, { - "name": "toId", + "name": "sortProperty", "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "description": "Property of entity to sort by", + "required": false, "schema": { "type": "string" } }, { - "name": "toType", + "name": "sortOrder", "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -50789,7 +50535,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelation" + "$ref": "#/components/schemas/PageDataEntityGroupInfo" } } } @@ -50910,34 +50656,46 @@ ] } }, - "/api/relations": { - "post": { + "/api/ownerInfo/{ownerType}/{ownerId}": { + "get": { "tags": [ - "entity-relation-controller" + "entity-group-controller" ], - "summary": "Find related entities (findEntityRelationsByQuery)", - "description": "Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info.", - "operationId": "findEntityRelationsByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityRelationsQuery" - } + "summary": "Get Owner Info (getOwnerInfo)", + "description": "Fetch the owner info (tenant or customer) presented as Entity Info object based on the provided owner Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getOwnerInfo", + "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] } }, - "required": true - }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } + "$ref": "#/components/schemas/EntityInfo" } } } @@ -50954,7 +50712,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -51056,37 +50814,79 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/ownerInfos": { + "get": { "tags": [ - "entity-relation-controller" + "entity-group-controller" ], - "summary": "Delete common relations (deleteRelations)", - "description": "Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "deleteRelations", + "summary": "Get Owner Infos (getOwnerInfos)", + "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getOwnerInfos", "parameters": [ { - "name": "entityId", + "name": "pageSize", "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "string", + "minimum": 1 } }, { - "name": "entityType", + "name": "page", "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -51204,41 +51004,65 @@ ] } }, - "/api/relations/from/{fromType}/{fromId}": { + "/api/owners": { "get": { "tags": [ - "entity-relation-controller" + "entity-group-controller" ], - "summary": "Get List of Relations (findEntityRelationsByFrom)", - "description": "Returns list of relation objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findEntityRelationsByFrom", + "summary": "Get Owners (getOwners)", + "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getOwners", "parameters": [ { - "name": "fromType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "string", + "minimum": 1 } }, { - "name": "fromId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, "schema": { "type": "string" } }, { - "name": "relationTypeGroup", + "name": "sortProperty", "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", + "description": "Property of entity to sort by", "required": false, "schema": { "type": "string" } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -51247,10 +51071,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } + "$ref": "#/components/schemas/PageDataContactBasedObject" } } } @@ -51371,62 +51192,32 @@ ] } }, - "/api/relations/from/{fromType}/{fromId}/{relationType}": { - "get": { + "/api/alarmsQuery/count": { + "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Get List of Relations (findEntityRelationsByFromAndRelationType)", - "description": "Returns list of relation objects for the specified entity by the 'from' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findEntityRelationsByFromAndRelationType", - "parameters": [ - { - "name": "fromType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationType", - "in": "path", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" + "summary": "Count Alarms by Query (countAlarmsByQuery)", + "description": "Returns the number of alarms that match the query definition.", + "operationId": "countAlarmsByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmCountQuery" + } } }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } + "type": "integer", + "format": "int64" } } } @@ -51443,7 +51234,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -51547,19 +51338,19 @@ ] } }, - "/api/relations/info": { + "/api/alarmsQuery/find": { "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Find related entity infos (findEntityRelationInfosByQuery)", - "description": "Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findEntityRelationInfosByQuery", + "summary": "Find Alarms by Query", + "description": "This method description defines how Alarm Data Query extends the Entity Data Query. See method 'Find Entity Data by Query' first to get the info about 'Entity Data Query'.\n\n The platform will first search the entities that match the entity and key filters. Then, the platform will use 'Alarm Page Link' to filter the alarms related to those entities. Finally, platform fetch the properties of alarm that are defined in the **'alarmFields'** and combine them with the other entity, attribute and latest time series fields to return the result. \n\n See example of the alarm query below. The query will search first 100 active alarms with type 'Temperature Alarm' or 'Fire Alarm' for any device with current temperature \u003E 0. The query will return combination of the entity fields: name of the device, device model and latest temperature reading and alarms fields: createdTime, type, severity and status: \n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 100,\n \"textSearch\": null,\n \"searchPropagatedAlarms\": false,\n \"statusList\": [\n \"ACTIVE\"\n ],\n \"severityList\": [\n \"CRITICAL\",\n \"MAJOR\"\n ],\n \"typeList\": [\n \"Temperature Alarm\",\n \"Fire Alarm\"\n ],\n \"sortOrder\": {\n \"key\": {\n \"key\": \"createdTime\",\n \"type\": \"ALARM_FIELD\"\n },\n \"direction\": \"DESC\"\n },\n \"timeWindow\": 86400000\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"alarmFields\": [\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"createdTime\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"type\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"severity\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"status\"\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ]\n}\n```", + "operationId": "findAlarmDataByQuery", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelationsQuery" + "$ref": "#/components/schemas/AlarmDataQuery" } } }, @@ -51571,10 +51362,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelationInfo" - } + "$ref": "#/components/schemas/PageDataAlarmData" } } } @@ -51695,53 +51483,20 @@ ] } }, - "/api/relations/info/from/{fromType}/{fromId}": { + "/api/edqs/state": { "get": { "tags": [ - "entity-relation-controller" - ], - "summary": "Get List of Relation Infos (findEntityRelationInfosByFrom)", - "description": "Returns list of relation info objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findEntityRelationInfosByFrom", - "parameters": [ - { - "name": "fromType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } + "entity-query-controller" ], + "summary": "getEdqsState", + "operationId": "getEdqsState", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelationInfo" - } + "$ref": "#/components/schemas/EdqsState" } } } @@ -51862,56 +51617,26 @@ ] } }, - "/api/relations/info/to/{toType}/{toId}": { - "get": { + "/api/edqs/system/request": { + "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Get List of Relation Infos (findEntityRelationInfosByTo)", - "description": "Returns list of relation info objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findEntityRelationInfosByTo", - "parameters": [ - { - "name": "toType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "toId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "processSystemEdqsRequest", + "operationId": "processSystemEdqsRequest", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToCoreEdqsRequest" + } } }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelationInfo" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -51925,7 +51650,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -52029,53 +51754,32 @@ ] } }, - "/api/relations/to/{toType}/{toId}": { - "get": { + "/api/entitiesQuery/count": { + "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Get List of Relations (findEntityRelationsByTo)", - "description": "Returns list of relation objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findEntityRelationsByTo", - "parameters": [ - { - "name": "toType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "toId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Count Entities by Query", + "description": "Allows to run complex queries to search the count of platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the number of entities that match the query definition.\n\n# Query Definition\n\n\n\nMain **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\"\n\nOptional **key filters** allow to filter results of the entity filter by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature \u003E 20 or temperature\u003C 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' \u003E 40\".\n\nLet's review the example:\n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"entityType\": \"DEVICE\"\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"active\"\n },\n \"valueType\": \"BOOLEAN\",\n \"predicate\": {\n \"operation\": \"EQUAL\",\n \"value\": {\n \"defaultValue\": true,\n \"dynamicValue\": null\n },\n \"type\": \"BOOLEAN\"\n }\n }\n ]\n}\n```\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:\n\n # Entity Filters\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases.\n\n## Single Entity\n\nAllows to filter only one entity based on the id. For example, this entity filter selects certain device:\n\n```json\n{\n \"type\": \"singleEntity\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Group Entities Filter\n\nAllows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"entityGroup\",\n \"groupType\": \"DEVICE\",\n \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n}\n```\n\n## Entity List Filter\n\nAllows to filter entities of the same type using their ids. For example, this entity filter selects two devices:\n\n```json\n{\n \"type\": \"entityList\",\n \"entityType\": \"DEVICE\",\n \"entityList\": [\n \"e6501f30-2a7a-11ec-94eb-213c95f54092\",\n \"e6657bf0-2a7a-11ec-94eb-213c95f54092\"\n ]\n}\n```\n\n## Entity Name Filter\n\nAllows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality':\n\n```json\n{\n \"type\": \"entityName\",\n \"entityType\": \"DEVICE\",\n \"entityNameFilter\": \"Air Quality\"\n}\n```\n\n## Entity Type Filter\n\nAllows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers:\n\n```json\n{\n \"type\": \"entityType\",\n \"entityType\": \"CUSTOMER\"\n}\n```\n\n## Group List Filter\n\nReturn multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"entityGroupList\",\n \"groupType\": \"DEVICE\",\n \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"]\n}\n```\n\n## Group Name Filter\n\nAllows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"CAT\"\n}\n```\n\n## Entities by Group Name Filter\n\nAllows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters':\n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': \n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"},\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n## Entity owner Filter\n\nAllows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"stateEntityOwner\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Asset Type Filter\n\nAllows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla':\n\n```json\n{\n \"type\": \"assetType\",\n \"assetType\": \"charging station\",\n \"assetNameFilter\": \"Tesla\"\n}\n```\n\n## Device Type Filter\n\nAllows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC':\n\n```json\n{\n \"type\": \"deviceType\",\n \"deviceType\": \"Temperature Sensor\",\n \"deviceNameFilter\": \"ABC\"\n}\n```\n\n## Edge Type Filter\n\nAllows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada':\n\n```json\n{\n \"type\": \"edgeType\",\n \"edgeType\": \"Factory\",\n \"edgeNameFilter\": \"Nevada\"\n}\n```\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```\n\n## Api Usage Filter\n\nAllows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"apiUsageState\",\n \"customerId\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"CUSTOMER\"\n }\n}\n```\n\n## Relations Query Filter\n\nAllows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'.\n\nFor example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"relationsQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"filters\": [\n {\n \"relationType\": \"Contains\",\n \"entityTypes\": [\n \"DEVICE\",\n \"ASSET\"\n ]\n }\n ]\n}\n```\n\n## Asset Search Query\n\nAllows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions.\n\nFor example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"assetSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"assetTypes\": [\n \"charging station\"\n ]\n}\n```\n\n## Device Search Query\n\nAllows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"deviceTypes\": [\n \"Air Quality Sensor\",\n \"Charging port\"\n ]\n}\n```\n\n## Entity View Query\n\nAllows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"entityViewSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"entityViewTypes\": [\n \"Concrete mixer\"\n ]\n}\n```\n\n## Edge Search Query\n\nAllows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"edgeTypes\": [\n \"Factory\"\n ]\n}\n```\n\n # Key Filters\nKey Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees:\n\n```json\n{\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n}\n```\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail.\n\n## Filter Key\n\nFilter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: \n\n * 'CLIENT_ATTRIBUTE' - used for client attributes; \n * 'SHARED_ATTRIBUTE' - used for shared attributes; \n * 'SERVER_ATTRIBUTE' - used for server attributes; \n * 'ATTRIBUTE' - used for any of the above; \n * 'TIME_SERIES' - used for time series values; \n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n\n\n Let's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value \u003C 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value \u003C 10 or value \u003E 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value \u003C 10 or (value \u003E 50 && value \u003C 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\n You may also want to replace hardcoded values (for example, temperature \u003E 20) with the more dynamic expression (for example, temperature \u003E 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: \n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\n Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "countEntitiesByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityCountQuery" + } } }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } + "type": "integer", + "format": "int64" } } } @@ -52092,7 +51796,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -52196,62 +51900,31 @@ ] } }, - "/api/relations/to/{toType}/{toId}/{relationType}": { - "get": { + "/api/entitiesQuery/find": { + "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Get List of Relations (findEntityRelationsByToAndRelationType)", - "description": "Returns list of relation objects for the specified entity by the 'to' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findEntityRelationsByToAndRelationType", - "parameters": [ - { - "name": "toType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "toId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationType", - "in": "path", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" + "summary": "Find Entity Data by Query", + "description": "Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data.\n\n# Query Definition\n\n\n\nMain **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\"\n\nOptional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature \u003E 20 or temperature\u003C 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' \u003E 40\".\n\nThe **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity.\n\nThe **page link** contains information about the page to fetch and the sort ordering.\n\nLet's review the example:\n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\",\n \"inherit\": false\n }\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n },\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"label\"\n },\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"additionalInfo\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ],\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 10,\n \"sortOrder\": {\n \"key\": {\n \"key\": \"name\",\n \"type\": \"ENTITY_FIELD\"\n },\n \"direction\": \"ASC\"\n }\n }\n}\n```\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:\n\n # Entity Filters\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases.\n\n## Single Entity\n\nAllows to filter only one entity based on the id. For example, this entity filter selects certain device:\n\n```json\n{\n \"type\": \"singleEntity\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Group Entities Filter\n\nAllows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"entityGroup\",\n \"groupType\": \"DEVICE\",\n \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n}\n```\n\n## Entity List Filter\n\nAllows to filter entities of the same type using their ids. For example, this entity filter selects two devices:\n\n```json\n{\n \"type\": \"entityList\",\n \"entityType\": \"DEVICE\",\n \"entityList\": [\n \"e6501f30-2a7a-11ec-94eb-213c95f54092\",\n \"e6657bf0-2a7a-11ec-94eb-213c95f54092\"\n ]\n}\n```\n\n## Entity Name Filter\n\nAllows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality':\n\n```json\n{\n \"type\": \"entityName\",\n \"entityType\": \"DEVICE\",\n \"entityNameFilter\": \"Air Quality\"\n}\n```\n\n## Entity Type Filter\n\nAllows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers:\n\n```json\n{\n \"type\": \"entityType\",\n \"entityType\": \"CUSTOMER\"\n}\n```\n\n## Group List Filter\n\nReturn multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"entityGroupList\",\n \"groupType\": \"DEVICE\",\n \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"]\n}\n```\n\n## Group Name Filter\n\nAllows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"CAT\"\n}\n```\n\n## Entities by Group Name Filter\n\nAllows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters':\n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': \n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"},\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n## Entity owner Filter\n\nAllows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"stateEntityOwner\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Asset Type Filter\n\nAllows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla':\n\n```json\n{\n \"type\": \"assetType\",\n \"assetType\": \"charging station\",\n \"assetNameFilter\": \"Tesla\"\n}\n```\n\n## Device Type Filter\n\nAllows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC':\n\n```json\n{\n \"type\": \"deviceType\",\n \"deviceType\": \"Temperature Sensor\",\n \"deviceNameFilter\": \"ABC\"\n}\n```\n\n## Edge Type Filter\n\nAllows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada':\n\n```json\n{\n \"type\": \"edgeType\",\n \"edgeType\": \"Factory\",\n \"edgeNameFilter\": \"Nevada\"\n}\n```\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```\n\n## Api Usage Filter\n\nAllows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"apiUsageState\",\n \"customerId\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"CUSTOMER\"\n }\n}\n```\n\n## Relations Query Filter\n\nAllows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'.\n\nFor example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"relationsQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"filters\": [\n {\n \"relationType\": \"Contains\",\n \"entityTypes\": [\n \"DEVICE\",\n \"ASSET\"\n ]\n }\n ]\n}\n```\n\n## Asset Search Query\n\nAllows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions.\n\nFor example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"assetSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"assetTypes\": [\n \"charging station\"\n ]\n}\n```\n\n## Device Search Query\n\nAllows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"deviceTypes\": [\n \"Air Quality Sensor\",\n \"Charging port\"\n ]\n}\n```\n\n## Entity View Query\n\nAllows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"entityViewSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"entityViewTypes\": [\n \"Concrete mixer\"\n ]\n}\n```\n\n## Edge Search Query\n\nAllows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"edgeTypes\": [\n \"Factory\"\n ]\n}\n```\n\n # Key Filters\nKey Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees:\n\n```json\n{\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n}\n```\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail.\n\n## Filter Key\n\nFilter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: \n\n * 'CLIENT_ATTRIBUTE' - used for client attributes; \n * 'SHARED_ATTRIBUTE' - used for shared attributes; \n * 'SERVER_ATTRIBUTE' - used for server attributes; \n * 'ATTRIBUTE' - used for any of the above; \n * 'TIME_SERIES' - used for time series values; \n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n\n\n Let's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value \u003C 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value \u003C 10 or value \u003E 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value \u003C 10 or (value \u003E 50 && value \u003C 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\n You may also want to replace hardcoded values (for example, temperature \u003E 20) with the more dynamic expression (for example, temperature \u003E 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: \n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\n Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findEntityDataByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityDataQuery" + } } }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } + "$ref": "#/components/schemas/PageDataEntityData" } } } @@ -52268,7 +51941,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -52372,19 +52045,53 @@ ] } }, - "/api/v2/relation": { + "/api/entitiesQuery/find/keys": { "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" + ], + "summary": "Find Available Entity Keys by Query (deprecated)", + "description": "**Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead.\n\nReturns unique time series and/or attribute key names from entities matching the query.\n\nExecutes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names.\n\nPrimarily used for UI features like autocomplete suggestions.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "findAvailableEntityKeysByQuery", + "parameters": [ + { + "name": "timeseries", + "in": "query", + "description": "When true, includes unique time series key names in the response.\nWhen false, the 'timeseries' list will be empty.", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "attributes", + "in": "query", + "description": "When true, includes unique attribute key names in the response.\nWhen false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope.", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "scope", + "in": "query", + "description": "Filters attribute keys by scope. Only applies when 'attributes' is true.\nIf not specified, returns attribute keys from all scopes.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE", + "CLIENT_SCOPE" + ] + } + } ], - "summary": "Create Relation (saveRelation)", - "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "saveRelation", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelation" + "$ref": "#/components/schemas/EntityDataQuery" } } }, @@ -52396,7 +52103,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelation" + "$ref": "#/components/schemas/AvailableEntityKeys" } } } @@ -52507,6 +52214,7 @@ } } }, + "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -52515,77 +52223,79 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/v2/entitiesQuery/find/keys": { + "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Delete Relation (deleteRelation)", - "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "deleteRelation", + "summary": "Find Available Entity Keys By Query", + "description": "Discovers unique time series and/or attribute key names available on entities that match the given query.\nWorks in two steps: first, the request body (an Entity Data Query) is executed to find matching entities\n(page size is capped at 100); then, all distinct key names are collected from those entities.\n\nOptionally, each key can include a sample — the most recent value (by timestamp) for that key\nacross all matched entities.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "findAvailableEntityKeysByQueryV2", "parameters": [ { - "name": "fromId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromType", - "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationType", + "name": "includeTimeseries", "in": "query", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, + "description": "When true, includes unique time series keys in the response.\nWhen false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true.", + "required": false, "schema": { - "type": "string" + "type": "boolean", + "default": true } }, { - "name": "relationTypeGroup", + "name": "includeAttributes", "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", + "description": "When true, includes unique attribute keys in the response.\nWhen false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true.", "required": false, "schema": { - "type": "string" + "type": "boolean", + "default": true } }, { - "name": "toId", + "name": "scopes", "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "description": "Filters attribute keys by scope. Only applies when 'includeAttributes' is true.\nWhen not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities,\nserver scope only for other entity types.", + "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE", + "CLIENT_SCOPE" + ] } }, { - "name": "toType", + "name": "includeSamples", "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, + "description": "When true, each key entry includes a 'sample' object with the most recent value and timestamp.\nWhen false, only key names are returned (sample is omitted from JSON).", + "required": false, "schema": { - "type": "string" + "type": "boolean", + "default": false } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityDataQuery" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelation" + "$ref": "#/components/schemas/AvailableEntityKeysV2" } } } @@ -52602,7 +52312,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -52706,96 +52416,67 @@ ] } }, - "/api/customer/{customerId}/entityViewInfos": { + "/api/relation": { "get": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Get Customer Entity View Infos (getCustomerEntityViewInfos)", - "description": "Returns a page of entity view info objects owned by the specified customer. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerEntityViewInfos", + "summary": "Get Relation (getRelation)", + "description": "Returns relation object between two specified entities if present. Otherwise throws exception. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "getRelation", "parameters": [ { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "fromId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "pageSize", + "name": "fromType", "in": "query", - "description": "Maximum amount of entities in a one page", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { - "name": "page", + "name": "relationType", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "type", - "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", - "required": false, "schema": { "type": "string" } }, { - "name": "textSearch", + "name": "relationTypeGroup", "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", + "description": "A string value representing relation type group. For example, 'COMMON'", "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", + "name": "toId", "in": "query", - "description": "Property of entity to sort by", - "required": false, + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type" - ] + "type": "string" } }, { - "name": "sortOrder", + "name": "toType", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -52805,7 +52486,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityViewInfo" + "$ref": "#/components/schemas/EntityRelation" } } } @@ -52926,97 +52607,34 @@ ] } }, - "/api/customer/{customerId}/entityViews": { - "get": { + "/api/relations": { + "post": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Get Customer Entity Views (getCustomerEntityViews)", - "description": "Returns a page of Entity View objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerEntityViews", - "parameters": [ - { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type" - ] + "summary": "Find related entities (findEntityRelationsByQuery)", + "description": "Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info.", + "operationId": "findEntityRelationsByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelationsQuery" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityView" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } } } } @@ -53033,7 +52651,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -53135,93 +52753,37 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entityGroup/{entityGroupId}/entityViews": { - "get": { + }, + "delete": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Get entity views by Entity Group Id (getEntityViewsByEntityGroupId)", - "description": "Returns a page of Entity View objects that belongs to specified Entity View Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityViewsByEntityGroupId", + "summary": "Delete common relations (deleteRelations)", + "description": "Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "deleteRelations", "parameters": [ { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", + "name": "entityId", "in": "query", - "description": "Maximum amount of entities in a one page", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "minimum": 1 + "type": "string" } }, { - "name": "page", + "name": "entityType", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEntityView" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -53339,83 +52901,53 @@ ] } }, - "/api/entityView": { - "post": { + "/api/relations/from/{fromType}/{fromId}": { + "get": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Save or update entity view (saveEntityView)", - "description": "Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Entity View entity.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveEntityView", + "summary": "Get List of Relations (findEntityRelationsByFrom)", + "description": "Returns list of relation objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByFrom", "parameters": [ { - "name": "entityGroupId", - "in": "query", - "required": false, + "name": "fromType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, "schema": { "type": "string" } }, { - "name": "entityGroupIds", - "in": "query", - "description": "A list of entity group ids, separated by comma ','", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "nameConflictPolicy", - "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", - "required": false, - "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" - } - }, - { - "name": "uniquifySeparator", - "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", - "required": false, + "name": "fromId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "string", - "default": "_" + "type": "string" } }, { - "name": "uniquifyStrategy", + "name": "relationTypeGroup", "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "description": "A string value representing relation type group. For example, 'COMMON'", "required": false, "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityView" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } } } } @@ -53432,7 +52964,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -53536,23 +53068,50 @@ ] } }, - "/api/entityView/info/{entityViewId}": { + "/api/relations/from/{fromType}/{fromId}/{relationType}": { "get": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Get entity view info (getEntityViewInfoById)", - "description": "Fetch the Entity View info object based on the provided entity view id. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEntityViewInfoById", + "summary": "Get List of Relations (findEntityRelationsByFromAndRelationType)", + "description": "Returns list of relation objects for the specified entity by the 'from' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByFromAndRelationType", "parameters": [ { - "name": "entityViewId", + "name": "fromType", "in": "path", - "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } + }, + { + "name": "fromId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationType", + "in": "path", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -53561,7 +53120,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityViewInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } } } } @@ -53682,14 +53244,24 @@ ] } }, - "/api/entityView/types": { - "get": { + "/api/relations/info": { + "post": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Get Entity View Types (getEntityViewTypes)", - "description": "Returns a set of unique entity view types based on entity views that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEntityViewTypes", + "summary": "Find related entity infos (findEntityRelationInfosByQuery)", + "description": "Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelationsQuery" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -53698,7 +53270,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntitySubtype" + "$ref": "#/components/schemas/EntityRelationInfo" } } } @@ -53716,7 +53288,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -53820,23 +53392,41 @@ ] } }, - "/api/entityView/{entityViewId}": { + "/api/relations/info/from/{fromType}/{fromId}": { "get": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Get entity view (getEntityViewById)", - "description": "Fetch the EntityView object based on the provided entity view id. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEntityViewById", + "summary": "Get List of Relation Infos (findEntityRelationInfosByFrom)", + "description": "Returns list of relation info objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByFrom", "parameters": [ { - "name": "entityViewId", + "name": "fromType", "in": "path", - "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } + }, + { + "name": "fromId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -53845,7 +53435,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelationInfo" + } } } } @@ -53964,28 +53557,58 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/relations/info/to/{toType}/{toId}": { + "get": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Delete entity view (deleteEntityView)", - "description": "Delete the EntityView object based on the provided entity view id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "deleteEntityView", + "summary": "Get List of Relation Infos (findEntityRelationInfosByTo)", + "description": "Returns list of relation info objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByTo", "parameters": [ { - "name": "entityViewId", + "name": "toType", "in": "path", - "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } + }, + { + "name": "toId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelationInfo" + } + } + } + } }, "400": { "description": "Bad Request", @@ -54103,88 +53726,41 @@ ] } }, - "/api/entityViewInfos/all": { + "/api/relations/to/{toType}/{toId}": { "get": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Get All Entity View Infos for current user (getAllEntityViewInfos)", - "description": "Returns a page of entity view info objects owned by the tenant or the customer of a current user. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllEntityViewInfos", + "summary": "Get List of Relations (findEntityRelationsByTo)", + "description": "Returns list of relation objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByTo", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "toType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "toId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "type", - "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", - "required": false, "schema": { "type": "string" } }, { - "name": "textSearch", + "name": "relationTypeGroup", "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", + "description": "A string value representing relation type group. For example, 'COMMON'", "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -54193,7 +53769,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityViewInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } } } } @@ -54314,24 +53893,52 @@ ] } }, - "/api/entityViews": { - "post": { + "/api/relations/to/{toType}/{toId}/{relationType}": { + "get": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Find related entity views (findEntityViewsByQuery)", - "description": "Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findEntityViewsByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityViewSearchQuery" - } + "summary": "Get List of Relations (findEntityRelationsByToAndRelationType)", + "description": "Returns list of relation objects for the specified entity by the 'to' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByToAndRelationType", + "parameters": [ + { + "name": "toType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "toId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationType", + "in": "path", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -54340,7 +53947,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityView" + "$ref": "#/components/schemas/EntityRelation" } } } @@ -54358,7 +53965,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -54462,38 +54069,31 @@ ] } }, - "/api/entityViews/list": { - "get": { + "/api/v2/relation": { + "post": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Get Entity Views By Ids (getEntityViewsByIds)", - "description": "Requested entity views must be owned by tenant or assigned to customer which user is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getEntityViewsByIds", - "parameters": [ - { - "name": "entityViewIds", - "in": "query", - "description": "A list of entity view ids, separated by comma ','", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" + "summary": "Create Relation (saveRelation)", + "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "saveRelation", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelation" } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityView" - } + "$ref": "#/components/schemas/EntityRelation" } } } @@ -54510,7 +54110,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -54612,21 +54212,64 @@ "ApiKeyForm": [] } ] - } - }, - "/api/tenant/entityView": { - "get": { + }, + "delete": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Get Entity View by name (getTenantEntityViewByName)", - "description": "Fetch the Entity View object based on the tenant id and entity view name. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEntityViewByName", + "summary": "Delete Relation (deleteRelation)", + "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "deleteRelation", "parameters": [ { - "name": "entityViewName", + "name": "fromId", "in": "query", - "description": "Entity View name", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fromType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationType", + "in": "query", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "toId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "toType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" @@ -54639,7 +54282,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "$ref": "#/components/schemas/EntityRelation" } } } @@ -54760,15 +54403,24 @@ ] } }, - "/api/tenant/entityViews": { + "/api/customer/{customerId}/entityViewInfos": { "get": { "tags": [ "entity-view-controller" ], - "summary": "Get Tenant Entity Views (getTenantEntityViews)", - "description": "Returns a page of entity views owned by tenant. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEntityViews", + "summary": "Get Customer Entity View Infos (getCustomerEntityViewInfos)", + "description": "Returns a page of entity view info objects owned by the specified customer. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerEntityViewInfos", "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "pageSize", "in": "query", @@ -54789,6 +54441,15 @@ "format": "int32" } }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, { "name": "type", "in": "query", @@ -54841,7 +54502,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityView" + "$ref": "#/components/schemas/PageDataEntityViewInfo" } } } @@ -54962,23 +54623,32 @@ ] } }, - "/api/user/entityViews": { + "/api/customer/{customerId}/entityViews": { "get": { "tags": [ "entity-view-controller" ], - "summary": "Get Entity Views (getUserEntityViews)", - "description": "Returns a page of entity views that are available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUserEntityViews", + "summary": "Get Customer Entity Views (getCustomerEntityViews)", + "description": "Returns a page of Entity View objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerEntityViews", "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "pageSize", "in": "query", "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string", - "minimum": 1 + "type": "integer", + "format": "int32" } }, { @@ -54987,8 +54657,8 @@ "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string", - "minimum": 0 + "type": "integer", + "format": "int32" } }, { @@ -55164,37 +54834,19 @@ ] } }, - "/api/events/{entityType}/{entityId}": { - "post": { + "/api/entityGroup/{entityGroupId}/entityViews": { + "get": { "tags": [ - "event-controller" + "entity-view-controller" ], - "summary": "Get Events by event filter (getEventsByFilter)", - "description": "Returns a page of events for the chosen entity by specifying the event filter. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n# Event Filter Definition\n\n6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. \n\nNote,\n\n * 'server' - string value representing the server name, identif ier or ip address where the platform is running;\n * 'errorStr' - the case insensitive 'contains' filter based on error message.\n\n## Error Event Filter\n\n```json\n{\n \"eventType\":\"ERROR\",\n \"server\":\"ip-172-31-24-152\",\n \"method\":\"onClusterEventMsg\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'method' - string value representing the method name when the error happened.\n\n## Lifecycle Event Filter\n\n```json\n{\n \"eventType\":\"LC_EVENT\",\n \"server\":\"ip-172-31-24-152\",\n \"event\":\"STARTED\",\n \"status\":\"Success\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'event' - string value representing the lifecycle event type;\n * 'status' - string value representing status of the lifecycle event.\n\n## Statistics Event Filter\n\n```json\n{\n \"eventType\":\"STATS\",\n \"server\":\"ip-172-31-24-152\",\n \"messagesProcessed\":10,\n \"errorsOccurred\":5\n}\n```\n\n * 'messagesProcessed' - the minimum number of successfully processed messages;\n * 'errorsOccurred' - the minimum number of errors occurred during messages processing.\n\n## Debug Rule Node Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_NODE\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n## Debug Rule Chain Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_CHAIN\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity);\n * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message;\n * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message;\n * 'entityName' - string value representing the entity type;\n * 'relationType' - string value representing the type of message routing;\n * 'entityId' - string value representing the entity id in the event body (originator of the message);\n * 'msgType' - string value representing the message type;\n * 'isError' - boolean value to filter the errors.\n\n## Debug Calculated Field Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_CALCULATED_FIELD\",\n \"server\":\"ip-172-31-24-152\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\",\n \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"arguments\":\"{\n \"x\": {\n \"ts\": 1739432016629,\n \"value\": 20\n },\n \"y\": {\n \"ts\": 1739429717656,\n \"value\": 12\n }\n }\",\n \"result\":\"{\n \"x + y\": 32\n }\",\n}\n```\n\n * 'entityId' - string value representing the entity id in the event body;\n * 'entityType' - string value representing the entity type;\n * 'msgId' - string value representing the message id in the rule engine;\n * 'msgType' - string value representing the message type;\n * 'arguments' - string value representing the arguments that were used in the calculation performed;\n * 'result' - string value representing the result of a calculation;\n * 'isError' - boolean value to filter the errors.\n\n", - "operationId": "getEventsByFilter", + "summary": "Get entity views by Entity Group Id (getEntityViewsByEntityGroupId)", + "description": "Returns a page of Entity View objects that belongs to specified Entity View Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityViewsByEntityGroupId", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "entityGroupId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tenantId", - "in": "query", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -55206,8 +54858,8 @@ "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "minimum": 1 } }, { @@ -55216,14 +54868,14 @@ "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "minimum": 0 } }, { "name": "textSearch", "in": "query", - "description": "The value is not used in searching.", + "description": "The case insensitive 'substring' filter based on the entity view name.", "required": false, "schema": { "type": "string" @@ -55237,8 +54889,9 @@ "schema": { "type": "string", "enum": [ - "ts", - "id" + "createdTime", + "name", + "type" ] } }, @@ -55254,25 +54907,192 @@ "DESC" ] } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityView" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ { - "name": "startTime", + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/entityView": { + "post": { + "tags": [ + "entity-view-controller" + ], + "summary": "Save or update entity view (saveEntityView)", + "description": "Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Entity View entity.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveEntityView", + "parameters": [ + { + "name": "entityGroupId", "in": "query", - "description": "Timestamp. Events with creation time before it won't be queried.", "required": false, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, { - "name": "endTime", + "name": "entityGroupIds", "in": "query", - "description": "Timestamp. Events with creation time after it won't be queried.", + "description": "A list of entity group ids, separated by comma ','", "required": false, "schema": { - "type": "integer", - "format": "int64" + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "nameConflictPolicy", + "in": "query", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", + "required": false, + "schema": { + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" + } + }, + { + "name": "uniquifySeparator", + "in": "query", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", + "required": false, + "schema": { + "type": "string", + "default": "_" + } + }, + { + "name": "uniquifyStrategy", + "in": "query", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "required": false, + "schema": { + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" } } ], @@ -55280,7 +55100,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EventFilter" + "$ref": "#/components/schemas/EntityView" } } }, @@ -55292,7 +55112,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEventInfo" + "$ref": "#/components/schemas/EntityView" } } } @@ -55413,67 +55233,35 @@ ] } }, - "/api/events/{entityType}/{entityId}/clear": { - "post": { + "/api/entityView/info/{entityViewId}": { + "get": { "tags": [ - "event-controller" + "entity-view-controller" ], - "summary": "Clear Events (clearEvents)", - "description": "Clears events by filter for specified entity.", - "operationId": "clearEvents", + "summary": "Get entity view info (getEntityViewInfoById)", + "description": "Fetch the Entity View info object based on the provided entity view id. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewInfoById", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "entityViewId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Events with creation time before it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Events with creation time after it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventFilter" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityViewInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -55487,7 +55275,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -55591,135 +55379,24 @@ ] } }, - "/api/events/{entityType}/{entityId}/{eventType}": { + "/api/entityView/types": { "get": { "tags": [ - "event-controller" - ], - "summary": "Get Events by type (getEventsByType)", - "description": "Returns a page of events for specified entity by specifying event type. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. ", - "operationId": "getEventsByType", - "parameters": [ - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "eventType", - "in": "path", - "description": "A string value representing event type", - "required": true, - "schema": { - "type": "string" - }, - "example": "STATS" - }, - { - "name": "tenantId", - "in": "query", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The value is not used in searching.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ts", - "id" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Events with creation time before it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Events with creation time after it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - } + "entity-view-controller" ], + "summary": "Get Entity View Types (getEntityViewTypes)", + "description": "Returns a set of unique entity view types based on entity views that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEventInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -55840,19 +55517,19 @@ ] } }, - "/api/entityGroup/{entityGroupId}/groupPermissions": { + "/api/entityView/{entityViewId}": { "get": { "tags": [ - "group-permission-controller" + "entity-view-controller" ], - "summary": "Get group permissions by Entity Group Id (getEntityGroupPermissions)", - "description": "Returns a list of group permission objects that is assigned for the specified Entity Group Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getEntityGroupPermissions", + "summary": "Get entity view (getEntityViewById)", + "description": "Fetch the EntityView object based on the provided entity view id. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewById", "parameters": [ { - "name": "entityGroupId", + "name": "entityViewId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -55865,10 +55542,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GroupPermissionInfo" - } + "$ref": "#/components/schemas/EntityView" } } } @@ -55987,36 +55661,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/groupPermission": { - "post": { + }, + "delete": { "tags": [ - "group-permission-controller" + "entity-view-controller" ], - "summary": "Create Or Update Group Permission (saveGroupPermission)", - "description": "Creates or Updates the Group Permission. When creating group permission, platform generates Group Permission Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Group Permission id will be present in the response. Specify existing Group Permission id to update the permission. Referencing non-existing Group Permission Id will cause 'Not Found' error.\n\nGroup permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveGroupPermission", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GroupPermission" - } + "summary": "Delete entity view (deleteEntityView)", + "description": "Delete the EntityView object based on the provided entity view id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteEntityView", + "parameters": [ + { + "name": "entityViewId", + "in": "path", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GroupPermission" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -56030,7 +55696,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -56134,32 +55800,88 @@ ] } }, - "/api/groupPermission/info/{groupPermissionId}": { + "/api/entityViewInfos/all": { "get": { "tags": [ - "group-permission-controller" + "entity-view-controller" ], - "summary": "Get Group Permission Info (getGroupPermissionInfoById)", - "description": "Fetch the Group Permission Info object based on the provided Group Permission Id and the flag that controls what additional information to load: User or Entity Group. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getGroupPermissionInfoById", + "summary": "Get All Entity View Infos for current user (getAllEntityViewInfos)", + "description": "Returns a page of entity view info objects owned by the tenant or the customer of a current user. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllEntityViewInfos", "parameters": [ { - "name": "groupPermissionId", - "in": "path", - "description": "A string value representing the group permission id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "isUserGroup", + "name": "page", "in": "query", - "description": "Load additional information about User('true') or Entity Group('false).", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, "schema": { "type": "boolean" } + }, + { + "name": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -56168,7 +55890,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GroupPermissionInfo" + "$ref": "#/components/schemas/PageDataEntityViewInfo" } } } @@ -56289,32 +56011,34 @@ ] } }, - "/api/groupPermission/{groupPermissionId}": { - "get": { + "/api/entityViews": { + "post": { "tags": [ - "group-permission-controller" + "entity-view-controller" ], - "summary": "Get Group Permission (getGroupPermissionById)", - "description": "Fetch the Group Permission object based on the provided Group Permission Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getGroupPermissionById", - "parameters": [ - { - "name": "groupPermissionId", - "in": "path", - "description": "A string value representing the group permission id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Find related entity views (findEntityViewsByQuery)", + "description": "Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findEntityViewsByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityViewSearchQuery" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GroupPermission" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityView" + } } } } @@ -56331,7 +56055,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -56433,28 +56157,43 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/entityViews/list": { + "get": { "tags": [ - "group-permission-controller" + "entity-view-controller" ], - "summary": "Delete group permission (deleteGroupPermission)", - "description": "Deletes the group permission. Referencing non-existing group permission Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteGroupPermission", + "summary": "Get Entity Views By Ids (getEntityViewsByIds)", + "description": "Requested entity views must be owned by tenant or assigned to customer which user is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getEntityViewsByIds", "parameters": [ { - "name": "groupPermissionId", - "in": "path", - "description": "A string value representing the group permission id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "entityViewIds", + "in": "query", + "description": "A list of entity view ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityView" + } + } + } + } }, "400": { "description": "Bad Request", @@ -56572,38 +56311,32 @@ ] } }, - "/api/userGroup/groupPermissions/info": { - "post": { + "/api/tenant/entityView": { + "get": { "tags": [ - "group-permission-controller" + "entity-view-controller" ], - "summary": "Load User Group Permissions (loadUserGroupPermissionInfos)", - "description": "Enrich a list of group permission objects with the information about Role, User and Entity Groups. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "loadUserGroupPermissionInfos", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "JSON array of group permission objects", - "items": { - "$ref": "#/components/schemas/GroupPermission" - } - } + "summary": "Get Entity View by name (getTenantEntityViewByName)", + "description": "Fetch the Entity View object based on the tenant id and entity view name. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEntityViewByName", + "parameters": [ + { + "name": "entityViewName", + "in": "query", + "description": "Entity View name", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GroupPermissionInfo" - } + "$ref": "#/components/schemas/EntityView" } } } @@ -56620,7 +56353,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -56724,23 +56457,79 @@ ] } }, - "/api/userGroup/{userGroupId}/groupPermissions": { + "/api/tenant/entityViews": { "get": { "tags": [ - "group-permission-controller" + "entity-view-controller" ], - "summary": "Get group permissions by User Group Id (getUserGroupPermissions)", - "description": "Returns a list of group permission objects that belongs to specified User Group Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUserGroupPermissions", + "summary": "Get Tenant Entity Views (getTenantEntityViews)", + "description": "Returns a page of entity views owned by tenant. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEntityViews", "parameters": [ { - "name": "userGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -56749,10 +56538,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GroupPermissionInfo" - } + "$ref": "#/components/schemas/PageDataEntityView" } } } @@ -56873,44 +56659,88 @@ ] } }, - "/api/image": { - "post": { + "/api/user/entityViews": { + "get": { "tags": [ - "image-controller" + "entity-view-controller" ], - "summary": "uploadImage", - "operationId": "uploadImage", - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "title": { - "type": "string" - }, - "imageSubType": { - "type": "string" - } - }, - "required": [ - "file" - ] - } + "summary": "Get Entity Views (getUserEntityViews)", + "description": "Returns a page of entity views that are available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserEntityViews", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } - }, + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "$ref": "#/components/schemas/PageDataEntityView" } } } @@ -56927,7 +56757,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -57031,18 +56861,123 @@ ] } }, - "/api/image/import": { - "put": { + "/api/events/{entityType}/{entityId}": { + "post": { "tags": [ - "image-controller" + "event-controller" + ], + "summary": "Get Events by event filter (getEventsByFilter)", + "description": "Returns a page of events for the chosen entity by specifying the event filter. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n# Event Filter Definition\n\n6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. \n\nNote,\n\n * 'server' - string value representing the server name, identif ier or ip address where the platform is running;\n * 'errorStr' - the case insensitive 'contains' filter based on error message.\n\n## Error Event Filter\n\n```json\n{\n \"eventType\":\"ERROR\",\n \"server\":\"ip-172-31-24-152\",\n \"method\":\"onClusterEventMsg\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'method' - string value representing the method name when the error happened.\n\n## Lifecycle Event Filter\n\n```json\n{\n \"eventType\":\"LC_EVENT\",\n \"server\":\"ip-172-31-24-152\",\n \"event\":\"STARTED\",\n \"status\":\"Success\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'event' - string value representing the lifecycle event type;\n * 'status' - string value representing status of the lifecycle event.\n\n## Statistics Event Filter\n\n```json\n{\n \"eventType\":\"STATS\",\n \"server\":\"ip-172-31-24-152\",\n \"messagesProcessed\":10,\n \"errorsOccurred\":5\n}\n```\n\n * 'messagesProcessed' - the minimum number of successfully processed messages;\n * 'errorsOccurred' - the minimum number of errors occurred during messages processing.\n\n## Debug Rule Node Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_NODE\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n## Debug Rule Chain Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_CHAIN\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity);\n * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message;\n * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message;\n * 'entityName' - string value representing the entity type;\n * 'relationType' - string value representing the type of message routing;\n * 'entityId' - string value representing the entity id in the event body (originator of the message);\n * 'msgType' - string value representing the message type;\n * 'isError' - boolean value to filter the errors.\n\n## Debug Calculated Field Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_CALCULATED_FIELD\",\n \"server\":\"ip-172-31-24-152\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\",\n \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"arguments\":\"{\n \"x\": {\n \"ts\": 1739432016629,\n \"value\": 20\n },\n \"y\": {\n \"ts\": 1739429717656,\n \"value\": 12\n }\n }\",\n \"result\":\"{\n \"x + y\": 32\n }\",\n}\n```\n\n * 'entityId' - string value representing the entity id in the event body;\n * 'entityType' - string value representing the entity type;\n * 'msgId' - string value representing the message id in the rule engine;\n * 'msgType' - string value representing the message type;\n * 'arguments' - string value representing the arguments that were used in the calculation performed;\n * 'result' - string value representing the result of a calculation;\n * 'isError' - boolean value to filter the errors.\n\n", + "operationId": "getEventsByFilter", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tenantId", + "in": "query", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The value is not used in searching.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ts", + "id" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "Timestamp. Events with creation time before it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Events with creation time after it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + } ], - "summary": "importImage", - "operationId": "importImage", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceExportData" + "$ref": "#/components/schemas/EventFilter" } } }, @@ -57054,7 +56989,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "$ref": "#/components/schemas/PageDataEventInfo" } } } @@ -57071,7 +57006,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -57175,105 +57110,68 @@ ] } }, - "/api/images": { - "get": { + "/api/events/{entityType}/{entityId}/clear": { + "post": { "tags": [ - "image-controller" + "event-controller" ], - "summary": "getImages", - "operationId": "getImages", + "summary": "Clear Events (clearEvents)", + "description": "Clears events by filter for specified entity.", + "operationId": "clearEvents", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "imageSubType", - "in": "query", - "description": "A string value representing resource sub-type.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "IMAGE", - "SCADA_SYMBOL" - ] - } - }, - { - "name": "includeSystemImages", - "in": "query", - "description": "Use 'true' to include system images. Disabled by default. Ignored for requests by users with system administrator authority.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the resource title.", - "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", + "name": "startTime", "in": "query", - "description": "Property of entity to sort by", + "description": "Timestamp. Events with creation time before it won't be queried.", "required": false, "schema": { - "type": "string", - "enum": [ - "createdTime", - "title", - "resourceType", - "tenantId" - ] + "type": "integer", + "format": "int64" } }, { - "name": "sortOrder", + "name": "endTime", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Timestamp. Events with creation time after it won't be queried.", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "integer", + "format": "int64" } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataTbResourceInfo" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventFilter" } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -57286,7 +57184,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -57390,47 +57288,135 @@ ] } }, - "/api/images/public/{publicResourceKey}": { + "/api/events/{entityType}/{entityId}/{eventType}": { "get": { "tags": [ - "image-controller" + "event-controller" ], - "summary": "downloadPublicImage", - "operationId": "downloadPublicImage", + "summary": "Get Events by type (getEventsByType)", + "description": "Returns a page of events for specified entity by specifying event type. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. ", + "operationId": "getEventsByType", "parameters": [ { - "name": "publicResourceKey", + "name": "entityType", "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } }, { - "name": "If-None-Match", - "in": "header", - "required": false, + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } }, { - "name": "Accept-Encoding", - "in": "header", + "name": "eventType", + "in": "path", + "description": "A string value representing event type", + "required": true, + "schema": { + "type": "string" + }, + "example": "STATS" + }, + { + "name": "tenantId", + "in": "query", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The value is not used in searching.", "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ts", + "id" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "Timestamp. Events with creation time before it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Events with creation time after it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { "200": { "description": "OK", "content": { - "image/*": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/PageDataEventInfo" } } } @@ -57551,61 +57537,35 @@ ] } }, - "/api/images/{type}/{key}": { + "/api/entityGroup/{entityGroupId}/groupPermissions": { "get": { "tags": [ - "image-controller" + "group-permission-controller" ], - "summary": "downloadImage", - "operationId": "downloadImage", + "summary": "Get group permissions by Entity Group Id (getEntityGroupPermissions)", + "description": "Returns a list of group permission objects that is assigned for the specified Entity Group Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getEntityGroupPermissions", "parameters": [ { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", - "required": true, - "schema": { - "type": "string", - "enum": [ - "tenant", - "system" - ] - } - }, - { - "name": "key", + "name": "entityGroupId", "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "If-None-Match", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "Accept-Encoding", - "in": "header", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { "200": { "description": "OK", "content": { - "image/*": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupPermissionInfo" + } } } } @@ -57724,54 +57684,25 @@ "ApiKeyForm": [] } ] - }, - "put": { + } + }, + "/api/groupPermission": { + "post": { "tags": [ - "image-controller" - ], - "summary": "updateImage", - "operationId": "updateImage", - "parameters": [ - { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", - "required": true, - "schema": { - "type": "string", - "enum": [ - "tenant", - "system" - ] - } - }, - { - "name": "key", - "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", - "required": true, - "schema": { - "type": "string" - } - } + "group-permission-controller" ], + "summary": "Create Or Update Group Permission (saveGroupPermission)", + "description": "Creates or Updates the Group Permission. When creating group permission, platform generates Group Permission Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Group Permission id will be present in the response. Specify existing Group Permission id to update the permission. Referencing non-existing Group Permission Id will cause 'Not Found' error.\n\nGroup permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveGroupPermission", "requestBody": { "content": { - "multipart/form-data": { + "application/json": { "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - }, - "required": [ - "file" - ] + "$ref": "#/components/schemas/GroupPermission" } } - } + }, + "required": true }, "responses": { "200": { @@ -57779,7 +57710,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "$ref": "#/components/schemas/GroupPermission" } } } @@ -57796,7 +57727,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -57898,40 +57829,31 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/groupPermission/info/{groupPermissionId}": { + "get": { "tags": [ - "image-controller" + "group-permission-controller" ], - "summary": "deleteImage", - "operationId": "deleteImage", + "summary": "Get Group Permission Info (getGroupPermissionInfoById)", + "description": "Fetch the Group Permission Info object based on the provided Group Permission Id and the flag that controls what additional information to load: User or Entity Group. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getGroupPermissionInfoById", "parameters": [ { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", - "required": true, - "schema": { - "type": "string", - "enum": [ - "tenant", - "system" - ] - } - }, - { - "name": "key", + "name": "groupPermissionId", "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "description": "A string value representing the group permission id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "force", + "name": "isUserGroup", "in": "query", - "required": false, + "description": "Load additional information about User('true') or Entity Group('false).", + "required": true, "schema": { "type": "boolean" } @@ -57943,7 +57865,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbImageDeleteResult" + "$ref": "#/components/schemas/GroupPermissionInfo" } } } @@ -58064,31 +57986,19 @@ ] } }, - "/api/images/{type}/{key}/export": { + "/api/groupPermission/{groupPermissionId}": { "get": { "tags": [ - "image-controller" + "group-permission-controller" ], - "summary": "exportImage", - "operationId": "exportImage", + "summary": "Get Group Permission (getGroupPermissionById)", + "description": "Fetch the Group Permission object based on the provided Group Permission Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getGroupPermissionById", "parameters": [ { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", - "required": true, - "schema": { - "type": "string", - "enum": [ - "tenant", - "system" - ] - } - }, - { - "name": "key", + "name": "groupPermissionId", "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "description": "A string value representing the group permission id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -58101,7 +58011,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceExportData" + "$ref": "#/components/schemas/GroupPermission" } } } @@ -58220,33 +58130,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/images/{type}/{key}/info": { - "get": { + }, + "delete": { "tags": [ - "image-controller" + "group-permission-controller" ], - "summary": "getImageInfo", - "operationId": "getImageInfo", + "summary": "Delete group permission (deleteGroupPermission)", + "description": "Deletes the group permission. Referencing non-existing group permission Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteGroupPermission", "parameters": [ { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", - "required": true, - "schema": { - "type": "string", - "enum": [ - "tenant", - "system" - ] - } - }, - { - "name": "key", + "name": "groupPermissionId", "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "description": "A string value representing the group permission id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -58255,14 +58151,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TbResourceInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -58378,42 +58267,25 @@ "ApiKeyForm": [] } ] - }, - "put": { + } + }, + "/api/userGroup/groupPermissions/info": { + "post": { "tags": [ - "image-controller" - ], - "summary": "updateImageInfo", - "operationId": "updateImageInfo", - "parameters": [ - { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", - "required": true, - "schema": { - "type": "string", - "enum": [ - "tenant", - "system" - ] - } - }, - { - "name": "key", - "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", - "required": true, - "schema": { - "type": "string" - } - } + "group-permission-controller" ], + "summary": "Load User Group Permissions (loadUserGroupPermissionInfos)", + "description": "Enrich a list of group permission objects with the information about Role, User and Entity Groups. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "loadUserGroupPermissionInfos", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "type": "array", + "description": "JSON array of group permission objects", + "items": { + "$ref": "#/components/schemas/GroupPermission" + } } } }, @@ -58425,7 +58297,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupPermissionInfo" + } } } } @@ -58442,7 +58317,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -58546,61 +58421,35 @@ ] } }, - "/api/images/{type}/{key}/preview": { + "/api/userGroup/{userGroupId}/groupPermissions": { "get": { "tags": [ - "image-controller" + "group-permission-controller" ], - "summary": "downloadImagePreview", - "operationId": "downloadImagePreview", + "summary": "Get group permissions by User Group Id (getUserGroupPermissions)", + "description": "Returns a list of group permission objects that belongs to specified User Group Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserGroupPermissions", "parameters": [ { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", - "required": true, - "schema": { - "type": "string", - "enum": [ - "tenant", - "system" - ] - } - }, - { - "name": "key", + "name": "userGroupId", "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "If-None-Match", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "Accept-Encoding", - "in": "header", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { "200": { "description": "OK", "content": { - "image/png": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupPermissionInfo" + } } } } @@ -58721,45 +58570,37 @@ ] } }, - "/api/images/{type}/{key}/public/{isPublic}": { - "put": { + "/api/image": { + "post": { "tags": [ "image-controller" ], - "summary": "updateImagePublicStatus", - "operationId": "updateImagePublicStatus", - "parameters": [ - { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", - "required": true, - "schema": { - "type": "string", - "enum": [ - "tenant", - "system" - ] - } - }, - { - "name": "key", - "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "isPublic", - "in": "path", - "required": true, - "schema": { - "type": "boolean" + "summary": "uploadImage", + "operationId": "uploadImage", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + }, + "title": { + "type": "string" + }, + "imageSubType": { + "type": "string" + } + }, + "required": [ + "file" + ] + } } } - ], + }, "responses": { "200": { "description": "OK", @@ -58783,7 +58624,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -58887,61 +58728,30 @@ ] } }, - "/api/noauth/whiteLabel/loginFavicon/{type}/{key}": { - "get": { + "/api/image/import": { + "put": { "tags": [ "image-controller" ], - "summary": "downloadLoginFavicon", - "operationId": "downloadLoginFavicon", - "parameters": [ - { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", - "required": true, - "schema": { - "type": "string", - "enum": [ - "tenant", - "system" - ] - } - }, - { - "name": "key", - "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "If-None-Match", - "in": "header", - "required": false, - "schema": { - "type": "string" + "summary": "importImage", + "operationId": "importImage", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceExportData" + } } }, - { - "name": "Accept-Encoding", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { - "image/*": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -59051,53 +58861,102 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/whiteLabel/loginLogo/{type}/{key}": { + "/api/images": { "get": { "tags": [ "image-controller" ], - "summary": "downloadLoginLogo", - "operationId": "downloadLoginLogo", + "summary": "getImages", + "operationId": "getImages", "parameters": [ { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "imageSubType", + "in": "query", + "description": "A string value representing resource sub-type.", + "required": false, "schema": { "type": "string", "enum": [ - "tenant", - "system" + "IMAGE", + "SCADA_SYMBOL" ] } }, { - "name": "key", - "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", - "required": true, + "name": "includeSystemImages", + "in": "query", + "description": "Use 'true' to include system images. Disabled by default. Ignored for requests by users with system administrator authority.", + "required": false, "schema": { - "type": "string" + "type": "boolean" } }, { - "name": "If-None-Match", - "in": "header", + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the resource title.", "required": false, "schema": { "type": "string" } }, { - "name": "Accept-Encoding", - "in": "header", + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "createdTime", + "title", + "resourceType", + "tenantId" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -59105,10 +58964,9 @@ "200": { "description": "OK", "content": { - "image/*": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/PageDataTbResourceInfo" } } } @@ -59218,37 +59076,47 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/edge/integration/{edgeId}/missingAttributes": { + "/api/images/public/{publicResourceKey}": { "get": { "tags": [ - "integration-controller" + "image-controller" ], - "summary": "Find edge missing attributes for assigned integrations (findEdgeMissingAttributes)", - "description": "Returns list of edge attribute names that are missing in assigned integrations.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "findEdgeMissingAttributes", + "summary": "downloadPublicImage", + "operationId": "downloadPublicImage", "parameters": [ { - "name": "edgeId", + "name": "publicResourceKey", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "integrationIds", - "in": "query", - "description": "A list of assigned integration ids, separated by comma ','", - "required": true, + "name": "If-None-Match", + "in": "header", + "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" } } ], @@ -59256,9 +59124,10 @@ "200": { "description": "OK", "content": { - "application/json": { + "image/*": { "schema": { - "type": "string" + "type": "string", + "format": "binary" } } } @@ -59379,32 +59248,61 @@ ] } }, - "/api/edge/integration/{integrationId}/allMissingAttributes": { + "/api/images/{type}/{key}": { "get": { "tags": [ - "integration-controller" + "image-controller" ], - "summary": "Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes)", - "description": "Returns list of attribute names of all related edges that are missing in the integration configuration.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "findAllRelatedEdgesMissingAttributes", + "summary": "downloadImage", + "operationId": "downloadImage", "parameters": [ { - "name": "integrationId", + "name": "type", "in": "path", - "description": "A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "type": "string", + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", "required": true, "schema": { "type": "string" } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { "200": { "description": "OK", "content": { - "application/json": { + "image/*": { "schema": { - "type": "string" + "type": "string", + "format": "binary" } } } @@ -59523,41 +59421,62 @@ "ApiKeyForm": [] } ] - } - }, - "/api/edge/{edgeId}/integration/{integrationId}": { - "post": { + }, + "put": { "tags": [ - "integration-controller" + "image-controller" ], - "summary": "Assign integration to edge (assignIntegrationToEdge)", - "description": "Creates assignment of an existing integration edge template to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once integration will be delivered to edge service, it's going to start locally. \n\nOnly integration edge template can be assigned to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignIntegrationToEdge", + "summary": "updateImage", + "operationId": "updateImage", "parameters": [ { - "name": "edgeId", + "name": "type", "in": "path", + "description": "Type of the image: tenant or system", "required": true, "schema": { - "type": "string" + "type": "string", + "enum": [ + "tenant", + "system" + ] } }, { - "name": "integrationId", + "name": "key", "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + }, + "required": [ + "file" + ] + } + } + } + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Integration" + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -59574,7 +59493,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -59679,27 +59598,40 @@ }, "delete": { "tags": [ - "integration-controller" + "image-controller" ], - "summary": "Unassign integration from edge (unassignIntegrationFromEdge)", - "description": "Clears assignment of the integration to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove integration locally.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "unassignIntegrationFromEdge", + "summary": "deleteImage", + "operationId": "deleteImage", "parameters": [ { - "name": "edgeId", + "name": "type", "in": "path", + "description": "Type of the image: tenant or system", "required": true, "schema": { - "type": "string" + "type": "string", + "enum": [ + "tenant", + "system" + ] } }, { - "name": "integrationId", + "name": "key", "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", "required": true, "schema": { "type": "string" } + }, + { + "name": "force", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -59708,7 +59640,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Integration" + "$ref": "#/components/schemas/TbImageDeleteResult" } } } @@ -59829,84 +59761,34 @@ ] } }, - "/api/edge/{edgeId}/integrationInfos": { + "/api/images/{type}/{key}/export": { "get": { "tags": [ - "integration-controller" + "image-controller" ], - "summary": "Get Edge Integrations (getEdgeIntegrationInfos)", - "description": "Returns a page of Integrations assigned to the specified edge. The integration object contains information about the Integration, including the heavyweight configuration object. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEdgeIntegrationInfos", + "summary": "exportImage", + "operationId": "exportImage", "parameters": [ { - "name": "edgeId", + "name": "type", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "Type of the image: tenant or system", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the integration name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string", "enum": [ - "createdTime", - "name", - "type", - "debugMode", - "allowCreateDevicesOrAssets", - "enabled", - "remote", - "routingKey", - "secret" + "tenant", + "system" ] } }, { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -59916,7 +59798,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataIntegrationInfo" + "$ref": "#/components/schemas/ResourceExportData" } } } @@ -60037,84 +59919,34 @@ ] } }, - "/api/edge/{edgeId}/integrations": { + "/api/images/{type}/{key}/info": { "get": { "tags": [ - "integration-controller" + "image-controller" ], - "summary": "Get Edge Integrations (getEdgeIntegrations)", - "description": "Returns a page of Integrations assigned to the specified edge. The integration object contains information about the Integration, including the heavyweight configuration object. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEdgeIntegrations", + "summary": "getImageInfo", + "operationId": "getImageInfo", "parameters": [ { - "name": "edgeId", + "name": "type", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "Type of the image: tenant or system", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the integration name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string", "enum": [ - "createdTime", - "name", - "type", - "debugMode", - "allowCreateDevicesOrAssets", - "enabled", - "remote", - "routingKey", - "secret" + "tenant", + "system" ] } }, { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -60124,7 +59956,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataIntegration" + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -60243,21 +60075,42 @@ "ApiKeyForm": [] } ] - } - }, - "/api/integration": { - "post": { + }, + "put": { "tags": [ - "integration-controller" + "image-controller" + ], + "summary": "updateImageInfo", + "operationId": "updateImageInfo", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "type": "string", + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Create Or Update Integration (saveIntegration)", - "description": "Create or update the Integration. When creating integration, platform generates Integration Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created integration id will be present in the response. Specify existing Integration id to update the integration. Referencing non-existing integration Id will cause 'Not Found' error. Integration configuration is validated for each type of the integration before it can be created. \n\n# Integration Configuration\n\nIntegration configuration (**'configuration'** field) is the JSON object representing the special configuration per integration type with the connectivity fields and other important parameters dependent on the specific integration type. Let's review the configuration object for the MQTT Integration type below. \n\n```json\n{\n \"clientConfiguration\":{\n \"host\":\"broker.hivemq.com\",\n \"port\":1883,\n \"cleanSession\":false,\n \"ssl\":false,\n \"connectTimeoutSec\":10,\n \"clientId\":\"\",\n \"maxBytesInMessage\":32368,\n \"credentials\":{\n \"type\":\"anonymous\"\n }\n },\n \"downlinkTopicPattern\":\"${topic}\",\n \"topicFilters\":[\n {\n \"filter\":\"tb/mqtt-integration-tutorial/sensors/+/temperature\",\n \"qos\":0\n }\n ],\n \"metadata\":{\n }\n}\n```\n\nRemove 'id', 'tenantId' from the request body example (below) to create new Integration entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveIntegration", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Integration" + "$ref": "#/components/schemas/TbResourceInfo" } } }, @@ -60269,7 +60122,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Integration" + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -60286,7 +60139,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -60390,27 +60243,64 @@ ] } }, - "/api/integration/check": { - "post": { + "/api/images/{type}/{key}/preview": { + "get": { "tags": [ - "integration-controller" + "image-controller" ], - "summary": "Check integration connectivity (checkIntegrationConnection)", - "description": "Checks if the connection to the integration is established. Throws an error if the connection is not established. Example: Failed to connect to MQTT broker at host:port.", - "operationId": "checkIntegrationConnection", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Integration" - } + "summary": "downloadImagePreview", + "operationId": "downloadImagePreview", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "type": "string", + "enum": [ + "tenant", + "system" + ] } }, - "required": true - }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "image/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } }, "400": { "description": "Bad Request", @@ -60424,7 +60314,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -60528,23 +60418,43 @@ ] } }, - "/api/integration/routingKey/{routingKey}": { - "get": { + "/api/images/{type}/{key}/public/{isPublic}": { + "put": { "tags": [ - "integration-controller" + "image-controller" ], - "summary": "Get Integration by Routing Key (getIntegrationByRoutingKey)", - "description": "Fetch the Integration object based on the provided routing key. The server checks that the integration is owned by the same tenant. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getIntegrationByRoutingKey", + "summary": "updateImagePublicStatus", + "operationId": "updateImagePublicStatus", "parameters": [ { - "name": "routingKey", + "name": "type", "in": "path", - "description": "A string value representing the integration routing key. For example, '542047e6-c1b2-112e-a87e-e49247c09d4b'", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "type": "string", + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", "required": true, "schema": { "type": "string" } + }, + { + "name": "isPublic", + "in": "path", + "required": true, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -60553,7 +60463,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Integration" + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -60674,32 +60584,61 @@ ] } }, - "/api/integration/{integrationId}": { + "/api/noauth/whiteLabel/loginFavicon/{type}/{key}": { "get": { "tags": [ - "integration-controller" + "image-controller" ], - "summary": "Get Integration (getIntegrationById)", - "description": "Fetch the Integration object based on the provided Integration Id. The server checks that the integration is owned by the same tenant. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getIntegrationById", + "summary": "downloadLoginFavicon", + "operationId": "downloadLoginFavicon", "parameters": [ { - "name": "integrationId", + "name": "type", "in": "path", - "description": "A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "type": "string", + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", "required": true, "schema": { "type": "string" } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { "200": { "description": "OK", "content": { - "application/json": { + "image/*": { "schema": { - "$ref": "#/components/schemas/Integration" + "type": "string", + "format": "binary" } } } @@ -60809,37 +60748,67 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - }, - "delete": { + } + } + }, + "/api/noauth/whiteLabel/loginLogo/{type}/{key}": { + "get": { "tags": [ - "integration-controller" + "image-controller" ], - "summary": "Delete integration (deleteIntegration)", - "description": "Deletes the integration and all the relations (from and to the integration). Referencing non-existing integration Id will cause an error. \n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteIntegration", + "summary": "downloadLoginLogo", + "operationId": "downloadLoginLogo", "parameters": [ { - "name": "integrationId", + "name": "type", "in": "path", - "description": "A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "type": "string", + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", "required": true, "schema": { "type": "string" } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } }, "400": { "description": "Bad Request", @@ -60946,96 +60915,37 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/integrationInfos": { + "/api/edge/integration/{edgeId}/missingAttributes": { "get": { "tags": [ "integration-controller" ], - "summary": "Get Integration Infos (getIntegrationInfos)", - "description": "Returns a page of integration infos owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getIntegrationInfos", + "summary": "Find edge missing attributes for assigned integrations (findEdgeMissingAttributes)", + "description": "Returns list of edge attribute names that are missing in assigned integrations.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "findEdgeMissingAttributes", "parameters": [ { - "name": "isEdgeTemplate", - "in": "query", - "description": "Fetch edge template integrations", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the integration name.", - "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "debugMode", - "allowCreateDevicesOrAssets", - "enabled", - "remote", - "routingKey", - "secret" - ] - } - }, - { - "name": "sortOrder", + "name": "integrationIds", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "description": "A list of assigned integration ids, separated by comma ','", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "array", + "items": { + "type": "string" + } } } ], @@ -61045,7 +60955,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataIntegrationInfo" + "type": "string" } } } @@ -61166,86 +61076,23 @@ ] } }, - "/api/integrations": { + "/api/edge/integration/{integrationId}/allMissingAttributes": { "get": { "tags": [ "integration-controller" ], - "summary": "Get Integrations (getIntegrations)", - "description": "Returns a page of integrations owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getIntegrations", + "summary": "Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes)", + "description": "Returns list of attribute names of all related edges that are missing in the integration configuration.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "findAllRelatedEdgesMissingAttributes", "parameters": [ { - "name": "isEdgeTemplate", - "in": "query", - "description": "Fetch edge template integrations", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "integrationId", + "in": "path", + "description": "A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the integration name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "debugMode", - "allowCreateDevicesOrAssets", - "enabled", - "remote", - "routingKey", - "secret" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -61254,7 +61101,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataIntegration" + "type": "string" } } } @@ -61375,24 +61222,39 @@ ] } }, - "/api/integrations/converters/info": { - "get": { + "/api/edge/{edgeId}/integration/{integrationId}": { + "post": { "tags": [ "integration-controller" ], - "summary": "Get Integrations Converters info (getIntegrationsConvertersInfo)", - "description": "Returns a JSON object containing information about existing tenant converters and converters available in library. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getIntegrationsConvertersInfo", + "summary": "Assign integration to edge (assignIntegrationToEdge)", + "description": "Creates assignment of an existing integration edge template to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once integration will be delivered to edge service, it's going to start locally. \n\nOnly integration edge template can be assigned to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignIntegrationToEdge", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "integrationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IntegrationConvertersInfo" - } + "$ref": "#/components/schemas/Integration" } } } @@ -61409,7 +61271,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -61511,27 +61373,29 @@ "ApiKeyForm": [] } ] - } - }, - "/api/integrations/list": { - "get": { + }, + "delete": { "tags": [ "integration-controller" ], - "summary": "Get Integrations By Ids (getIntegrationsByIds)", - "description": "Requested integrations must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getIntegrationsByIds", + "summary": "Unassign integration from edge (unassignIntegrationFromEdge)", + "description": "Clears assignment of the integration to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove integration locally.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unassignIntegrationFromEdge", "parameters": [ { - "name": "integrationIds", - "in": "query", - "description": "A list of integration ids, separated by comma ','", + "name": "edgeId", + "in": "path", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" + } + }, + { + "name": "integrationId", + "in": "path", + "required": true, + "schema": { + "type": "string" } } ], @@ -61541,10 +61405,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Integration" - } + "$ref": "#/components/schemas/Integration" } } } @@ -61665,22 +61526,84 @@ ] } }, - "/api/job/{id}": { + "/api/edge/{edgeId}/integrationInfos": { "get": { "tags": [ - "job-controller" + "integration-controller" ], - "summary": "Get job by id (getJobById)", - "description": "Fetches job info by id.\n\nExample of a RUNNING CF_REPROCESSING job response:\n```json\n{\n \"id\": {\n \"entityType\": \"JOB\",\n \"id\": \"475e94e0-2f2d-11f0-8240-91e99922a704\"\n },\n \"createdTime\": 1747053196590,\n \"tenantId\": {\n \"entityType\": \"TENANT\",\n \"id\": \"46859a00-2f2d-11f0-8240-91e99922a704\"\n },\n \"type\": \"CF_REPROCESSING\",\n \"key\": \"474e4130-2f2d-11f0-8240-91e99922a704\",\n \"entityId\": {\n \"entityType\": \"DEVICE_PROFILE\",\n \"id\": \"9fd41f20-31a1-11f0-933e-27998d6db02e\"\n },\n \"status\": \"RUNNING\",\n \"configuration\": {\n \"type\": \"CF_REPROCESSING\",\n \"calculatedFieldId\": {\n \"entityType\": \"CALCULATED_FIELD\",\n \"id\": \"474e4130-2f2d-11f0-8240-91e99922a704\"\n },\n \"startTs\": 1747051995760,\n \"endTs\": 1747052895760,\n \"tasksKey\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\",\n \"toReprocess\": null\n },\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 1,\n \"failedCount\": 0,\n \"discardedCount\": 0,\n \"totalCount\": 2,\n \"results\": [],\n \"generalError\": null,\n \"startTs\": 1747323069445,\n \"finishTs\": 1747323070585,\n \"cancellationTs\": 0\n }\n}\n\n```\n\nExample of a CF_REPROCESSING job with failures:\n```json\n{\n ...,\n \"status\": \"FAILED\",\n ...,\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 0,\n \"failedCount\": 2,\n \"discardedCount\": 0,\n \"totalCount\": 2,\n \"results\": [\n {\n \"jobType\": \"CF_REPROCESSING\",\n \"key\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\",\n \"success\": false,\n \"discarded\": false,\n \"failure\": {\n \"error\": \"Failed to fetch temperature: Failed to fetch timeseries data\",\n \"entityInfo\": {\n \"id\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"9fd41f20-31a1-11f0-933e-27998d6db02e\"\n },\n \"name\": \"Test device 1\"\n }\n }\n },\n {\n \"jobType\": \"CF_REPROCESSING\",\n \"key\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\",\n \"success\": false,\n \"discarded\": false,\n \"failure\": {\n \"error\": \"Failed to fetch temperature: Failed to fetch timeseries data\",\n \"entityInfo\": {\n \"id\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"9ffc4090-31a1-11f0-933e-27998d6db02e\"\n },\n \"name\": \"Test device 2\"\n }\n }\n }\n ],\n \"generalError\": null,\n \"startTs\": 1747323069445,\n \"finishTs\": 1747323070585,\n \"cancellationTs\": 0\n }\n}\n\n```\n\nExample of a FAILED job result with general error:\n```json\n{\n ...,\n \"status\": \"FAILED\",\n ...,\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 1,\n \"failedCount\": 0,\n \"discardedCount\": 0,\n \"totalCount\": null,\n \"results\": [],\n \"generalError\": \"Timeout to find devices by profile\",\n \"cancellationTs\": 0\n }\n}\n\n```\n\nExample of a CANCELLED job result:\n```json\n{\n ...,\n \"status\": \"CANCELLED\",\n ...,\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 15,\n \"failedCount\": 0,\n \"discardedCount\": 85,\n \"totalCount\": 100,\n \"results\": [],\n \"generalError\": null,\n \"cancellationTs\": 1747065908414\n }\n}\n\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getJobById", + "summary": "Get Edge Integrations (getEdgeIntegrationInfos)", + "description": "Returns a page of Integrations assigned to the specified edge. The integration object contains information about the Integration, including the heavyweight configuration object. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEdgeIntegrationInfos", "parameters": [ { - "name": "id", + "name": "edgeId", "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the integration name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, "schema": { "type": "string", - "format": "uuid" + "enum": [ + "createdTime", + "name", + "type", + "debugMode", + "allowCreateDevicesOrAssets", + "enabled", + "remote", + "routingKey", + "secret" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -61690,7 +61613,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Job" + "$ref": "#/components/schemas/PageDataIntegrationInfo" } } } @@ -61809,27 +61732,99 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/edge/{edgeId}/integrations": { + "get": { "tags": [ - "job-controller" + "integration-controller" ], - "summary": "deleteJob", - "operationId": "deleteJob", + "summary": "Get Edge Integrations (getEdgeIntegrations)", + "description": "Returns a page of Integrations assigned to the specified edge. The integration object contains information about the Integration, including the heavyweight configuration object. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEdgeIntegrations", "parameters": [ { - "name": "id", + "name": "edgeId", "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the integration name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, "schema": { "type": "string", - "format": "uuid" + "enum": [ + "createdTime", + "name", + "type", + "debugMode", + "allowCreateDevicesOrAssets", + "enabled", + "remote", + "routingKey", + "secret" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataIntegration" + } + } + } }, "400": { "description": "Bad Request", @@ -61947,28 +61942,34 @@ ] } }, - "/api/job/{id}/cancel": { + "/api/integration": { "post": { "tags": [ - "job-controller" + "integration-controller" ], - "summary": "Cancel job (cancelJob)", - "description": "Cancels the job. The status of the job must be QUEUED, PENDING or RUNNING.\n\nFor a running job, all the tasks not yet processed will be discarded.\n\nSee the example of a cancelled job result in getJobById method description.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "cancelJob", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Create Or Update Integration (saveIntegration)", + "description": "Create or update the Integration. When creating integration, platform generates Integration Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created integration id will be present in the response. Specify existing Integration id to update the integration. Referencing non-existing integration Id will cause 'Not Found' error. Integration configuration is validated for each type of the integration before it can be created. \n\n# Integration Configuration\n\nIntegration configuration (**'configuration'** field) is the JSON object representing the special configuration per integration type with the connectivity fields and other important parameters dependent on the specific integration type. Let's review the configuration object for the MQTT Integration type below. \n\n```json\n{\n \"clientConfiguration\":{\n \"host\":\"broker.hivemq.com\",\n \"port\":1883,\n \"cleanSession\":false,\n \"ssl\":false,\n \"connectTimeoutSec\":10,\n \"clientId\":\"\",\n \"maxBytesInMessage\":32368,\n \"credentials\":{\n \"type\":\"anonymous\"\n }\n },\n \"downlinkTopicPattern\":\"${topic}\",\n \"topicFilters\":[\n {\n \"filter\":\"tb/mqtt-integration-tutorial/sensors/+/temperature\",\n \"qos\":0\n }\n ],\n \"metadata\":{\n }\n}\n```\n\nRemove 'id', 'tenantId' from the request body example (below) to create new Integration entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveIntegration", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } } - } - ], + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + } }, "400": { "description": "Bad Request", @@ -62086,25 +62087,24 @@ ] } }, - "/api/job/{id}/reprocess": { + "/api/integration/check": { "post": { "tags": [ - "job-controller" + "integration-controller" ], - "summary": "Reprocess job (reprocessJob)", - "description": "Reprocesses the job. Failures are located at job.result.results list. Platform iterates over this list and submits new tasks for them. Doesn't create new job entity but updates the existing one. Successfully reprocessed job will look the same as completed one.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "reprocessJob", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Check integration connectivity (checkIntegrationConnection)", + "description": "Checks if the connection to the integration is established. Throws an error if the connection is not established. Example: Failed to connect to MQTT broker at host:port.", + "operationId": "checkIntegrationConnection", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK" @@ -62225,117 +62225,23 @@ ] } }, - "/api/jobs": { + "/api/integration/routingKey/{routingKey}": { "get": { "tags": [ - "job-controller" + "integration-controller" ], - "summary": "Get jobs (getJobs)", - "description": "Returns the page of jobs.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getJobs", + "summary": "Get Integration by Routing Key (getIntegrationByRoutingKey)", + "description": "Fetch the Integration object based on the provided routing key. The server checks that the integration is owned by the same tenant. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrationByRoutingKey", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "routingKey", + "in": "path", + "description": "A string value representing the integration routing key. For example, '542047e6-c1b2-112e-a87e-e49247c09d4b'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on job's description", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "types", - "in": "query", - "description": "Comma-separated list of job types to include. If empty - all job types are included.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "statuses", - "in": "query", - "description": "Comma-separated list of job statuses to include. If empty - all job statuses are included.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "entities", - "in": "query", - "description": "Comma-separated list of entity ids. If empty - jobs for all entities are included.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "startTime", - "in": "query", - "description": "To only include jobs created after this timestamp.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "To only include jobs created before this timestamp.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } } ], "responses": { @@ -62344,7 +62250,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataJob" + "$ref": "#/components/schemas/Integration" } } } @@ -62465,216 +62371,172 @@ ] } }, - "/api/auth/login": { - "post": { + "/api/integration/{integrationId}": { + "get": { "tags": [ - "login-endpoint" + "integration-controller" ], - "summary": "Login method to get user JWT token data", - "description": "Login method used to authenticate user and get JWT token data.\n\nValue of the response **token** field can be used as **X-Authorization** header value:\n\n`X-Authorization: Bearer $JWT_TOKEN_VALUE`.", - "operationId": "login", - "requestBody": { - "description": "Login request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginRequest" - } + "summary": "Get Integration (getIntegrationById)", + "description": "Fetch the Integration object based on the provided Integration Id. The server checks that the integration is owned by the same tenant. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrationById", + "parameters": [ + { + "name": "integrationId", + "in": "path", + "description": "A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LoginResponse" + "$ref": "#/components/schemas/Integration" } } } }, - "401": { - "description": "Unauthorized", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - { - "$ref": "#/components/schemas/ThingsboardCredentialsExpiredResponse" - } - ] + "$ref": "#/components/schemas/ThingsboardErrorResponse" }, "examples": { - "bad-credentials": { - "summary": "Bad credentials", - "value": { - "status": 401, - "message": "Invalid username or password", - "errorCode": 10, - "timestamp": 1609459200000 - } - }, - "token-expired": { - "summary": "JWT token expired", - "value": { - "status": 401, - "message": "Token has expired", - "errorCode": 11, - "timestamp": 1609459200000 - } - }, - "account-disabled": { - "summary": "Disabled account", - "value": { - "status": 401, - "message": "User account is not active", - "errorCode": 10, - "timestamp": 1609459200000 - } - }, - "account-locked": { - "summary": "Locked account", + "error-code-400": { + "summary": "Bad Request", "value": { - "status": 401, - "message": "User account is locked due to security policy", - "errorCode": 10, + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, "timestamp": 1609459200000 } - }, - "authentication-failed": { - "summary": "General authentication error", + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", "value": { "status": 401, "message": "Authentication failed", "errorCode": 10, "timestamp": 1609459200000 } - }, - "credentials-expired": { - "summary": "Expired credentials", - "value": { - "status": 401, - "message": "User password expired!", - "errorCode": 15, - "timestamp": 1609459200000, - "resetToken": "udgDQOpS1Q4ZFEL8qHF9s8cSKQ7d1h" - } } } } } - } - } - } - }, - "/api/auth/token": { - "post": { - "tags": [ - "login-endpoint" - ], - "summary": "Refresh user JWT token data", - "description": "Method to refresh JWT token. Provide a valid refresh token to get a new JWT token.\n\nThe response contains a new token that can be used for authorization.\n\n`X-Authorization: Bearer $JWT_TOKEN_VALUE`", - "operationId": "refreshToken", - "requestBody": { - "description": "Refresh token request", - "content": { - "application/json": { - "schema": { - "properties": { - "refreshToken": {} - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", + }, + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LoginResponse" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } } } } }, - "401": { - "description": "Unauthorized", + "404": { + "description": "Not Found", "content": { "application/json": { "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - { - "$ref": "#/components/schemas/ThingsboardCredentialsExpiredResponse" - } - ] + "$ref": "#/components/schemas/ThingsboardErrorResponse" }, "examples": { - "bad-credentials": { - "summary": "Bad credentials", - "value": { - "status": 401, - "message": "Invalid username or password", - "errorCode": 10, - "timestamp": 1609459200000 - } - }, - "token-expired": { - "summary": "JWT token expired", - "value": { - "status": 401, - "message": "Token has expired", - "errorCode": 11, - "timestamp": 1609459200000 - } - }, - "account-disabled": { - "summary": "Disabled account", - "value": { - "status": 401, - "message": "User account is not active", - "errorCode": 10, - "timestamp": 1609459200000 - } - }, - "account-locked": { - "summary": "Locked account", + "error-code-404": { + "summary": "Not Found", "value": { - "status": 401, - "message": "User account is locked due to security policy", - "errorCode": 10, + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, "timestamp": 1609459200000 } - }, - "authentication-failed": { - "summary": "General authentication error", + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, "timestamp": 1609459200000 } - }, - "credentials-expired": { - "summary": "Expired credentials", - "value": { - "status": 401, - "message": "User password expired!", - "errorCode": 15, - "timestamp": 1609459200000, - "resetToken": "udgDQOpS1Q4ZFEL8qHF9s8cSKQ7d1h" - } } } } } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + }, + "delete": { + "tags": [ + "integration-controller" + ], + "summary": "Delete integration (deleteIntegration)", + "description": "Deletes the integration and all the relations (from and to the integration). Referencing non-existing integration Id will cause an error. \n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteIntegration", + "parameters": [ + { + "name": "integrationId", + "in": "path", + "description": "A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" }, "400": { "description": "Bad Request", @@ -62688,7 +62550,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -62697,6 +62559,27 @@ } } }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, "403": { "description": "Forbidden", "content": { @@ -62760,45 +62643,106 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/lwm2m/device-credentials": { - "post": { + "/api/integrationInfos": { + "get": { "tags": [ - "lwm-2m-controller" + "integration-controller" ], - "summary": "Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials)", - "description": "Deprecated.", - "operationId": "saveLwm2mDeviceWithCredentials", + "summary": "Get Integration Infos (getIntegrationInfos)", + "description": "Returns a page of integration infos owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrationInfos", "parameters": [ { - "name": "entityGroupId", + "name": "isEdgeTemplate", "in": "query", + "description": "Fetch edge template integrations", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the integration name.", "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": {} - } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "debugMode", + "allowCreateDevicesOrAssets", + "enabled", + "remote", + "routingKey", + "secret" + ] } }, - "required": true - }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "$ref": "#/components/schemas/PageDataIntegrationInfo" } } } @@ -62815,7 +62759,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -62919,22 +62863,85 @@ ] } }, - "/api/lwm2m/deviceProfile/bootstrap/{isBootstrapServer}": { + "/api/integrations": { "get": { "tags": [ - "lwm-2m-controller" + "integration-controller" ], - "summary": "Get Lwm2m Bootstrap SecurityInfo (getLwm2mBootstrapSecurityInfo)", - "description": "Get the Lwm2m Bootstrap SecurityInfo object (of the current server) based on the provided isBootstrapServer parameter. If isBootstrapServer == true, get the parameters of the current Bootstrap Server. If isBootstrapServer == false, get the parameters of the current Lwm2m Server. Used for client settings when starting the client in Bootstrap mode. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getLwm2mBootstrapSecurityInfo", + "summary": "Get Integrations (getIntegrations)", + "description": "Returns a page of integrations owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrations", "parameters": [ { - "name": "isBootstrapServer", - "in": "path", - "description": "A Boolean value representing the Server SecurityInfo for future Bootstrap client mode settings. Values: 'true' for Bootstrap Server; 'false' for Lwm2m Server. ", + "name": "isEdgeTemplate", + "in": "query", + "description": "Fetch edge template integrations", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "boolean" + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the integration name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "debugMode", + "allowCreateDevicesOrAssets", + "enabled", + "remote", + "routingKey", + "secret" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -62944,7 +62951,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LwM2MServerSecurityConfigDefault" + "$ref": "#/components/schemas/PageDataIntegration" } } } @@ -63065,21 +63072,24 @@ ] } }, - "/api/mail/config/template": { + "/api/integrations/converters/info": { "get": { "tags": [ - "mail-config-template-controller" + "integration-controller" ], - "summary": "Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "description": "Mail configuration template is set of default smtp settings for mail server that specific provider supports", - "operationId": "getClientRegistrationTemplates", + "summary": "Get Integrations Converters info (getIntegrationsConvertersInfo)", + "description": "Returns a JSON object containing information about existing tenant converters and converters available in library. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getIntegrationsConvertersInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IntegrationConvertersInfo" + } } } } @@ -63200,20 +63210,20 @@ ] } }, - "/api/mobile/bundle": { - "post": { + "/api/integrations/list": { + "get": { "tags": [ - "mobile-app-bundle-controller" + "integration-controller" ], - "summary": "Save Or update Mobile app bundle (saveMobileAppBundle)", - "description": "Create or update the Mobile app bundle that represents tha pair of ANDROID and IOS app and mobile settings like oauth2 clients, self-registration and layout configuration.When creating mobile app bundle, platform generates Mobile App Bundle Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Mobile App Bundle Id will be present in the response. Referencing non-existing Mobile App Bundle Id will cause 'Not Found' error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveMobileAppBundle", + "summary": "Get Integrations By Ids (getIntegrationsByIds)", + "description": "Requested integrations must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrationsByIds", "parameters": [ { - "name": "oauth2ClientIds", + "name": "integrationIds", "in": "query", - "description": "A list of oauth2 client ids, separated by comma ','", - "required": false, + "description": "A list of integration ids, separated by comma ','", + "required": true, "schema": { "type": "array", "items": { @@ -63222,23 +63232,16 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MobileAppBundle" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MobileAppBundle" + "type": "array", + "items": { + "$ref": "#/components/schemas/Integration" + } } } } @@ -63255,7 +63258,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -63359,14 +63362,14 @@ ] } }, - "/api/mobile/bundle/info/{id}": { + "/api/job/{id}": { "get": { "tags": [ - "mobile-app-bundle-controller" + "job-controller" ], - "summary": "Get mobile app bundle info by id (getMobileAppBundleInfoById)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getMobileAppBundleInfoById", + "summary": "Get job by id (getJobById)", + "description": "Fetches job info by id.\n\nExample of a RUNNING CF_REPROCESSING job response:\n```json\n{\n \"id\": {\n \"entityType\": \"JOB\",\n \"id\": \"475e94e0-2f2d-11f0-8240-91e99922a704\"\n },\n \"createdTime\": 1747053196590,\n \"tenantId\": {\n \"entityType\": \"TENANT\",\n \"id\": \"46859a00-2f2d-11f0-8240-91e99922a704\"\n },\n \"type\": \"CF_REPROCESSING\",\n \"key\": \"474e4130-2f2d-11f0-8240-91e99922a704\",\n \"entityId\": {\n \"entityType\": \"DEVICE_PROFILE\",\n \"id\": \"9fd41f20-31a1-11f0-933e-27998d6db02e\"\n },\n \"status\": \"RUNNING\",\n \"configuration\": {\n \"type\": \"CF_REPROCESSING\",\n \"calculatedFieldId\": {\n \"entityType\": \"CALCULATED_FIELD\",\n \"id\": \"474e4130-2f2d-11f0-8240-91e99922a704\"\n },\n \"startTs\": 1747051995760,\n \"endTs\": 1747052895760,\n \"tasksKey\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\",\n \"toReprocess\": null\n },\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 1,\n \"failedCount\": 0,\n \"discardedCount\": 0,\n \"totalCount\": 2,\n \"results\": [],\n \"generalError\": null,\n \"startTs\": 1747323069445,\n \"finishTs\": 1747323070585,\n \"cancellationTs\": 0\n }\n}\n\n```\n\nExample of a CF_REPROCESSING job with failures:\n```json\n{\n ...,\n \"status\": \"FAILED\",\n ...,\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 0,\n \"failedCount\": 2,\n \"discardedCount\": 0,\n \"totalCount\": 2,\n \"results\": [\n {\n \"jobType\": \"CF_REPROCESSING\",\n \"key\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\",\n \"success\": false,\n \"discarded\": false,\n \"failure\": {\n \"error\": \"Failed to fetch temperature: Failed to fetch timeseries data\",\n \"entityInfo\": {\n \"id\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"9fd41f20-31a1-11f0-933e-27998d6db02e\"\n },\n \"name\": \"Test device 1\"\n }\n }\n },\n {\n \"jobType\": \"CF_REPROCESSING\",\n \"key\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\",\n \"success\": false,\n \"discarded\": false,\n \"failure\": {\n \"error\": \"Failed to fetch temperature: Failed to fetch timeseries data\",\n \"entityInfo\": {\n \"id\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"9ffc4090-31a1-11f0-933e-27998d6db02e\"\n },\n \"name\": \"Test device 2\"\n }\n }\n }\n ],\n \"generalError\": null,\n \"startTs\": 1747323069445,\n \"finishTs\": 1747323070585,\n \"cancellationTs\": 0\n }\n}\n\n```\n\nExample of a FAILED job result with general error:\n```json\n{\n ...,\n \"status\": \"FAILED\",\n ...,\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 1,\n \"failedCount\": 0,\n \"discardedCount\": 0,\n \"totalCount\": null,\n \"results\": [],\n \"generalError\": \"Timeout to find devices by profile\",\n \"cancellationTs\": 0\n }\n}\n\n```\n\nExample of a CANCELLED job result:\n```json\n{\n ...,\n \"status\": \"CANCELLED\",\n ...,\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 15,\n \"failedCount\": 0,\n \"discardedCount\": 85,\n \"totalCount\": 100,\n \"results\": [],\n \"generalError\": null,\n \"cancellationTs\": 1747065908414\n }\n}\n\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getJobById", "parameters": [ { "name": "id", @@ -63384,7 +63387,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MobileAppBundleInfo" + "$ref": "#/components/schemas/Job" } } } @@ -63503,75 +63506,27 @@ "ApiKeyForm": [] } ] - } - }, - "/api/mobile/bundle/infos": { - "get": { + }, + "delete": { "tags": [ - "mobile-app-bundle-controller" + "job-controller" ], - "summary": "Get mobile app bundle infos (getTenantMobileAppBundleInfos)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getTenantMobileAppBundleInfos", + "summary": "deleteJob", + "operationId": "deleteJob", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "id", + "in": "path", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on app's name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataMobileAppBundleInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -63689,14 +63644,14 @@ ] } }, - "/api/mobile/bundle/{id}": { - "delete": { + "/api/job/{id}/cancel": { + "post": { "tags": [ - "mobile-app-bundle-controller" + "job-controller" ], - "summary": "Delete Mobile App Bundle by ID (deleteMobileAppBundle)", - "description": "Deletes Mobile App Bundle by ID. Referencing non-existing mobile app bundle Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "deleteMobileAppBundle", + "summary": "Cancel job (cancelJob)", + "description": "Cancels the job. The status of the job must be QUEUED, PENDING or RUNNING.\n\nFor a running job, all the tasks not yet processed will be discarded.\n\nSee the example of a cancelled job result in getJobById method description.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "cancelJob", "parameters": [ { "name": "id", @@ -63724,7 +63679,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -63828,14 +63783,14 @@ ] } }, - "/api/mobile/bundle/{id}/oauth2Clients": { - "put": { + "/api/job/{id}/reprocess": { + "post": { "tags": [ - "mobile-app-bundle-controller" + "job-controller" ], - "summary": "Update oauth2 clients (updateMobileAppBundleOauth2Clients)", - "description": "Update oauth2 clients of the specified mobile app bundle.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "updateMobileAppBundleOauth2Clients", + "summary": "Reprocess job (reprocessJob)", + "description": "Reprocesses the job. Failures are located at job.result.results list. Platform iterates over this list and submits new tasks for them. Doesn't create new job entity but updates the existing one. Successfully reprocessed job will look the same as completed one.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "reprocessJob", "parameters": [ { "name": "id", @@ -63847,20 +63802,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK" @@ -63877,7 +63818,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -63981,35 +63922,116 @@ ] } }, - "/api/mobile": { + "/api/jobs": { "get": { "tags": [ - "mobile-app-controller" + "job-controller" ], - "summary": "Get user mobile app basic info (getUserMobileInfo)", - "description": "\n\nAvailable for any authorized user. ", - "operationId": "getUserMobileInfo", + "summary": "Get jobs (getJobs)", + "description": "Returns the page of jobs.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getJobs", "parameters": [ { - "name": "pkgName", + "name": "pageSize", "in": "query", - "description": "Mobile application package name", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "platform", + "name": "page", "in": "query", - "description": "Platform type", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on job's description", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "types", + "in": "query", + "description": "Comma-separated list of job types to include. If empty - all job types are included.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "statuses", + "in": "query", + "description": "Comma-separated list of job statuses to include. If empty - all job statuses are included.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "entities", + "in": "query", + "description": "Comma-separated list of entity ids. If empty - jobs for all entities are included.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "startTime", + "in": "query", + "description": "To only include jobs created after this timestamp.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "To only include jobs created before this timestamp.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" } } ], @@ -64019,7 +64041,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserMobileInfo" + "$ref": "#/components/schemas/PageDataJob" } } } @@ -64140,120 +64162,235 @@ ] } }, - "/api/mobile/app": { - "get": { + "/api/auth/login": { + "post": { "tags": [ - "mobile-app-controller" + "login-endpoint" ], - "summary": "Get mobile app infos (getTenantMobileApps)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getTenantMobileApps", - "parameters": [ - { - "name": "platformType", - "in": "query", - "description": "Platform type: ANDROID or IOS", - "required": false, - "schema": { - "$ref": "#/components/schemas/PlatformType" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on app's name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" + "summary": "Login method to get user JWT token data", + "description": "Login method used to authenticate user and get JWT token data.\n\nValue of the response **token** field can be used as **X-Authorization** header value:\n\n`X-Authorization: Bearer $JWT_TOKEN_VALUE`.", + "operationId": "login", + "requestBody": { + "description": "Login request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginRequest" + } } } - ], + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataMobileApp" + "$ref": "#/components/schemas/LoginResponse" } } } }, - "400": { - "description": "Bad Request", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" + "oneOf": [ + { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + { + "$ref": "#/components/schemas/ThingsboardCredentialsExpiredResponse" + } + ] }, "examples": { - "error-code-400": { - "summary": "Bad Request", + "bad-credentials": { + "summary": "Bad credentials", "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, + "status": 401, + "message": "Invalid username or password", + "errorCode": 10, "timestamp": 1609459200000 } + }, + "token-expired": { + "summary": "JWT token expired", + "value": { + "status": 401, + "message": "Token has expired", + "errorCode": 11, + "timestamp": 1609459200000 + } + }, + "account-disabled": { + "summary": "Disabled account", + "value": { + "status": 401, + "message": "User account is not active", + "errorCode": 10, + "timestamp": 1609459200000 + } + }, + "account-locked": { + "summary": "Locked account", + "value": { + "status": 401, + "message": "User account is locked due to security policy", + "errorCode": 10, + "timestamp": 1609459200000 + } + }, + "authentication-failed": { + "summary": "General authentication error", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + }, + "credentials-expired": { + "summary": "Expired credentials", + "value": { + "status": 401, + "message": "User password expired!", + "errorCode": 15, + "timestamp": 1609459200000, + "resetToken": "udgDQOpS1Q4ZFEL8qHF9s8cSKQ7d1h" + } } } } } + } + } + } + }, + "/api/auth/token": { + "post": { + "tags": [ + "login-endpoint" + ], + "summary": "Refresh user JWT token data", + "description": "Method to refresh JWT token. Provide a valid refresh token to get a new JWT token.\n\nThe response contains a new token that can be used for authorization.\n\n`X-Authorization: Bearer $JWT_TOKEN_VALUE`", + "operationId": "refreshToken", + "requestBody": { + "description": "Refresh token request", + "content": { + "application/json": { + "schema": { + "properties": { + "refreshToken": { + + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginResponse" + } + } + } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" + "oneOf": [ + { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + { + "$ref": "#/components/schemas/ThingsboardCredentialsExpiredResponse" + } + ] }, "examples": { - "error-code-401": { - "summary": "Unauthorized", + "bad-credentials": { + "summary": "Bad credentials", + "value": { + "status": 401, + "message": "Invalid username or password", + "errorCode": 10, + "timestamp": 1609459200000 + } + }, + "token-expired": { + "summary": "JWT token expired", + "value": { + "status": 401, + "message": "Token has expired", + "errorCode": 11, + "timestamp": 1609459200000 + } + }, + "account-disabled": { + "summary": "Disabled account", + "value": { + "status": 401, + "message": "User account is not active", + "errorCode": 10, + "timestamp": 1609459200000 + } + }, + "account-locked": { + "summary": "Locked account", + "value": { + "status": 401, + "message": "User account is locked due to security policy", + "errorCode": 10, + "timestamp": 1609459200000 + } + }, + "authentication-failed": { + "summary": "General authentication error", "value": { "status": 401, "message": "Authentication failed", "errorCode": 10, "timestamp": 1609459200000 } + }, + "credentials-expired": { + "summary": "Expired credentials", + "value": { + "status": 401, + "message": "User password expired!", + "errorCode": 15, + "timestamp": 1609459200000, + "resetToken": "udgDQOpS1Q4ZFEL8qHF9s8cSKQ7d1h" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid request body", + "errorCode": 31, + "timestamp": 1609459200000 + } } } } @@ -64322,28 +64459,35 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - }, + } + } + }, + "/api/lwm2m/device-credentials": { "post": { "tags": [ - "mobile-app-controller" + "lwm-2m-controller" + ], + "summary": "Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials)", + "description": "Deprecated.", + "operationId": "saveLwm2mDeviceWithCredentials", + "parameters": [ + { + "name": "entityGroupId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } ], - "summary": "Save Or update Mobile app (saveMobileApp)", - "description": "Create or update the Mobile app. When creating mobile app, platform generates Mobile App Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Mobile App Id will be present in the response. Specify existing Mobile App Id to update the mobile app. Referencing non-existing Mobile App Id will cause 'Not Found' error.\n\nThe pair of mobile app package name and platform type is unique for entire platform setup.\n\n\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveMobileApp", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MobileApp" + "type": "object", + "additionalProperties": { + + } } } }, @@ -64355,7 +64499,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MobileApp" + "$ref": "#/components/schemas/Device" } } } @@ -64476,22 +64620,22 @@ ] } }, - "/api/mobile/app/{id}": { + "/api/lwm2m/deviceProfile/bootstrap/{isBootstrapServer}": { "get": { "tags": [ - "mobile-app-controller" + "lwm-2m-controller" ], - "summary": "Get mobile info by id (getMobileAppById)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getMobileAppById", + "summary": "Get Lwm2m Bootstrap SecurityInfo (getLwm2mBootstrapSecurityInfo)", + "description": "Get the Lwm2m Bootstrap SecurityInfo object (of the current server) based on the provided isBootstrapServer parameter. If isBootstrapServer == true, get the parameters of the current Bootstrap Server. If isBootstrapServer == false, get the parameters of the current Lwm2m Server. Used for client settings when starting the client in Bootstrap mode. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getLwm2mBootstrapSecurityInfo", "parameters": [ { - "name": "id", + "name": "isBootstrapServer", "in": "path", + "description": "A Boolean value representing the Server SecurityInfo for future Bootstrap client mode settings. Values: 'true' for Bootstrap Server; 'false' for Lwm2m Server. ", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "boolean" } } ], @@ -64501,7 +64645,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MobileApp" + "$ref": "#/components/schemas/LwM2MServerSecurityConfigDefault" } } } @@ -64620,28 +64764,26 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/mail/config/template": { + "get": { "tags": [ - "mobile-app-controller" - ], - "summary": "Delete Mobile App by ID (deleteMobileApp)", - "description": "Deletes Mobile App by ID. Referencing non-existing mobile app Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "deleteMobileApp", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "mail-config-template-controller" ], + "summary": "Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "description": "Mail configuration template is set of default smtp settings for mail server that specific provider supports", + "operationId": "getClientRegistrationTemplates", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + } }, "400": { "description": "Bad Request", @@ -64759,44 +64901,45 @@ ] } }, - "/api/noauth/mobile": { - "get": { + "/api/mobile/bundle": { + "post": { "tags": [ - "mobile-app-controller" + "mobile-app-bundle-controller" ], - "summary": "Get mobile app login info (getLoginMobileInfo)", - "operationId": "getLoginMobileInfo", + "summary": "Save Or update Mobile app bundle (saveMobileAppBundle)", + "description": "Create or update the Mobile app bundle that represents tha pair of ANDROID and IOS app and mobile settings like oauth2 clients, self-registration and layout configuration.When creating mobile app bundle, platform generates Mobile App Bundle Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Mobile App Bundle Id will be present in the response. Referencing non-existing Mobile App Bundle Id will cause 'Not Found' error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveMobileAppBundle", "parameters": [ { - "name": "pkgName", - "in": "query", - "description": "Mobile application package name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "platform", + "name": "oauth2ClientIds", "in": "query", - "description": "Platform type", - "required": true, + "description": "A list of oauth2 client ids, separated by comma ','", + "required": false, "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] + "type": "array", + "items": { + "type": "string" + } } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MobileAppBundle" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LoginMobileInfo" + "$ref": "#/components/schemas/MobileAppBundle" } } } @@ -64813,7 +64956,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -64906,27 +65049,43 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/notification/deliveryMethods": { + "/api/mobile/bundle/info/{id}": { "get": { "tags": [ - "notification-controller" + "mobile-app-bundle-controller" + ], + "summary": "Get mobile app bundle info by id (getMobileAppBundleInfoById)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getMobileAppBundleInfoById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - "summary": "Get available delivery methods (getAvailableDeliveryMethods)", - "description": "Returns the list of delivery methods that are properly configured and are allowed to be used for sending notifications.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getAvailableDeliveryMethods", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationDeliveryMethod" - } + "$ref": "#/components/schemas/MobileAppBundleInfo" } } } @@ -65047,40 +65206,73 @@ ] } }, - "/api/notification/entitiesLimitIncreaseRequest/{entityType}": { - "post": { + "/api/mobile/bundle/infos": { + "get": { "tags": [ - "notification-controller" + "mobile-app-bundle-controller" ], - "summary": "Send entity limit increase request notification to System/Tenant administrators (sendEntitiesLimitIncreaseRequest)", - "description": "Send entity limit increase request notification by Tenant Administrator or Customer User to System/Tenant administrators.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "sendEntitiesLimitIncreaseRequest", + "summary": "Get mobile app bundle infos (getTenantMobileAppBundleInfos)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getTenantMobileAppBundleInfos", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "Entity type", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string", - "enum": [ - "DEVICE", - "ASSET", - "CUSTOMER", - "USER", - "DASHBOARD", - "RULE_CHAIN", - "EDGE", - "INTEGRATION", - "CONVERTER", - "SCHEDULER_EVENT" - ] + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on app's name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataMobileAppBundleInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -65094,7 +65286,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -65198,34 +65390,28 @@ ] } }, - "/api/notification/request": { - "post": { + "/api/mobile/bundle/{id}": { + "delete": { "tags": [ - "notification-controller" + "mobile-app-bundle-controller" ], - "summary": "Create notification request (createNotificationRequest)", - "description": "Processes notification request.\nMandatory request properties are `targets` (list of targets ids to send notification to), and either `templateId` (existing notification template id) or `template` (to send notification without saving the template).\nOptionally, you can set `sendingDelayInSec` inside the `additionalConfig` field to schedule the notification.\n\nFor each enabled delivery method in the notification template, there must be a target in the `targets` list that supports this delivery method: if you chose `WEB`, `EMAIL` or `SMS` - there must be at least one target in `targets` of `PLATFORM_USERS` type.\nFor `SLACK` delivery method - you need to chose at least one `SLACK` notification target.\n\nNotification request object with `PROCESSING` status will be returned immediately, and the notification sending itself is done asynchronously. After all notifications are sent, the `status` of the request becomes `SENT`. Use `getNotificationRequestById` to see the notification request processing status and some sending stats. \n\nHere is an example of notification request to one target using saved template:\n```json\n{\n \"templateId\": {\n \"entityType\": \"NOTIFICATION_TEMPLATE\",\n \"id\": \"6dbc3670-e4dd-11ed-9401-dbcc5dff78be\"\n },\n \"targets\": [\n \"320e3ed0-d785-11ed-a06c-21dd57dd88ca\"\n ],\n \"additionalConfig\": {\n \"sendingDelayInSec\": 0\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "createNotificationRequest", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationRequest" - } + "summary": "Delete Mobile App Bundle by ID (deleteMobileAppBundle)", + "description": "Deletes Mobile App Bundle by ID. Referencing non-existing mobile app bundle Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteMobileAppBundle", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" } - }, - "required": true - }, + } + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationRequest" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -65239,7 +65425,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -65343,24 +65529,22 @@ ] } }, - "/api/notification/request/preview": { - "post": { + "/api/mobile/bundle/{id}/oauth2Clients": { + "put": { "tags": [ - "notification-controller" + "mobile-app-bundle-controller" ], - "summary": "Get notification request preview (getNotificationRequestPreview)", - "description": "Returns preview for notification request.\n\n`processedTemplates` shows how the notifications for each delivery method will look like for the first recipient of the corresponding notification target.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationRequestPreview", + "summary": "Update oauth2 clients (updateMobileAppBundleOauth2Clients)", + "description": "Update oauth2 clients of the specified mobile app bundle.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "updateMobileAppBundleOauth2Clients", "parameters": [ { - "name": "recipientsPreviewSize", - "in": "query", - "description": "Amount of the recipients to show in preview", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 20 + "type": "string", + "format": "uuid" } } ], @@ -65368,7 +65552,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationRequest" + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } } } }, @@ -65376,14 +65564,7 @@ }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationRequestPreview" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -65397,7 +65578,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -65501,22 +65682,35 @@ ] } }, - "/api/notification/request/{id}": { + "/api/mobile": { "get": { "tags": [ - "notification-controller" + "mobile-app-controller" ], - "summary": "Get notification request by id (getNotificationRequestById)", - "description": "Fetches notification request info by request id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationRequestById", + "summary": "Get user mobile app basic info (getUserMobileInfo)", + "description": "\n\nAvailable for any authorized user. ", + "operationId": "getUserMobileInfo", "parameters": [ { - "name": "id", - "in": "path", + "name": "pkgName", + "in": "query", + "description": "Mobile application package name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", "required": true, "schema": { "type": "string", - "format": "uuid" + "enum": [ + "ANDROID", + "IOS" + ] } } ], @@ -65526,7 +65720,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationRequestInfo" + "$ref": "#/components/schemas/UserMobileInfo" } } } @@ -65645,154 +65839,26 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/mobile/app": { + "get": { "tags": [ - "notification-controller" + "mobile-app-controller" ], - "summary": "Delete notification request (deleteNotificationRequest)", - "description": "Deletes notification request by its id.\n\nIf the request has status `SENT` - all sent notifications for this request will be deleted. If it is `SCHEDULED`, the request will be cancelled.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "deleteNotificationRequest", + "summary": "Get mobile app infos (getTenantMobileApps)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getTenantMobileApps", "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "platformType", + "in": "query", + "description": "Platform type: ANDROID or IOS", + "required": false, "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } + "$ref": "#/components/schemas/PlatformType" } - } - }, - "security": [ - { - "HttpLoginForm": [] }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/notification/requests": { - "get": { - "tags": [ - "notification-controller" - ], - "summary": "Get notification requests (getNotificationRequests)", - "description": "Returns the page of notification requests submitted by users of this tenant or sysadmins.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationRequests", - "parameters": [ { "name": "pageSize", "in": "query", @@ -65816,7 +65882,7 @@ { "name": "textSearch", "in": "query", - "description": "Case-insensitive 'substring' filed based on the used template name", + "description": "Case-insensitive 'substring' filter based on app's name", "required": false, "schema": { "type": "string" @@ -65847,7 +65913,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataNotificationRequestInfo" + "$ref": "#/components/schemas/PageDataMobileApp" } } } @@ -65966,35 +66032,34 @@ "ApiKeyForm": [] } ] - } - }, - "/api/notification/sendAddonAccessError/{addonType}": { + }, "post": { "tags": [ - "notification-controller" + "mobile-app-controller" ], - "summary": "Send add-on access error notification to System/Tenant administrators (sendAddonAccessError)", - "description": "Send add-on access error notification by Tenant Administrator or Customer User to System/Tenant administrators.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "sendAddonAccessError", - "parameters": [ - { - "name": "addonType", - "in": "path", - "description": "Addon type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "EDGE", - "TRENDZ", - "WHITE_LABELING" - ] + "summary": "Save Or update Mobile app (saveMobileApp)", + "description": "Create or update the Mobile app. When creating mobile app, platform generates Mobile App Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Mobile App Id will be present in the response. Specify existing Mobile App Id to update the mobile app. Referencing non-existing Mobile App Id will cause 'Not Found' error.\n\nThe pair of mobile app package name and platform type is unique for entire platform setup.\n\n\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveMobileApp", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MobileApp" + } } - } - ], + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MobileApp" + } + } + } }, "400": { "description": "Bad Request", @@ -66112,21 +66177,32 @@ ] } }, - "/api/notification/settings": { + "/api/mobile/app/{id}": { "get": { "tags": [ - "notification-controller" + "mobile-app-controller" + ], + "summary": "Get mobile info by id (getMobileAppById)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getMobileAppById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - "summary": "Get notification settings (getNotificationSettings)", - "description": "Retrieves notification settings for this tenant or sysadmin.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationSettings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationSettings" + "$ref": "#/components/schemas/MobileApp" } } } @@ -66246,33 +66322,27 @@ } ] }, - "post": { + "delete": { "tags": [ - "notification-controller" + "mobile-app-controller" ], - "summary": "Save notification settings (saveNotificationSettings)", - "description": "Saves notification settings for this tenant or sysadmin.\n`deliveryMethodsConfigs` of the settings must be specified.\n\nHere is an example of the notification settings with Slack configuration:\n```json\n{\n \"deliveryMethodsConfigs\": {\n \"SLACK\": {\n \"method\": \"SLACK\",\n \"botToken\": \"xoxb-....\"\n }\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveNotificationSettings", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationSettings" - } + "summary": "Delete Mobile App by ID (deleteMobileApp)", + "description": "Deletes Mobile App by ID. Referencing non-existing mobile app Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteMobileApp", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" } - }, - "required": true - }, + } + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationSettings" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -66286,7 +66356,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -66390,20 +66460,44 @@ ] } }, - "/api/notification/settings/user": { + "/api/noauth/mobile": { "get": { "tags": [ - "notification-controller" + "mobile-app-controller" + ], + "summary": "Get mobile app login info (getLoginMobileInfo)", + "operationId": "getLoginMobileInfo", + "parameters": [ + { + "name": "pkgName", + "in": "query", + "description": "Mobile application package name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ANDROID", + "IOS" + ] + } + } ], - "summary": "getUserNotificationSettings", - "operationId": "getUserNotificationSettings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserNotificationSettings" + "$ref": "#/components/schemas/LoginMobileInfo" } } } @@ -66513,39 +66607,27 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - }, - "post": { + } + } + }, + "/api/notification/deliveryMethods": { + "get": { "tags": [ "notification-controller" ], - "summary": "saveUserNotificationSettings", - "operationId": "saveUserNotificationSettings", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserNotificationSettings" - } - } - }, - "required": true - }, + "summary": "Get available delivery methods (getAvailableDeliveryMethods)", + "description": "Returns the list of delivery methods that are properly configured and are allowed to be used for sending notifications.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getAvailableDeliveryMethods", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserNotificationSettings" + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationDeliveryMethod" + } } } } @@ -66562,7 +66644,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -66666,22 +66748,34 @@ ] } }, - "/api/notification/{id}": { - "delete": { + "/api/notification/entitiesLimitIncreaseRequest/{entityType}": { + "post": { "tags": [ "notification-controller" ], - "summary": "Delete notification (deleteNotification)", - "description": "Deletes notification by its id.\n\nAvailable for any authorized user. ", - "operationId": "deleteNotification", + "summary": "Send entity limit increase request notification to System/Tenant administrators (sendEntitiesLimitIncreaseRequest)", + "description": "Send entity limit increase request notification by Tenant Administrator or Customer User to System/Tenant administrators.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "sendEntitiesLimitIncreaseRequest", "parameters": [ { - "name": "id", + "name": "entityType", "in": "path", + "description": "Entity type", "required": true, "schema": { "type": "string", - "format": "uuid" + "enum": [ + "DEVICE", + "ASSET", + "CUSTOMER", + "USER", + "DASHBOARD", + "RULE_CHAIN", + "EDGE", + "INTEGRATION", + "CONVERTER", + "SCHEDULER_EVENT" + ] } } ], @@ -66701,7 +66795,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -66805,28 +66899,34 @@ ] } }, - "/api/notification/{id}/read": { - "put": { + "/api/notification/request": { + "post": { "tags": [ "notification-controller" ], - "summary": "Mark notification as read (markNotificationAsRead)", - "description": "Marks notification as read by its id.\n\nAvailable for any authorized user. ", - "operationId": "markNotificationAsRead", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Create notification request (createNotificationRequest)", + "description": "Processes notification request.\nMandatory request properties are `targets` (list of targets ids to send notification to), and either `templateId` (existing notification template id) or `template` (to send notification without saving the template).\nOptionally, you can set `sendingDelayInSec` inside the `additionalConfig` field to schedule the notification.\n\nFor each enabled delivery method in the notification template, there must be a target in the `targets` list that supports this delivery method: if you chose `WEB`, `EMAIL` or `SMS` - there must be at least one target in `targets` of `PLATFORM_USERS` type.\nFor `SLACK` delivery method - you need to chose at least one `SLACK` notification target.\n\nNotification request object with `PROCESSING` status will be returned immediately, and the notification sending itself is done asynchronously. After all notifications are sent, the `status` of the request becomes `SENT`. Use `getNotificationRequestById` to see the notification request processing status and some sending stats. \n\nHere is an example of notification request to one target using saved template:\n```json\n{\n \"templateId\": {\n \"entityType\": \"NOTIFICATION_TEMPLATE\",\n \"id\": \"6dbc3670-e4dd-11ed-9401-dbcc5dff78be\"\n },\n \"targets\": [\n \"320e3ed0-d785-11ed-a06c-21dd57dd88ca\"\n ],\n \"additionalConfig\": {\n \"sendingDelayInSec\": 0\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "createNotificationRequest", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationRequest" + } + } + } }, "400": { "description": "Bad Request", @@ -66840,7 +66940,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -66944,93 +67044,44 @@ ] } }, - "/api/notifications": { - "get": { + "/api/notification/request/preview": { + "post": { "tags": [ "notification-controller" ], - "summary": "Get notifications (getNotifications)", - "description": "Returns the page of notifications for current user.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for any authorized user. \n\n**WebSocket API**:\n\nThere are 2 types of subscriptions: one for unread notifications count, another for unread notifications themselves.\n\nThe URI for opening WS session for notifications: `/api/ws/plugins/notifications`.\n\nSubscription command for unread notifications count:\n```\n{\n \"unreadCountSubCmd\": {\n \"cmdId\": 1234\n }\n}\n```\nTo subscribe for latest unread notifications:\n```\n{\n \"unreadSubCmd\": {\n \"cmdId\": 1234,\n \"limit\": 10\n }\n}\n```\nTo unsubscribe from any subscription:\n```\n{\n \"unsubCmd\": {\n \"cmdId\": 1234\n }\n}\n```\nTo mark certain notifications as read, use following command:\n```\n{\n \"markAsReadCmd\": {\n \"cmdId\": 1234,\n \"notifications\": [\n \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\",\n \"5b6dfee0-8d0d-11ed-b61f-35a57b03dade\"\n ]\n }\n}\n\n```\nTo mark all notifications as read:\n```\n{\n \"markAllAsReadCmd\": {\n \"cmdId\": 1234\n }\n}\n```\n\n\nUpdate structure for unread **notifications count subscription**:\n```\n{\n \"cmdId\": 1234,\n \"totalUnreadCount\": 55\n}\n```\nFor **notifications subscription**:\n- full update of latest unread notifications:\n```\n{\n \"cmdId\": 1234,\n \"notifications\": [\n {\n \"id\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\"\n },\n ...\n }\n ],\n \"totalUnreadCount\": 1\n}\n```\n- when new notification arrives or shown notification is updated:\n```\n{\n \"cmdId\": 1234,\n \"update\": {\n \"id\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\"\n },\n # updated notification info, text, subject etc.\n ...\n },\n \"totalUnreadCount\": 2\n}\n```\n- when unread notifications count changes:\n```\n{\n \"cmdId\": 1234,\n \"totalUnreadCount\": 5\n}\n```", - "operationId": "getNotifications", + "summary": "Get notification request preview (getNotificationRequestPreview)", + "description": "Returns preview for notification request.\n\n`processedTemplates` shows how the notifications for each delivery method will look like for the first recipient of the corresponding notification target.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationRequestPreview", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on notification subject or text", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "unreadOnly", - "in": "query", - "description": "To search for unread notifications only", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "deliveryMethod", + "name": "recipientsPreviewSize", "in": "query", - "description": "Delivery method", + "description": "Amount of the recipients to show in preview", "required": false, "schema": { - "type": "string", - "enum": [ - "WEB", - "MOBILE_APP" - ] + "type": "integer", + "format": "int32", + "default": 20 } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataNotification" + "$ref": "#/components/schemas/NotificationRequestPreview" } } } @@ -67047,7 +67098,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -67151,32 +67202,35 @@ ] } }, - "/api/notifications/read": { - "put": { + "/api/notification/request/{id}": { + "get": { "tags": [ "notification-controller" ], - "summary": "Mark all notifications as read (markAllNotificationsAsRead)", - "description": "Marks all unread notifications as read.\n\nAvailable for any authorized user. ", - "operationId": "markAllNotificationsAsRead", + "summary": "Get notification request by id (getNotificationRequestById)", + "description": "Fetches notification request info by request id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationRequestById", "parameters": [ { - "name": "deliveryMethod", - "in": "query", - "description": "Delivery method", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { "type": "string", - "enum": [ - "WEB", - "MOBILE_APP" - ] + "format": "uuid" } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationRequestInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -67292,42 +67346,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/notifications/unread/count": { - "get": { + }, + "delete": { "tags": [ "notification-controller" ], - "summary": "Get unread notifications count (getUnreadNotificationsCount)", - "description": "Returns unread notifications count for chosen delivery method.\n\nAvailable for any authorized user. ", - "operationId": "getUnreadNotificationsCount", + "summary": "Delete notification request (deleteNotificationRequest)", + "description": "Deletes notification request by its id.\n\nIf the request has status `SENT` - all sent notifications for this request will be deleted. If it is `SCHEDULED`, the request will be cancelled.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteNotificationRequest", "parameters": [ { - "name": "deliveryMethod", - "in": "query", - "description": "Delivery method", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { "type": "string", - "enum": [ - "WEB", - "MOBILE_APP" - ] + "format": "uuid" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -67445,31 +67485,70 @@ ] } }, - "/api/notification/rule": { - "post": { + "/api/notification/requests": { + "get": { "tags": [ - "notification-rule-controller" + "notification-controller" ], - "summary": "Save notification rule (saveNotificationRule)", - "description": "Creates or updates notification rule. \n\nMandatory properties are `name`, `templateId` (of a template with `notificationType` matching to rule's `triggerType`), `triggerType`, `triggerConfig` and `recipientConfig`. Additionally, you may specify rule `description` inside of `additionalConfig`.\n\nTrigger type of the rule cannot be changed. Available trigger types for tenant: `ENTITY_ACTION`, `ALARM`, `ALARM_COMMENT`, `ALARM_ASSIGNMENT`, `DEVICE_ACTIVITY`, `RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT`.\nFor sysadmin, there are following trigger types available: `ENTITIES_LIMIT`, `API_USAGE_LIMIT`, `NEW_PLATFORM_VERSION`.\n\nHere is an example of notification rule to send notification when a device, asset or customer is created or deleted:\n```json\n{\n \"name\": \"Entity action\",\n \"templateId\": {\n \"entityType\": \"NOTIFICATION_TEMPLATE\",\n \"id\": \"32117320-d785-11ed-a06c-21dd57dd88ca\"\n },\n \"triggerType\": \"ENTITY_ACTION\",\n \"triggerConfig\": {\n \"entityTypes\": [\n \"CUSTOMER\",\n \"DEVICE\",\n \"ASSET\"\n ],\n \"created\": true,\n \"updated\": false,\n \"deleted\": true,\n \"triggerType\": \"ENTITY_ACTION\"\n },\n \"recipientsConfig\": {\n \"targets\": [\n \"320f2930-d785-11ed-a06c-21dd57dd88ca\"\n ],\n \"triggerType\": \"ENTITY_ACTION\"\n },\n \"additionalConfig\": {\n \"description\": \"Send notification to tenant admins or customer users when a device, asset or customer is created\"\n },\n \"templateName\": \"Entity action notification\",\n \"deliveryMethods\": [\n \"WEB\"\n ]\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveNotificationRule", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationRule" - } + "summary": "Get notification requests (getNotificationRequests)", + "description": "Returns the page of notification requests submitted by users of this tenant or sysadmins.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationRequests", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filed based on the used template name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationRule" + "$ref": "#/components/schemas/PageDataNotificationRequestInfo" } } } @@ -67486,7 +67565,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -67590,35 +67669,33 @@ ] } }, - "/api/notification/rule/{id}": { - "get": { + "/api/notification/sendAddonAccessError/{addonType}": { + "post": { "tags": [ - "notification-rule-controller" + "notification-controller" ], - "summary": "Get notification rule by id (getNotificationRuleById)", - "description": "Fetches notification rule info by rule's id.\nIn addition to regular notification rule fields, there are `templateName` and `deliveryMethods` in the response.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationRuleById", + "summary": "Send add-on access error notification to System/Tenant administrators (sendAddonAccessError)", + "description": "Send add-on access error notification by Tenant Administrator or Customer User to System/Tenant administrators.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "sendAddonAccessError", "parameters": [ { - "name": "id", + "name": "addonType", "in": "path", + "description": "Addon type", "required": true, "schema": { "type": "string", - "format": "uuid" + "enum": [ + "EDGE", + "TRENDZ", + "WHITE_LABELING" + ] } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationRuleInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -67632,7 +67709,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -67734,28 +67811,26 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/notification/settings": { + "get": { "tags": [ - "notification-rule-controller" - ], - "summary": "Delete notification rule (deleteNotificationRule)", - "description": "Deletes notification rule by id.\nCancels all related scheduled notification requests (e.g. due to escalation table)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "deleteNotificationRule", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "notification-controller" ], + "summary": "Get notification settings (getNotificationSettings)", + "description": "Retrieves notification settings for this tenant or sysadmin.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationSettings", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationSettings" + } + } + } }, "400": { "description": "Bad Request", @@ -67871,72 +67946,31 @@ "ApiKeyForm": [] } ] - } - }, - "/api/notification/rules": { - "get": { + }, + "post": { "tags": [ - "notification-rule-controller" + "notification-controller" ], - "summary": "Get notification rules (getNotificationRules)", - "description": "Returns the page of notification rules.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationRules", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on rule's name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" + "summary": "Save notification settings (saveNotificationSettings)", + "description": "Saves notification settings for this tenant or sysadmin.\n`deliveryMethodsConfigs` of the settings must be specified.\n\nHere is an example of the notification settings with Slack configuration:\n```json\n{\n \"deliveryMethodsConfigs\": {\n \"SLACK\": {\n \"method\": \"SLACK\",\n \"botToken\": \"xoxb-....\"\n }\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveNotificationSettings", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationSettings" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataNotificationRuleInfo" + "$ref": "#/components/schemas/NotificationSettings" } } } @@ -67953,7 +67987,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -68057,31 +68091,20 @@ ] } }, - "/api/notification/target": { - "post": { + "/api/notification/settings/user": { + "get": { "tags": [ - "notification-target-controller" + "notification-controller" ], - "summary": "Save notification target (saveNotificationTarget)", - "description": "Creates or updates notification target.\n\nAvailable `configuration` types are `PLATFORM_USERS` and `SLACK`.\nFor `PLATFORM_USERS` the `usersFilter` must be specified. For tenant, there are following users filter types available: `USER_LIST`, `CUSTOMER_USERS`, `USER_GROUP_LIST`, `TENANT_ADMINISTRATORS`, `USER_ROLE`, `ALL_USERS`, `ORIGINATOR_ENTITY_OWNER_USERS`, `AFFECTED_USER`.\nFor sysadmin: `TENANT_ADMINISTRATORS`, `AFFECTED_TENANT_ADMINISTRATORS`, `SYSTEM_ADMINISTRATORS`, `ALL_USERS`.\n\nHere is an example of tenant-level notification target to send notification to customer's users:\n```json\n{\n \"name\": \"Users of Customer A\",\n \"configuration\": {\n \"type\": \"PLATFORM_USERS\",\n \"usersFilter\": {\n \"type\": \"CUSTOMER_USERS\",\n \"customerId\": \"32499a20-d785-11ed-a06c-21dd57dd88ca\"\n },\n \"description\": \"Users of Customer A\"\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveNotificationTarget", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationTarget" - } - } - }, - "required": true - }, + "summary": "getUserNotificationSettings", + "operationId": "getUserNotificationSettings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationTarget" + "$ref": "#/components/schemas/UserNotificationSettings" } } } @@ -68098,7 +68121,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -68200,43 +68223,18 @@ "ApiKeyForm": [] } ] - } - }, - "/api/notification/target/recipients": { + }, "post": { "tags": [ - "notification-target-controller" - ], - "summary": "Get recipients for notification target config (getRecipientsForNotificationTargetConfig)", - "description": "Returns the page of recipients for such notification target configuration.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getRecipientsForNotificationTargetConfig", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } + "notification-controller" ], + "summary": "saveUserNotificationSettings", + "operationId": "saveUserNotificationSettings", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationTarget" + "$ref": "#/components/schemas/UserNotificationSettings" } } }, @@ -68248,7 +68246,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataUser" + "$ref": "#/components/schemas/UserNotificationSettings" } } } @@ -68369,14 +68367,14 @@ ] } }, - "/api/notification/target/{id}": { - "get": { + "/api/notification/{id}": { + "delete": { "tags": [ - "notification-target-controller" + "notification-controller" ], - "summary": "Get notification target by id (getNotificationTargetById)", - "description": "Fetches notification target by id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTargetById", + "summary": "Delete notification (deleteNotification)", + "description": "Deletes notification by its id.\n\nAvailable for any authorized user. ", + "operationId": "deleteNotification", "parameters": [ { "name": "id", @@ -68390,14 +68388,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationTarget" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -68513,14 +68504,16 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/notification/{id}/read": { + "put": { "tags": [ - "notification-target-controller" + "notification-controller" ], - "summary": "Delete notification target by id (deleteNotificationTargetById)", - "description": "Deletes notification target by its id.\n\nThis target cannot be referenced by existing scheduled notification requests or any notification rules.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "deleteNotificationTargetById", + "summary": "Mark notification as read (markNotificationAsRead)", + "description": "Marks notification as read by its id.\n\nAvailable for any authorized user. ", + "operationId": "markNotificationAsRead", "parameters": [ { "name": "id", @@ -68652,14 +68645,14 @@ ] } }, - "/api/notification/targets": { + "/api/notifications": { "get": { "tags": [ - "notification-target-controller" + "notification-controller" ], - "summary": "Get notification targets (getNotificationTargets)", - "description": "Returns the page of notification targets owned by sysadmin or tenant.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTargets", + "summary": "Get notifications (getNotifications)", + "description": "Returns the page of notifications for current user.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for any authorized user. \n\n**WebSocket API**:\n\nThere are 2 types of subscriptions: one for unread notifications count, another for unread notifications themselves.\n\nThe URI for opening WS session for notifications: `/api/ws/plugins/notifications`.\n\nSubscription command for unread notifications count:\n```\n{\n \"unreadCountSubCmd\": {\n \"cmdId\": 1234\n }\n}\n```\nTo subscribe for latest unread notifications:\n```\n{\n \"unreadSubCmd\": {\n \"cmdId\": 1234,\n \"limit\": 10\n }\n}\n```\nTo unsubscribe from any subscription:\n```\n{\n \"unsubCmd\": {\n \"cmdId\": 1234\n }\n}\n```\nTo mark certain notifications as read, use following command:\n```\n{\n \"markAsReadCmd\": {\n \"cmdId\": 1234,\n \"notifications\": [\n \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\",\n \"5b6dfee0-8d0d-11ed-b61f-35a57b03dade\"\n ]\n }\n}\n\n```\nTo mark all notifications as read:\n```\n{\n \"markAllAsReadCmd\": {\n \"cmdId\": 1234\n }\n}\n```\n\n\nUpdate structure for unread **notifications count subscription**:\n```\n{\n \"cmdId\": 1234,\n \"totalUnreadCount\": 55\n}\n```\nFor **notifications subscription**:\n- full update of latest unread notifications:\n```\n{\n \"cmdId\": 1234,\n \"notifications\": [\n {\n \"id\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\"\n },\n ...\n }\n ],\n \"totalUnreadCount\": 1\n}\n```\n- when new notification arrives or shown notification is updated:\n```\n{\n \"cmdId\": 1234,\n \"update\": {\n \"id\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\"\n },\n # updated notification info, text, subject etc.\n ...\n },\n \"totalUnreadCount\": 2\n}\n```\n- when unread notifications count changes:\n```\n{\n \"cmdId\": 1234,\n \"totalUnreadCount\": 5\n}\n```", + "operationId": "getNotifications", "parameters": [ { "name": "pageSize", @@ -68684,7 +68677,7 @@ { "name": "textSearch", "in": "query", - "description": "Case-insensitive 'substring' filed based on the target's name", + "description": "Case-insensitive 'substring' filter based on notification subject or text", "required": false, "schema": { "type": "string" @@ -68707,154 +68700,28 @@ "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataNotificationTarget" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ { - "HttpLoginForm": [] + "name": "unreadOnly", + "in": "query", + "description": "To search for unread notifications only", + "required": false, + "schema": { + "type": "boolean", + "default": false + } }, { - "ApiKeyForm": [] - } - ] - } - }, - "/api/notification/targets/list": { - "get": { - "tags": [ - "notification-target-controller" - ], - "summary": "Get notification targets by ids (getNotificationTargetsByIds)", - "description": "Returns the list of notification targets found by provided ids.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTargetsByIds", - "parameters": [ - { - "name": "ids", + "name": "deliveryMethod", "in": "query", - "description": "Comma-separated list of uuids representing targets ids", - "required": true, + "description": "Delivery method", + "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string", + "enum": [ + "WEB", + "MOBILE_APP" + ] } } ], @@ -68864,10 +68731,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationTarget" - } + "$ref": "#/components/schemas/PageDataNotification" } } } @@ -68988,82 +68852,32 @@ ] } }, - "/api/notification/targets/notificationType/{notificationType}": { - "get": { + "/api/notifications/read": { + "put": { "tags": [ - "notification-target-controller" + "notification-controller" ], - "summary": "Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType)", - "description": "Returns the page of notification targets filtered by notification type that they can be used for.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTargetsBySupportedNotificationType", + "summary": "Mark all notifications as read (markAllNotificationsAsRead)", + "description": "Marks all unread notifications as read.\n\nAvailable for any authorized user. ", + "operationId": "markAllNotificationsAsRead", "parameters": [ { - "name": "notificationType", - "in": "path", - "description": "Notification type to filter targets by", - "required": true, - "schema": { - "$ref": "#/components/schemas/NotificationType" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filed based on the target's name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", + "name": "deliveryMethod", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Delivery method", "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "WEB", + "MOBILE_APP" + ] } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataNotificationTarget" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -69181,30 +68995,26 @@ ] } }, - "/api/notification/slack/conversations": { + "/api/notifications/unread/count": { "get": { "tags": [ - "notification-template-controller" + "notification-controller" ], - "summary": "List Slack conversations (listSlackConversations)", - "description": "List available Slack conversations by type.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "listSlackConversations", + "summary": "Get unread notifications count (getUnreadNotificationsCount)", + "description": "Returns unread notifications count for chosen delivery method.\n\nAvailable for any authorized user. ", + "operationId": "getUnreadNotificationsCount", "parameters": [ { - "name": "type", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/SlackConversationType" - } - }, - { - "name": "token", + "name": "deliveryMethod", "in": "query", - "description": "Slack bot token. If absent - system Slack settings will be used", + "description": "Delivery method", "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "WEB", + "MOBILE_APP" + ] } } ], @@ -69214,10 +69024,8 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SlackConversation" - } + "type": "integer", + "format": "int32" } } } @@ -69338,19 +69146,19 @@ ] } }, - "/api/notification/template": { + "/api/notification/rule": { "post": { "tags": [ - "notification-template-controller" + "notification-rule-controller" ], - "summary": "Save notification template (saveNotificationTemplate)", - "description": "Creates or updates notification template.\n\nHere is an example of template to send notification via Web, SMS and Slack:\n```json\n{\n \"name\": \"Greetings\",\n \"notificationType\": \"GENERAL\",\n \"configuration\": {\n \"deliveryMethodsTemplates\": {\n \"WEB\": {\n \"enabled\": true,\n \"subject\": \"Greetings\",\n \"body\": \"Hi there, ${recipientTitle}\",\n \"additionalConfig\": {\n \"icon\": {\n \"enabled\": true,\n \"icon\": \"back_hand\",\n \"color\": \"#757575\"\n },\n \"actionButtonConfig\": {\n \"enabled\": false\n }\n },\n \"method\": \"WEB\"\n },\n \"SMS\": {\n \"enabled\": true,\n \"body\": \"Hi there, ${recipientTitle}\",\n \"method\": \"SMS\"\n },\n \"SLACK\": {\n \"enabled\": true,\n \"body\": \"Hi there, @${recipientTitle}\",\n \"method\": \"SLACK\"\n }\n }\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveNotificationTemplate", + "summary": "Save notification rule (saveNotificationRule)", + "description": "Creates or updates notification rule. \n\nMandatory properties are `name`, `templateId` (of a template with `notificationType` matching to rule's `triggerType`), `triggerType`, `triggerConfig` and `recipientConfig`. Additionally, you may specify rule `description` inside of `additionalConfig`.\n\nTrigger type of the rule cannot be changed. Available trigger types for tenant: `ENTITY_ACTION`, `ALARM`, `ALARM_COMMENT`, `ALARM_ASSIGNMENT`, `DEVICE_ACTIVITY`, `RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT`.\nFor sysadmin, there are following trigger types available: `ENTITIES_LIMIT`, `API_USAGE_LIMIT`, `NEW_PLATFORM_VERSION`.\n\nHere is an example of notification rule to send notification when a device, asset or customer is created or deleted:\n```json\n{\n \"name\": \"Entity action\",\n \"templateId\": {\n \"entityType\": \"NOTIFICATION_TEMPLATE\",\n \"id\": \"32117320-d785-11ed-a06c-21dd57dd88ca\"\n },\n \"triggerType\": \"ENTITY_ACTION\",\n \"triggerConfig\": {\n \"entityTypes\": [\n \"CUSTOMER\",\n \"DEVICE\",\n \"ASSET\"\n ],\n \"created\": true,\n \"updated\": false,\n \"deleted\": true,\n \"triggerType\": \"ENTITY_ACTION\"\n },\n \"recipientsConfig\": {\n \"targets\": [\n \"320f2930-d785-11ed-a06c-21dd57dd88ca\"\n ],\n \"triggerType\": \"ENTITY_ACTION\"\n },\n \"additionalConfig\": {\n \"description\": \"Send notification to tenant admins or customer users when a device, asset or customer is created\"\n },\n \"templateName\": \"Entity action notification\",\n \"deliveryMethods\": [\n \"WEB\"\n ]\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveNotificationRule", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationTemplate" + "$ref": "#/components/schemas/NotificationRule" } } }, @@ -69362,7 +69170,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationTemplate" + "$ref": "#/components/schemas/NotificationRule" } } } @@ -69483,14 +69291,14 @@ ] } }, - "/api/notification/template/{id}": { + "/api/notification/rule/{id}": { "get": { "tags": [ - "notification-template-controller" + "notification-rule-controller" ], - "summary": "Get notification template by id (getNotificationTemplateById)", - "description": "Fetches notification template by id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTemplateById", + "summary": "Get notification rule by id (getNotificationRuleById)", + "description": "Fetches notification rule info by rule's id.\nIn addition to regular notification rule fields, there are `templateName` and `deliveryMethods` in the response.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationRuleById", "parameters": [ { "name": "id", @@ -69508,7 +69316,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationTemplate" + "$ref": "#/components/schemas/NotificationRuleInfo" } } } @@ -69630,11 +69438,11 @@ }, "delete": { "tags": [ - "notification-template-controller" + "notification-rule-controller" ], - "summary": "Delete notification template by id (deleteNotificationTemplateById", - "description": "Deletes notification template by its id.\n\nThis template cannot be referenced by existing scheduled notification requests or any notification rules.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "deleteNotificationTemplateById", + "summary": "Delete notification rule (deleteNotificationRule)", + "description": "Deletes notification rule by id.\nCancels all related scheduled notification requests (e.g. due to escalation table)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteNotificationRule", "parameters": [ { "name": "id", @@ -69766,14 +69574,14 @@ ] } }, - "/api/notification/templates": { + "/api/notification/rules": { "get": { "tags": [ - "notification-template-controller" + "notification-rule-controller" ], - "summary": "Get notification templates (getNotificationTemplates)", - "description": "Returns the page of notification templates owned by sysadmin or tenant.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTemplates", + "summary": "Get notification rules (getNotificationRules)", + "description": "Returns the page of notification rules.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationRules", "parameters": [ { "name": "pageSize", @@ -69798,7 +69606,7 @@ { "name": "textSearch", "in": "query", - "description": "Case-insensitive 'substring' filter based on template's name and notification type", + "description": "Case-insensitive 'substring' filter based on rule's name", "required": false, "schema": { "type": "string" @@ -69821,18 +69629,6 @@ "schema": { "type": "string" } - }, - { - "name": "notificationTypes", - "in": "query", - "description": "Comma-separated list of notification types to filter the templates", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } } ], "responses": { @@ -69841,7 +69637,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataNotificationTemplate" + "$ref": "#/components/schemas/PageDataNotificationRuleInfo" } } } @@ -69962,24 +69758,31 @@ ] } }, - "/api/oauth2/config/template": { - "get": { + "/api/notification/target": { + "post": { "tags": [ - "o-auth-2-config-template-controller" + "notification-target-controller" ], - "summary": "Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", - "operationId": "getOAuth2ClientRegistrationTemplates", + "summary": "Save notification target (saveNotificationTarget)", + "description": "Creates or updates notification target.\n\nAvailable `configuration` types are `PLATFORM_USERS` and `SLACK`.\nFor `PLATFORM_USERS` the `usersFilter` must be specified. For tenant, there are following users filter types available: `USER_LIST`, `CUSTOMER_USERS`, `USER_GROUP_LIST`, `TENANT_ADMINISTRATORS`, `USER_ROLE`, `ALL_USERS`, `ORIGINATOR_ENTITY_OWNER_USERS`, `AFFECTED_USER`.\nFor sysadmin: `TENANT_ADMINISTRATORS`, `AFFECTED_TENANT_ADMINISTRATORS`, `SYSTEM_ADMINISTRATORS`, `ALL_USERS`.\n\nHere is an example of tenant-level notification target to send notification to customer's users:\n```json\n{\n \"name\": \"Users of Customer A\",\n \"configuration\": {\n \"type\": \"PLATFORM_USERS\",\n \"usersFilter\": {\n \"type\": \"CUSTOMER_USERS\",\n \"customerId\": \"32499a20-d785-11ed-a06c-21dd57dd88ca\"\n },\n \"description\": \"Users of Customer A\"\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveNotificationTarget", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTarget" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OAuth2ClientRegistrationTemplate" - } + "$ref": "#/components/schemas/NotificationTarget" } } } @@ -69996,7 +69799,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -70098,19 +69901,43 @@ "ApiKeyForm": [] } ] - }, + } + }, + "/api/notification/target/recipients": { "post": { "tags": [ - "o-auth-2-config-template-controller" + "notification-target-controller" + ], + "summary": "Get recipients for notification target config (getRecipientsForNotificationTargetConfig)", + "description": "Returns the page of recipients for such notification target configuration.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getRecipientsForNotificationTargetConfig", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } ], - "summary": "Create or update OAuth2 client registration template (saveClientRegistrationTemplate)\n\nAvailable for users with 'SYS_ADMIN' authority.", - "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", - "operationId": "saveClientRegistrationTemplate", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OAuth2ClientRegistrationTemplate" + "$ref": "#/components/schemas/NotificationTarget" } } }, @@ -70122,7 +69949,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OAuth2ClientRegistrationTemplate" + "$ref": "#/components/schemas/PageDataUser" } } } @@ -70243,29 +70070,35 @@ ] } }, - "/api/oauth2/config/template/{clientRegistrationTemplateId}": { - "delete": { + "/api/notification/target/{id}": { + "get": { "tags": [ - "o-auth-2-config-template-controller" + "notification-target-controller" ], - "summary": "Delete OAuth2 client registration template by id (deleteClientRegistrationTemplate)\n\nAvailable for users with 'SYS_ADMIN' authority.", - "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", - "operationId": "deleteClientRegistrationTemplate", + "summary": "Get notification target by id (getNotificationTargetById)", + "description": "Fetches notification target by id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationTargetById", "parameters": [ { - "name": "clientRegistrationTemplateId", + "name": "id", "in": "path", - "description": "String representation of client registration template id to delete", "required": true, "schema": { - "type": "string" - }, - "example": "139b1f81-2f5d-11ec-9dbe-9b627e1a88f4" + "type": "string", + "format": "uuid" + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTarget" + } + } + } }, "400": { "description": "Bad Request", @@ -70381,54 +70214,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/noauth/oauth2Clients": { - "post": { + }, + "delete": { "tags": [ - "o-auth-2-controller" + "notification-target-controller" ], - "summary": "Get OAuth2 clients (getOAuth2Clients)", - "description": "Get the list of OAuth2 clients to log in with, available for such domain scheme (HTTP or HTTPS) (if x-forwarded-proto request header is present - the scheme is known from it) and domain name and port (port may be known from x-forwarded-port header)", - "operationId": "getOAuth2Clients", + "summary": "Delete notification target by id (deleteNotificationTargetById)", + "description": "Deletes notification target by its id.\n\nThis target cannot be referenced by existing scheduled notification requests or any notification rules.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteNotificationTargetById", "parameters": [ { - "name": "pkgName", - "in": "query", - "description": "Mobile application package name, to find OAuth2 clients where there is configured mobile application with such package name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "platform", - "in": "query", - "description": "Platform type to search OAuth2 clients for which the usage with this platform type is allowed in the settings. If platform type is not one of allowable values - it will just be ignored", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { "type": "string", - "enum": [ - "WEB", - "ANDROID", - "IOS" - ] + "format": "uuid" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OAuth2ClientLoginInfo" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -70442,7 +70249,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -70535,34 +70342,81 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/oauth2/client": { - "post": { + "/api/notification/targets": { + "get": { "tags": [ - "o-auth-2-controller" + "notification-target-controller" ], - "summary": "Save OAuth2 Client (saveOAuth2Client)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveOAuth2Client", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuth2Client" - } + "summary": "Get notification targets (getNotificationTargets)", + "description": "Returns the page of notification targets owned by sysadmin or tenant.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationTargets", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filed based on the target's name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OAuth2Client" + "$ref": "#/components/schemas/PageDataNotificationTarget" } } } @@ -70579,7 +70433,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -70683,60 +70537,25 @@ ] } }, - "/api/oauth2/client/infos": { + "/api/notification/targets/list": { "get": { "tags": [ - "o-auth-2-controller" + "notification-target-controller" ], - "summary": "Get OAuth2 Client infos (findOAuth2ClientInfos)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findOAuth2ClientInfos", + "summary": "Get notification targets by ids (getNotificationTargetsByIds)", + "description": "Returns the list of notification targets found by provided ids.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationTargetsByIds", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "ids", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "Comma-separated list of uuids representing targets ids", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on client's title", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -70746,7 +70565,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataOAuth2ClientInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTarget" + } } } } @@ -70867,25 +70689,69 @@ ] } }, - "/api/oauth2/client/list": { + "/api/notification/targets/notificationType/{notificationType}": { "get": { "tags": [ - "o-auth-2-controller" + "notification-target-controller" ], - "summary": "Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds)", - "description": "Fetch OAuth2 Client info objects based on the provided ids. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findTenantOAuth2ClientInfosByIds", + "summary": "Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType)", + "description": "Returns the page of notification targets filtered by notification type that they can be used for.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationTargetsBySupportedNotificationType", "parameters": [ { - "name": "clientIds", + "name": "notificationType", + "in": "path", + "description": "Notification type to filter targets by", + "required": true, + "schema": { + "$ref": "#/components/schemas/NotificationType" + } + }, + { + "name": "pageSize", "in": "query", - "description": "A list of oauth2 ids, separated by comma ','", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filed based on the target's name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" } } ], @@ -70895,10 +70761,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OAuth2ClientInfo" - } + "$ref": "#/components/schemas/PageDataNotificationTarget" } } } @@ -71019,22 +70882,30 @@ ] } }, - "/api/oauth2/client/{id}": { + "/api/notification/slack/conversations": { "get": { "tags": [ - "o-auth-2-controller" + "notification-template-controller" ], - "summary": "Get OAuth2 Client by id (getOAuth2ClientById)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getOAuth2ClientById", + "summary": "List Slack conversations (listSlackConversations)", + "description": "List available Slack conversations by type.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "listSlackConversations", "parameters": [ { - "name": "id", - "in": "path", + "name": "type", + "in": "query", "required": true, "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/SlackConversationType" + } + }, + { + "name": "token", + "in": "query", + "description": "Slack bot token. If absent - system Slack settings will be used", + "required": false, + "schema": { + "type": "string" } } ], @@ -71044,7 +70915,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OAuth2Client" + "type": "array", + "items": { + "$ref": "#/components/schemas/SlackConversation" + } } } } @@ -71163,28 +71037,36 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/notification/template": { + "post": { "tags": [ - "o-auth-2-controller" + "notification-template-controller" ], - "summary": "Delete oauth2 client (deleteOauth2Client)", - "description": "Deletes the oauth2 client. Referencing non-existing oauth2 client Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "deleteOauth2Client", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Save notification template (saveNotificationTemplate)", + "description": "Creates or updates notification template.\n\nHere is an example of template to send notification via Web, SMS and Slack:\n```json\n{\n \"name\": \"Greetings\",\n \"notificationType\": \"GENERAL\",\n \"configuration\": {\n \"deliveryMethodsTemplates\": {\n \"WEB\": {\n \"enabled\": true,\n \"subject\": \"Greetings\",\n \"body\": \"Hi there, ${recipientTitle}\",\n \"additionalConfig\": {\n \"icon\": {\n \"enabled\": true,\n \"icon\": \"back_hand\",\n \"color\": \"#757575\"\n },\n \"actionButtonConfig\": {\n \"enabled\": false\n }\n },\n \"method\": \"WEB\"\n },\n \"SMS\": {\n \"enabled\": true,\n \"body\": \"Hi there, ${recipientTitle}\",\n \"method\": \"SMS\"\n },\n \"SLACK\": {\n \"enabled\": true,\n \"body\": \"Hi there, @${recipientTitle}\",\n \"method\": \"SLACK\"\n }\n }\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveNotificationTemplate", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplate" + } } - } - ], + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplate" + } + } + } }, "400": { "description": "Bad Request", @@ -71198,7 +71080,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -71302,21 +71184,32 @@ ] } }, - "/api/oauth2/loginProcessingUrl": { + "/api/notification/template/{id}": { "get": { "tags": [ - "o-auth-2-controller" + "notification-template-controller" + ], + "summary": "Get notification template by id (getNotificationTemplateById)", + "description": "Fetches notification template by id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationTemplateById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - "summary": "Get OAuth2 log in processing URL (getLoginProcessingUrl)", - "description": "Returns the URL enclosed in double quotes. After successful authentication with OAuth2 provider, it makes a redirect to this path so that the platform can do further log in processing. This URL may be configured as 'security.oauth2.loginProcessingUrl' property in yml configuration file, or as 'SECURITY_OAUTH2_LOGIN_PROCESSING_URL' env variable. By default it is '/login/oauth2/code/'\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getLoginProcessingUrl", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/NotificationTemplate" } } } @@ -71435,36 +71328,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/otaPackage": { - "post": { + }, + "delete": { "tags": [ - "ota-package-controller" + "notification-template-controller" ], - "summary": "Create Or Update OTA Package Info (saveOtaPackageInfo)", - "description": "Create or update the OTA Package Info. When creating OTA Package Info, platform generates OTA Package id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created OTA Package id will be present in the response. Specify existing OTA Package id to update the OTA Package Info. Referencing non-existing OTA Package Id will cause 'Not Found' error. \n\nOTA Package combination of the title with the version is unique in the scope of tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveOtaPackageInfo", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SaveOtaPackageInfoRequest" - } + "summary": "Delete notification template by id (deleteNotificationTemplateById", + "description": "Deletes notification template by its id.\n\nThis template cannot be referenced by existing scheduled notification requests or any notification rules.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteNotificationTemplateById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" } - }, - "required": true - }, + } + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OtaPackageInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -71478,7 +71363,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -71582,23 +71467,73 @@ ] } }, - "/api/otaPackage/info/{otaPackageId}": { + "/api/notification/templates": { "get": { "tags": [ - "ota-package-controller" + "notification-template-controller" ], - "summary": "Get OTA Package Info (getOtaPackageInfoById)", - "description": "Fetch the OTA Package Info object based on the provided OTA Package Id. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getOtaPackageInfoById", + "summary": "Get notification templates (getNotificationTemplates)", + "description": "Returns the page of notification templates owned by sysadmin or tenant.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationTemplates", "parameters": [ { - "name": "otaPackageId", - "in": "path", - "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on template's name and notification type", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "notificationTypes", + "in": "query", + "description": "Comma-separated list of notification types to filter the templates", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } } ], "responses": { @@ -71607,7 +71542,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OtaPackageInfo" + "$ref": "#/components/schemas/PageDataNotificationTemplate" } } } @@ -71728,32 +71663,24 @@ ] } }, - "/api/otaPackage/{otaPackageId}": { + "/api/oauth2/config/template": { "get": { "tags": [ - "ota-package-controller" - ], - "summary": "Get OTA Package (getOtaPackageById)", - "description": "Fetch the OTA Package object based on the provided OTA Package Id. The server checks that the OTA Package is owned by the same tenant. OTA Package is a heavyweight object that includes main information about the OTA Package and also data. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getOtaPackageById", - "parameters": [ - { - "name": "otaPackageId", - "in": "path", - "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "o-auth-2-config-template-controller" ], + "summary": "Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", + "operationId": "getOAuth2ClientRegistrationTemplates", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OtaPackage" + "type": "array", + "items": { + "$ref": "#/components/schemas/OAuth2ClientRegistrationTemplate" + } } } } @@ -71875,67 +71802,20 @@ }, "post": { "tags": [ - "ota-package-controller" - ], - "summary": "Save OTA Package data (saveOtaPackageData)", - "description": "Update the OTA Package. Adds the date to the existing OTA Package Info\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveOtaPackageData", - "parameters": [ - { - "name": "otaPackageId", - "in": "path", - "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "checksum", - "in": "query", - "description": "OTA Package checksum. For example, '0xd87f7e0c'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "checksumAlgorithm", - "in": "query", - "description": "OTA Package checksum algorithm.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "MD5", - "SHA256", - "SHA384", - "SHA512", - "CRC32", - "MURMUR3_32", - "MURMUR3_128" - ] - } - } + "o-auth-2-config-template-controller" ], + "summary": "Create or update OAuth2 client registration template (saveClientRegistrationTemplate)\n\nAvailable for users with 'SYS_ADMIN' authority.", + "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", + "operationId": "saveClientRegistrationTemplate", "requestBody": { "content": { - "multipart/form-data": { + "application/json": { "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary", - "description": "OTA Package data." - } - }, - "required": [ - "file" - ] + "$ref": "#/components/schemas/OAuth2ClientRegistrationTemplate" } } - } + }, + "required": true }, "responses": { "200": { @@ -71943,7 +71823,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OtaPackageInfo" + "$ref": "#/components/schemas/OAuth2ClientRegistrationTemplate" } } } @@ -72062,23 +71942,26 @@ "ApiKeyForm": [] } ] - }, + } + }, + "/api/oauth2/config/template/{clientRegistrationTemplateId}": { "delete": { "tags": [ - "ota-package-controller" + "o-auth-2-config-template-controller" ], - "summary": "Delete OTA Package (deleteOtaPackage)", - "description": "Deletes the OTA Package. Referencing non-existing OTA Package Id will cause an error. Can't delete the OTA Package if it is referenced by existing devices or device profile.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteOtaPackage", + "summary": "Delete OAuth2 client registration template by id (deleteClientRegistrationTemplate)\n\nAvailable for users with 'SYS_ADMIN' authority.", + "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", + "operationId": "deleteClientRegistrationTemplate", "parameters": [ { - "name": "otaPackageId", + "name": "clientRegistrationTemplateId", "in": "path", - "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "String representation of client registration template id to delete", "required": true, "schema": { "type": "string" - } + }, + "example": "139b1f81-2f5d-11ec-9dbe-9b627e1a88f4" } ], "responses": { @@ -72201,23 +72084,37 @@ ] } }, - "/api/otaPackage/{otaPackageId}/download": { - "get": { + "/api/noauth/oauth2Clients": { + "post": { "tags": [ - "ota-package-controller" + "o-auth-2-controller" ], - "summary": "Download OTA Package (downloadOtaPackage)", - "description": "Download OTA Package based on the provided OTA Package Id.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "downloadOtaPackage", + "summary": "Get OAuth2 clients (getOAuth2Clients)", + "description": "Get the list of OAuth2 clients to log in with, available for such domain scheme (HTTP or HTTPS) (if x-forwarded-proto request header is present - the scheme is known from it) and domain name and port (port may be known from x-forwarded-port header)", + "operationId": "getOAuth2Clients", "parameters": [ { - "name": "otaPackageId", - "in": "path", - "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "pkgName", + "in": "query", + "description": "Mobile application package name, to find OAuth2 clients where there is configured mobile application with such package name", + "required": false, "schema": { "type": "string" } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type to search OAuth2 clients for which the usage with this platform type is allowed in the settings. If platform type is not one of allowable values - it will just be ignored", + "required": false, + "schema": { + "type": "string", + "enum": [ + "WEB", + "ANDROID", + "IOS" + ] + } } ], "responses": { @@ -72226,8 +72123,10 @@ "content": { "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "array", + "items": { + "$ref": "#/components/schemas/OAuth2ClientLoginInfo" + } } } } @@ -72244,7 +72143,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -72337,96 +72236,34 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/otaPackages": { - "get": { + "/api/oauth2/client": { + "post": { "tags": [ - "ota-package-controller" + "o-auth-2-controller" ], - "summary": "Get OTA Package Infos (getOtaPackages)", - "description": "Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getOtaPackages", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the ota package title.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "type", - "title", - "version", - "tag", - "url", - "fileName", - "dataSize", - "checksum" - ] + "summary": "Save OAuth2 Client (saveOAuth2Client)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveOAuth2Client", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2Client" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataOtaPackageInfo" + "$ref": "#/components/schemas/OAuth2Client" } } } @@ -72443,7 +72280,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -72547,37 +72384,15 @@ ] } }, - "/api/otaPackages/group/{groupId}/{type}": { + "/api/oauth2/client/infos": { "get": { "tags": [ - "ota-package-controller" + "o-auth-2-controller" ], - "summary": "Get group OTA Package Infos (getGroupOtaPackages)", - "description": "Returns a page of OTA Package Info objects owned by tenant, and by entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getGroupOtaPackages", + "summary": "Get OAuth2 Client infos (findOAuth2ClientInfos)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findOAuth2ClientInfos", "parameters": [ - { - "name": "groupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "type", - "in": "path", - "description": "OTA Package type.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "FIRMWARE", - "SOFTWARE" - ] - } - }, { "name": "pageSize", "in": "query", @@ -72601,7 +72416,7 @@ { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the ota package title.", + "description": "Case-insensitive 'substring' filter based on client's title", "required": false, "schema": { "type": "string" @@ -72613,18 +72428,7 @@ "description": "Property of entity to sort by", "required": false, "schema": { - "type": "string", - "enum": [ - "createdTime", - "type", - "title", - "version", - "tag", - "url", - "fileName", - "dataSize", - "checksum" - ] + "type": "string" } }, { @@ -72633,11 +72437,7 @@ "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -72647,7 +72447,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataOtaPackageInfo" + "$ref": "#/components/schemas/PageDataOAuth2ClientInfo" } } } @@ -72768,97 +72568,25 @@ ] } }, - "/api/otaPackages/{deviceProfileId}/{type}": { + "/api/oauth2/client/list": { "get": { "tags": [ - "ota-package-controller" + "o-auth-2-controller" ], - "summary": "Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType)", - "description": "Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getOtaPackagesByDeviceProfileIdAndType", + "summary": "Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds)", + "description": "Fetch OAuth2 Client info objects based on the provided ids. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findTenantOAuth2ClientInfosByIds", "parameters": [ { - "name": "deviceProfileId", - "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "type", - "in": "path", - "description": "OTA Package type.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "FIRMWARE", - "SOFTWARE" - ] - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "clientIds", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A list of oauth2 ids, separated by comma ','", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the ota package title.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "type", - "title", - "version", - "tag", - "url", - "fileName", - "dataSize", - "checksum" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "array", + "items": { + "type": "string" + } } } ], @@ -72868,7 +72596,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataOtaPackageInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/OAuth2ClientInfo" + } } } } @@ -72989,59 +72720,35 @@ ] } }, - "/api/owner/CUSTOMER/{ownerId}/{entityType}/{entityId}": { - "post": { + "/api/oauth2/client/{id}": { + "get": { "tags": [ - "owner-controller" + "o-auth-2-controller" ], - "summary": "Change owner to customer (changeOwnerToCustomer)", - "description": "Tenant/Customer changes Owner to Customer or sub-Customer. Sub-Customer can`t perform this operation! \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "changeOwnerToCustomer", + "summary": "Get OAuth2 Client by id (getOAuth2ClientById)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getOAuth2ClientById", "parameters": [ { - "name": "ownerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "id", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "An optional list of additional entity group ids", - "items": { - "type": "string" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2Client" } } } - } - }, - "responses": { - "200": { - "description": "OK" }, "400": { "description": "Bad Request", @@ -73055,7 +72762,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -73157,58 +72864,25 @@ "ApiKeyForm": [] } ] - } - }, - "/api/owner/TENANT/{ownerId}/{entityType}/{entityId}": { - "post": { + }, + "delete": { "tags": [ - "owner-controller" + "o-auth-2-controller" ], - "summary": "Change owner to tenant (changeOwnerToTenant)", - "description": "Tenant changes Owner from Customer or sub-Customer to Tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "changeOwnerToTenant", + "summary": "Delete oauth2 client (deleteOauth2Client)", + "description": "Deletes the oauth2 client. Referencing non-existing oauth2 client Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteOauth2Client", "parameters": [ { - "name": "ownerId", - "in": "path", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "id", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "An optional list of additional entity group ids", - "items": { - "type": "string" - } - } - } - } - }, "responses": { "200": { "description": "OK" @@ -73225,7 +72899,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -73329,19 +73003,19 @@ ] } }, - "/api/mobile/qr/deepLink": { + "/api/oauth2/loginProcessingUrl": { "get": { "tags": [ - "qr-code-settings-controller" + "o-auth-2-controller" ], - "summary": "Get the deep link to the associated mobile application (getMobileAppDeepLink)", - "description": "Fetch the url that takes user to linked mobile application \n\nAvailable for any authorized user. ", - "operationId": "getMobileAppDeepLink", + "summary": "Get OAuth2 log in processing URL (getLoginProcessingUrl)", + "description": "Returns the URL enclosed in double quotes. After successful authentication with OAuth2 provider, it makes a redirect to this path so that the platform can do further log in processing. This URL may be configured as 'security.oauth2.loginProcessingUrl' property in yml configuration file, or as 'SECURITY_OAUTH2_LOGIN_PROCESSING_URL' env variable. By default it is '/login/oauth2/code/'\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getLoginProcessingUrl", "responses": { "200": { "description": "OK", "content": { - "text/plain": { + "application/json": { "schema": { "type": "string" } @@ -73464,156 +73138,31 @@ ] } }, - "/api/mobile/qr/merged": { - "get": { + "/api/otaPackage": { + "post": { "tags": [ - "qr-code-settings-controller" + "ota-package-controller" ], - "summary": "Get QR code configuration for home page (getMergedMobileAppSettings)", - "description": "The response payload contains ui configuration of qr code\n\nAvailable for any authorized user. ", - "operationId": "getMergedMobileAppSettings", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QrCodeSettings" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } + "summary": "Create Or Update OTA Package Info (saveOtaPackageInfo)", + "description": "Create or update the OTA Package Info. When creating OTA Package Info, platform generates OTA Package id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created OTA Package id will be present in the response. Specify existing OTA Package id to update the OTA Package Info. Referencing non-existing OTA Package Id will cause 'Not Found' error. \n\nOTA Package combination of the title with the version is unique in the scope of tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveOtaPackageInfo", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SaveOtaPackageInfoRequest" } } }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } + "required": true }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/mobile/qr/settings": { - "get": { - "tags": [ - "qr-code-settings-controller" - ], - "summary": "Get Mobile application settings (getQrCodeSettings)", - "description": "The response payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for any authorized user. ", - "operationId": "getQrCodeSettings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QrCodeSettings" + "$ref": "#/components/schemas/OtaPackageInfo" } } } @@ -73630,7 +73179,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -73732,31 +73281,34 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/otaPackage/info/{otaPackageId}": { + "get": { "tags": [ - "qr-code-settings-controller" + "ota-package-controller" ], - "summary": "Create Or Update the Mobile application settings (saveQrCodeSettings)", - "description": "The request payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveQrCodeSettings", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QrCodeSettings" - } + "summary": "Get OTA Package Info (getOtaPackageInfoById)", + "description": "Fetch the OTA Package Info object based on the provided OTA Package Id. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getOtaPackageInfoById", + "parameters": [ + { + "name": "otaPackageId", + "in": "path", + "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QrCodeSettings" + "$ref": "#/components/schemas/OtaPackageInfo" } } } @@ -73773,7 +73325,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -73877,17 +73429,19 @@ ] } }, - "/api/noauth/qr": { + "/api/otaPackage/{otaPackageId}": { "get": { "tags": [ - "qr-code-settings-controller" + "ota-package-controller" ], - "summary": "getApplicationRedirect", - "operationId": "getApplicationRedirect", + "summary": "Get OTA Package (getOtaPackageById)", + "description": "Fetch the OTA Package object based on the provided OTA Package Id. The server checks that the OTA Package is owned by the same tenant. OTA Package is a heavyweight object that includes main information about the OTA Package and also data. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getOtaPackageById", "parameters": [ { - "name": "User-Agent", - "in": "header", + "name": "otaPackageId", + "in": "path", + "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -73900,7 +73454,7 @@ "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/OtaPackage" } } } @@ -74010,35 +73564,87 @@ } } } - } - } - }, - "/api/noauth/qr/{secret}": { - "get": { + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + }, + "post": { "tags": [ - "qr-code-settings-controller" + "ota-package-controller" ], - "summary": "Get User Token (getUserTokenByMobileSecret)", - "description": "Returns the token of the User based on the provided secret key.", - "operationId": "getUserTokenByMobileSecret", + "summary": "Save OTA Package data (saveOtaPackageData)", + "description": "Update the OTA Package. Adds the date to the existing OTA Package Info\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveOtaPackageData", "parameters": [ { - "name": "secret", + "name": "otaPackageId", "in": "path", - "description": "A string value representing short-lived secret key", + "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "checksum", + "in": "query", + "description": "OTA Package checksum. For example, '0xd87f7e0c'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "checksumAlgorithm", + "in": "query", + "description": "OTA Package checksum algorithm.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "MD5", + "SHA256", + "SHA384", + "SHA512", + "CRC32", + "MURMUR3_32", + "MURMUR3_128" + ] + } } ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary", + "description": "OTA Package data." + } + }, + "required": [ + "file" + ] + } + } + } + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "$ref": "#/components/schemas/OtaPackageInfo" } } } @@ -74055,7 +73661,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -74148,100 +73754,37 @@ } } } - } - } - }, - "/api/queues": { - "get": { - "tags": [ - "queue-controller" - ], - "summary": "Get Queues (getTenantQueuesByServiceType)", - "description": "Returns a page of queues registered in the platform. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getTenantQueuesByServiceType", - "parameters": [ + }, + "security": [ { - "name": "serviceType", - "in": "query", - "description": "Service type (implemented only for the TB-RULE-ENGINE)", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TB-RULE-ENGINE", - "TB-CORE", - "TB-TRANSPORT", - "JS-EXECUTOR" - ] - } + "HttpLoginForm": [] }, { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, + "ApiKeyForm": [] + } + ] + }, + "delete": { + "tags": [ + "ota-package-controller" + ], + "summary": "Delete OTA Package (deleteOtaPackage)", + "description": "Deletes the OTA Package. Referencing non-existing OTA Package Id will cause an error. Can't delete the OTA Package if it is referenced by existing devices or device profile.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteOtaPackage", + "parameters": [ { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "otaPackageId", + "in": "path", + "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the queue name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "topic" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataQueue" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -74357,48 +73900,35 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/otaPackage/{otaPackageId}/download": { + "get": { "tags": [ - "queue-controller" + "ota-package-controller" ], - "summary": "Create Or Update Queue (saveQueue)", - "description": "Create or update the Queue. When creating queue, platform generates Queue Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Specify existing Queue id to update the queue. Referencing non-existing Queue Id will cause 'Not Found' error.\n\nQueue name is unique in the scope of sysadmin. Remove 'id', 'tenantId' from the request body example (below) to create new Queue entity. \n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "saveQueue", + "summary": "Download OTA Package (downloadOtaPackage)", + "description": "Download OTA Package based on the provided OTA Package Id.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "downloadOtaPackage", "parameters": [ { - "name": "serviceType", - "in": "query", - "description": "Service type (implemented only for the TB-RULE-ENGINE)", + "name": "otaPackageId", + "in": "path", + "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "enum": [ - "TB-RULE-ENGINE", - "TB-CORE", - "TB-TRANSPORT", - "JS-EXECUTOR" - ] + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Queue" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Queue" + "type": "string", + "format": "binary" } } } @@ -74415,7 +73945,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -74519,23 +74049,76 @@ ] } }, - "/api/queues/name/{queueName}": { + "/api/otaPackages": { "get": { "tags": [ - "queue-controller" + "ota-package-controller" ], - "summary": "Get Queue (getQueueByName)", - "description": "Fetch the Queue object based on the provided Queue name. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getQueueByName", + "summary": "Get OTA Package Infos (getOtaPackages)", + "description": "Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getOtaPackages", "parameters": [ { - "name": "queueName", - "in": "path", - "description": "A string value representing the queue id. For example, 'Main'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the ota package title.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "type", + "title", + "version", + "tag", + "url", + "fileName", + "dataSize", + "checksum" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -74544,7 +74127,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Queue" + "$ref": "#/components/schemas/PageDataOtaPackageInfo" } } } @@ -74665,23 +74248,98 @@ ] } }, - "/api/queues/{queueId}": { + "/api/otaPackages/group/{groupId}/{type}": { "get": { "tags": [ - "queue-controller" + "ota-package-controller" ], - "summary": "Get Queue (getQueueById)", - "description": "Fetch the Queue object based on the provided Queue Id. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getQueueById", + "summary": "Get group OTA Package Infos (getGroupOtaPackages)", + "description": "Returns a page of OTA Package Info objects owned by tenant, and by entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getGroupOtaPackages", "parameters": [ { - "name": "queueId", + "name": "groupId", "in": "path", - "description": "A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "path", + "description": "OTA Package type.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the ota package title.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "type", + "title", + "version", + "tag", + "url", + "fileName", + "dataSize", + "checksum" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -74690,7 +74348,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Queue" + "$ref": "#/components/schemas/PageDataOtaPackageInfo" } } } @@ -74809,28 +74467,112 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/otaPackages/{deviceProfileId}/{type}": { + "get": { "tags": [ - "queue-controller" + "ota-package-controller" ], - "summary": "Delete Queue (deleteQueue)", - "description": "Deletes the Queue. \n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "deleteQueue", + "summary": "Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType)", + "description": "Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getOtaPackagesByDeviceProfileIdAndType", "parameters": [ { - "name": "queueId", + "name": "deviceProfileId", "in": "path", - "description": "A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "path", + "description": "OTA Package type.", "required": true, + "schema": { + "type": "string", + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the ota package title.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "type", + "title", + "version", + "tag", + "url", + "fileName", + "dataSize", + "checksum" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataOtaPackageInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -74948,80 +74690,59 @@ ] } }, - "/api/queueStats": { - "get": { + "/api/owner/CUSTOMER/{ownerId}/{entityType}/{entityId}": { + "post": { "tags": [ - "queue-stats-controller" + "owner-controller" ], - "summary": "Get Queue Stats entities (getTenantQueueStats)", - "description": "Returns a page of queue stats objects that are designed to collect queue statistics for every service. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getTenantQueueStats", + "summary": "Change owner to customer (changeOwnerToCustomer)", + "description": "Tenant/Customer changes Owner to Customer or sub-Customer. Sub-Customer can`t perform this operation! \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "changeOwnerToCustomer", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "ownerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the queue name or service id.", - "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataQueueStats" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "An optional list of additional entity group ids", + "items": { + "type": "string" } } } + } + }, + "responses": { + "200": { + "description": "OK" }, "400": { "description": "Bad Request", @@ -75035,7 +74756,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -75139,41 +74860,59 @@ ] } }, - "/api/queueStats/list": { - "get": { + "/api/owner/TENANT/{ownerId}/{entityType}/{entityId}": { + "post": { "tags": [ - "queue-stats-controller" + "owner-controller" ], - "summary": "Get QueueStats By Ids (getQueueStatsByIds)", - "description": "Fetch the Queue stats objects based on the provided ids. ", - "operationId": "getQueueStatsByIds", + "summary": "Change owner to tenant (changeOwnerToTenant)", + "description": "Tenant changes Owner from Customer or sub-Customer to Tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "changeOwnerToTenant", "parameters": [ { - "name": "queueStatsIds", - "in": "query", - "description": "A list of queue stats ids, separated by comma ','", + "name": "ownerId", + "in": "path", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" + } + }, + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueueStats" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "An optional list of additional entity group ids", + "items": { + "type": "string" } } } + } + }, + "responses": { + "200": { + "description": "OK" }, "400": { "description": "Bad Request", @@ -75187,7 +74926,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -75291,32 +75030,21 @@ ] } }, - "/api/queueStats/{queueStatsId}": { + "/api/mobile/qr/deepLink": { "get": { "tags": [ - "queue-stats-controller" - ], - "summary": "Get Queue stats entity by id (getQueueStatsById)", - "description": "Fetch the Queue stats object based on the provided Queue stats id. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getQueueStatsById", - "parameters": [ - { - "name": "queueStatsId", - "in": "path", - "description": "A string value representing the queue stats id. For example, '687f294c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "qr-code-settings-controller" ], + "summary": "Get the deep link to the associated mobile application (getMobileAppDeepLink)", + "description": "Fetch the url that takes user to linked mobile application \n\nAvailable for any authorized user. ", + "operationId": "getMobileAppDeepLink", "responses": { "200": { "description": "OK", "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/QueueStats" + "type": "string" } } } @@ -75437,42 +75165,21 @@ ] } }, - "/api/v2/report": { - "post": { + "/api/mobile/qr/merged": { + "get": { "tags": [ - "report-controller" + "qr-code-settings-controller" ], - "summary": "createReport", - "operationId": "createReport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "info": { - "type": "string" - } - }, - "required": [ - "file", - "info" - ] - } - } - } - }, + "summary": "Get QR code configuration for home page (getMergedMobileAppSettings)", + "description": "The response payload contains ui configuration of qr code\n\nAvailable for any authorized user. ", + "operationId": "getMergedMobileAppSettings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Report" + "$ref": "#/components/schemas/QrCodeSettings" } } } @@ -75489,7 +75196,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -75593,30 +75300,21 @@ ] } }, - "/api/v2/report/request": { - "post": { + "/api/mobile/qr/settings": { + "get": { "tags": [ - "report-controller" + "qr-code-settings-controller" ], - "summary": "requestReport", - "operationId": "requestReport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportRequest" - } - } - }, - "required": true - }, + "summary": "Get Mobile application settings (getQrCodeSettings)", + "description": "The response payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for any authorized user. ", + "operationId": "getQrCodeSettings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Job" + "$ref": "#/components/schemas/QrCodeSettings" } } } @@ -75633,7 +75331,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -75735,21 +75433,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/v2/report/test": { + }, "post": { "tags": [ - "report-controller" + "qr-code-settings-controller" ], - "summary": "Download test report (testReportAndDownload)", - "description": "Generate and download test report.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "testReportAndDownload", + "summary": "Create Or Update the Mobile application settings (saveQrCodeSettings)", + "description": "The request payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveQrCodeSettings", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportRequest" + "$ref": "#/components/schemas/QrCodeSettings" } } }, @@ -75761,8 +75457,7 @@ "content": { "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/QrCodeSettings" } } } @@ -75883,19 +75578,17 @@ ] } }, - "/api/v2/report/{reportId}": { + "/api/noauth/qr": { "get": { "tags": [ - "report-controller" + "qr-code-settings-controller" ], - "summary": "Get Report (getReportById)", - "description": "Fetch the Report object based on the provided report Id. The platform uses Report to store generated reports information.Referencing non-existing Report Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getReportById", + "summary": "getApplicationRedirect", + "operationId": "getApplicationRedirect", "parameters": [ { - "name": "reportId", - "in": "path", - "description": "A string value representing the report id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "User-Agent", + "in": "header", "required": true, "schema": { "type": "string" @@ -75908,147 +75601,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Report" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } + "type": "object" } } } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - }, - "delete": { - "tags": [ - "report-controller" - ], - "summary": "Delete Report (deleteReport)", - "description": "Deletes the report. Referencing non-existing Report Id will cause 'Not Found' error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteReport", - "parameters": [ - { - "name": "reportId", - "in": "path", - "description": "A string value representing the report id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" }, "400": { "description": "Bad Request", @@ -76155,32 +75711,25 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/v2/report/{reportId}/download": { + "/api/noauth/qr/{secret}": { "get": { "tags": [ - "report-controller" + "qr-code-settings-controller" ], - "summary": "downloadReport", - "operationId": "downloadReport", + "summary": "Get User Token (getUserTokenByMobileSecret)", + "description": "Returns the token of the User based on the provided secret key.", + "operationId": "getUserTokenByMobileSecret", "parameters": [ { - "name": "reportId", + "name": "secret", "in": "path", + "description": "A string value representing short-lived secret key", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], @@ -76190,8 +75739,7 @@ "content": { "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/JwtPair" } } } @@ -76301,35 +75849,87 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/v2/reportInfos": { + "/api/queues": { "get": { "tags": [ - "report-controller" + "queue-controller" ], - "summary": "getReportInfosByIds", - "operationId": "getReportInfosByIds", + "summary": "Get Queues (getTenantQueuesByServiceType)", + "description": "Returns a page of queues registered in the platform. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getTenantQueuesByServiceType", "parameters": [ { - "name": "strReportIds", + "name": "serviceType", "in": "query", - "description": "A list of report ids, separated by comma ','", + "description": "Service type (implemented only for the TB-RULE-ENGINE)", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string", + "enum": [ + "TB-RULE-ENGINE", + "TB-CORE", + "TB-TRANSPORT", + "JS-EXECUTOR" + ] + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the queue name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "topic" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -76339,10 +75939,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReportInfo" - } + "$ref": "#/components/schemas/PageDataQueue" } } } @@ -76461,100 +76058,48 @@ "ApiKeyForm": [] } ] - } - }, - "/api/v2/reportInfos/all": { - "get": { + }, + "post": { "tags": [ - "report-controller" + "queue-controller" ], - "summary": "getReportInfos", - "operationId": "getReportInfos", + "summary": "Create Or Update Queue (saveQueue)", + "description": "Create or update the Queue. When creating queue, platform generates Queue Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Specify existing Queue id to update the queue. Referencing non-existing Queue Id will cause 'Not Found' error.\n\nQueue name is unique in the scope of sysadmin. Remove 'id', 'tenantId' from the request body example (below) to create new Queue entity. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "saveQueue", "parameters": [ { - "name": "reportTemplateId", - "in": "query", - "description": "Report template id", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "userId", - "in": "query", - "description": "The user used for report generation.", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "serviceType", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "Service type (implemented only for the TB-RULE-ENGINE)", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on report's name or customer title", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" + "type": "string", + "enum": [ + "TB-RULE-ENGINE", + "TB-CORE", + "TB-TRANSPORT", + "JS-EXECUTOR" + ] } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Queue" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataReportInfo" + "$ref": "#/components/schemas/Queue" } } } @@ -76571,7 +76116,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -76675,57 +76220,20 @@ ] } }, - "/api/v2/reports": { + "/api/queues/name/{queueName}": { "get": { "tags": [ - "report-controller" + "queue-controller" ], - "summary": "getReports", - "operationId": "getReports", + "summary": "Get Queue (getQueueByName)", + "description": "Fetch the Queue object based on the provided Queue name. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getQueueByName", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "queueName", + "in": "path", + "description": "A string value representing the queue id. For example, 'Main'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on report's name or customer title", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, "schema": { "type": "string" } @@ -76737,7 +76245,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataReport" + "$ref": "#/components/schemas/Queue" } } } @@ -76858,31 +76366,32 @@ ] } }, - "/api/reportTemplate": { - "post": { + "/api/queues/{queueId}": { + "get": { "tags": [ - "report-template-controller" + "queue-controller" ], - "summary": "Save Report Template (saveReportTemplate)", - "description": "Creates or Updates report template. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. When creating report template, platform generates report template Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created report template id will be present in the response. Specify existing report template id to update the report template. Referencing non-existing report template Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Report Template entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveReportTemplate", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportTemplate" - } + "summary": "Get Queue (getQueueById)", + "description": "Fetch the Queue object based on the provided Queue Id. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getQueueById", + "parameters": [ + { + "name": "queueId", + "in": "path", + "description": "A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportTemplate" + "$ref": "#/components/schemas/Queue" } } } @@ -76899,7 +76408,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -77001,21 +76510,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/reportTemplate/info/{reportTemplateId}": { - "get": { + }, + "delete": { "tags": [ - "report-template-controller" + "queue-controller" ], - "summary": "Get Report Template Info (getReportTemplateInfoById)", - "description": "Fetch the ReportTemplateInfo object based on the provided report template Id. Report Templates allows you to create reports according to the report template configuration. Report service uses report template configuration to generate report. See the 'Model' tab of the Response Class for more details. Referencing non-existing Report Template Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getReportTemplateInfoById", + "summary": "Delete Queue (deleteQueue)", + "description": "Deletes the Queue. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "deleteQueue", "parameters": [ { - "name": "reportTemplateId", + "name": "queueId", "in": "path", - "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -77024,14 +76531,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportTemplateInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -77149,23 +76649,68 @@ ] } }, - "/api/reportTemplate/{reportTemplateId}": { + "/api/queueStats": { "get": { "tags": [ - "report-template-controller" + "queue-stats-controller" ], - "summary": "Get Report Template (getReportTemplateById)", - "description": "Fetch the ReportTemplate object based on the provided report template Id. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. Referencing non-existing Report Template Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getReportTemplateById", + "summary": "Get Queue Stats entities (getTenantQueueStats)", + "description": "Returns a page of queue stats objects that are designed to collect queue statistics for every service. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getTenantQueueStats", "parameters": [ { - "name": "reportTemplateId", - "in": "path", - "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the queue name or service id.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -77174,7 +76719,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportTemplate" + "$ref": "#/components/schemas/PageDataQueueStats" } } } @@ -77293,28 +76838,43 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/queueStats/list": { + "get": { "tags": [ - "report-template-controller" + "queue-stats-controller" ], - "summary": "Delete Report Template (deleteReportTemplate)", - "description": "Deletes the report template. Referencing non-existing Report Template Id will cause 'Not Found' error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteReportTemplate", + "summary": "Get QueueStats By Ids (getQueueStatsByIds)", + "description": "Fetch the Queue stats objects based on the provided ids. ", + "operationId": "getQueueStatsByIds", "parameters": [ { - "name": "reportTemplateId", - "in": "path", - "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "queueStatsIds", + "in": "query", + "description": "A list of queue stats ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueStats" + } + } + } + } }, "400": { "description": "Bad Request", @@ -77432,111 +76992,23 @@ ] } }, - "/api/reportTemplateInfos/all": { + "/api/queueStats/{queueStatsId}": { "get": { "tags": [ - "report-template-controller" + "queue-stats-controller" ], - "summary": "Get All Report Templates for current user (getAllReportTemplateInfos)", - "description": "Returns a page of report template info objects owned by the tenant or the customer of a current user. Report Templates allows you to create reports according to the report template configuration. Report service uses report template configuration to generate report. See the 'Model' tab of the Response Class for more details. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllReportTemplateInfos", + "summary": "Get Queue stats entity by id (getQueueStatsById)", + "description": "Fetch the Queue stats object based on the provided Queue stats id. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getQueueStatsById", "parameters": [ { - "name": "typeList", - "in": "query", - "description": "A list of string values separated by comma ',' representing one of the ReportTemplateType enumeration value.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "REPORT", - "SUB_REPORT" - ] - } - } - }, - { - "name": "formatList", - "in": "query", - "description": "A list of string values separated by comma ',' representing one of the TbReportFormat enumeration value.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "PDF", - "CSV" - ] - } - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "queueStatsId", + "in": "path", + "description": "A string value representing the queue stats id. For example, '687f294c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the report template name or customer title.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "ownerName" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -77545,7 +77017,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataReportTemplateInfo" + "$ref": "#/components/schemas/QueueStats" } } } @@ -77666,38 +77138,42 @@ ] } }, - "/api/reportTemplates": { - "get": { + "/api/v2/report": { + "post": { "tags": [ - "report-template-controller" + "report-controller" ], - "summary": "Get report templates by Report Template Ids (getReportTemplatesByIds)", - "description": "Returns a list of ReportTemplateInfo objects based on the provided ids. Filters the list based on the user permissions. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getReportTemplatesByIds", - "parameters": [ - { - "name": "reportTemplateIds", - "in": "query", - "description": "A list of report template ids, separated by comma ','", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" + "summary": "createReport", + "operationId": "createReport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + }, + "info": { + "type": "string" + } + }, + "required": [ + "file", + "info" + ] } } } - ], + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReportTemplateInfo" - } + "$ref": "#/components/schemas/Report" } } } @@ -77714,7 +77190,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -77818,19 +77294,18 @@ ] } }, - "/api/role": { + "/api/v2/report/request": { "post": { "tags": [ - "role-controller" + "report-controller" ], - "summary": "Create Or Update Role (saveRole)", - "description": "Creates or Updates the Role. When creating Role, platform generates Role Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Role id will be present in the response. Specify existing Role id to update the permission. Referencing non-existing Group Permission Id will cause 'Not Found' error.\n\nRole Contains a set of permissions. Role has two types. Generic Role may be assigned to the user group and will provide permissions for all entities of a certain type. Group Role may be assigned to both user and entity group and will provides permissions only for the entities that belong to specified entity group. The assignment of the Role to the User Group is done using [Group Permission Controller](/swagger-ui.html#/group-permission-controller).\n\nExample of Generic Role with read-only permissions for any resource and all permissions for the 'DEVICE' and 'PROFILE' resources is listed below: \n\n```json\n{\n \"name\": \"Read-Only User\",\n \"type\": \"GENERIC\",\n \"permissions\": {\n \"ALL\": [\n \"READ\",\n \"RPC_CALL\",\n \"READ_CREDENTIALS\",\n \"READ_ATTRIBUTES\",\n \"READ_TELEMETRY\"\n ],\n \"DEVICE\": [\n \"ALL\"\n ]\n \"PROFILE\": [\n \"ALL\"\n ]\n },\n \"additionalInfo\": {\n \"description\": \"Read-only permissions for everything, Write permissions for devices and own profile.\"\n }\n}\n```\n\nExample of Group Role with read-only permissions. Note that the group role has no association with the resources. The type of the resource is taken from the entity group that this role is assigned to: \n\n```json\n{\n \"name\": \"Entity Group Read-only User\",\n \"type\": \"GROUP\",\n \"permissions\": [\n \"READ\",\n \"RPC_CALL\",\n \"READ_CREDENTIALS\",\n \"READ_ATTRIBUTES\",\n \"READ_TELEMETRY\"\n ],\n \"additionalInfo\": {\n \"description\": \"Read-only permissions.\"\n }\n}\n```\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveRole", + "summary": "requestReport", + "operationId": "requestReport", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Role" + "$ref": "#/components/schemas/ReportRequest" } } }, @@ -77842,7 +77317,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Role" + "$ref": "#/components/schemas/Job" } } } @@ -77963,19 +77438,165 @@ ] } }, - "/api/role/{roleId}": { + "/api/v2/report/test": { + "post": { + "tags": [ + "report-controller" + ], + "summary": "Download test report (testReportAndDownload)", + "description": "Generate and download test report.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "testReportAndDownload", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid request body", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/v2/report/{reportId}": { "get": { "tags": [ - "role-controller" + "report-controller" ], - "summary": "Get Role by Id (getRoleById)", - "description": "Fetch the Role object based on the provided Role Id. Role Contains a set of permissions. Role has two types. Generic Role may be assigned to the user group and will provide permissions for all entities of a certain type. Group Role may be assigned to both user and entity group and will provides permissions only for the entities that belong to specified entity group. The assignment of the Role to the User Group is done using [Group Permission Controller](/swagger-ui.html#/group-permission-controller). Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getRoleById", + "summary": "Get Report (getReportById)", + "description": "Fetch the Report object based on the provided report Id. The platform uses Report to store generated reports information.Referencing non-existing Report Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getReportById", "parameters": [ { - "name": "roleId", + "name": "reportId", "in": "path", - "description": "A string value representing the role id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the report id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -77988,7 +77609,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Role" + "$ref": "#/components/schemas/Report" } } } @@ -78110,16 +77731,16 @@ }, "delete": { "tags": [ - "role-controller" + "report-controller" ], - "summary": "Delete role (deleteRole)", - "description": "Deletes the role. Referencing non-existing role Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteRole", + "summary": "Delete Report (deleteReport)", + "description": "Deletes the report. Referencing non-existing Report Id will cause 'Not Found' error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteReport", "parameters": [ { - "name": "roleId", + "name": "reportId", "in": "path", - "description": "A string value representing the role id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the report id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -78246,83 +77867,21 @@ ] } }, - "/api/roles": { + "/api/v2/report/{reportId}/download": { "get": { "tags": [ - "role-controller" + "report-controller" ], - "summary": "Get Roles (getRoles)", - "description": "Returns a page of roles that are available for the current user. Role Contains a set of permissions. Role has two types. Generic Role may be assigned to the user group and will provide permissions for all entities of a certain type. Group Role may be assigned to both user and entity group and will provides permissions only for the entities that belong to specified entity group. The assignment of the Role to the User Group is done using [Group Permission Controller](/swagger-ui.html#/group-permission-controller).You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getRoles", + "summary": "downloadReport", + "operationId": "downloadReport", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "reportId", + "in": "path", "required": true, "schema": { "type": "string", - "minimum": 0 - } - }, - { - "name": "type", - "in": "query", - "description": "Type of the role", - "required": false, - "schema": { - "type": "string", - "enum": [ - "GENERIC", - "GROUP" - ] - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the role name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "description" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "format": "uuid" } } ], @@ -78332,7 +77891,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataRole" + "type": "string", + "format": "binary" } } } @@ -78453,19 +78013,18 @@ ] } }, - "/api/roles/list": { + "/api/v2/reportInfos": { "get": { "tags": [ - "role-controller" + "report-controller" ], - "summary": "Get Roles By Ids (getRolesByIds)", - "description": "Returns the list of rows based on their ids. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getRolesByIds", + "summary": "getReportInfosByIds", + "operationId": "getReportInfosByIds", "parameters": [ { - "name": "roleIds", + "name": "strReportIds", "in": "query", - "description": "A list of role ids, separated by comma ','", + "description": "A list of report ids, separated by comma ','", "required": true, "schema": { "type": "array", @@ -78483,7 +78042,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/Role" + "$ref": "#/components/schemas/ReportInfo" } } } @@ -78605,43 +78164,98 @@ ] } }, - "/api/plugins/rpc/oneway/{deviceId}": { - "post": { + "/api/v2/reportInfos/all": { + "get": { "tags": [ - "rpc-v-1-controller" + "report-controller" ], - "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV1)", - "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleOneWayDeviceRPCRequestV1", + "summary": "getReportInfos", + "operationId": "getReportInfos", "parameters": [ { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "reportTemplateId", + "in": "query", + "description": "Report template id", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "The user used for report generation.", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on report's name or customer title", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "A JSON value representing the RPC request." - } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/PageDataReportInfo" } } } @@ -78658,7 +78272,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -78762,43 +78376,69 @@ ] } }, - "/api/plugins/rpc/twoway/{deviceId}": { - "post": { + "/api/v2/reports": { + "get": { "tags": [ - "rpc-v-1-controller" + "report-controller" ], - "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequestV1)", - "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleTwoWayDeviceRPCRequestV1", + "summary": "getReports", + "operationId": "getReports", "parameters": [ { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on report's name or customer title", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "A JSON value representing the RPC request." - } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/PageDataReport" } } } @@ -78815,7 +78455,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -78919,31 +78559,19 @@ ] } }, - "/api/rpc/oneway/{deviceId}": { + "/api/reportTemplate": { "post": { "tags": [ - "rpc-v-2-controller" - ], - "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV2)", - "description": "Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleOneWayDeviceRPCRequestV2", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "report-template-controller" ], + "summary": "Save Report Template (saveReportTemplate)", + "description": "Creates or Updates report template. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. When creating report template, platform generates report template Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created report template id will be present in the response. Specify existing report template id to update the report template. Referencing non-existing report template Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Report Template entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveReportTemplate", "requestBody": { "content": { "application/json": { "schema": { - "type": "string", - "description": "A JSON value representing the RPC request." + "$ref": "#/components/schemas/ReportTemplate" } } }, @@ -78951,51 +78579,53 @@ }, "responses": { "200": { - "description": "Persistent RPC request was saved to the database or lightweight RPC request was sent to the device.", + "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ReportTemplate" } } } }, "400": { - "description": "Invalid structure of the request.", + "description": "Bad Request", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid request body", + "errorCode": 31, + "timestamp": 1609459200000 + } + } } } } }, "401": { - "description": "User is not authorized to send the RPC request. Most likely, User belongs to different Customer or Tenant.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "413": { - "description": "Request payload is too large", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "504": { - "description": "Timeout to process the RPC call. Most likely, device is offline.", + "description": "Unauthorized", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } } } } @@ -79074,98 +78704,23 @@ ] } }, - "/api/rpc/persistent/device/{deviceId}": { + "/api/reportTemplate/info/{reportTemplateId}": { "get": { "tags": [ - "rpc-v-2-controller" + "report-template-controller" ], - "summary": "Get persistent RPC requests", - "description": "Allows to query RPC calls for specific device using pagination.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getPersistedRpcByDevice", + "summary": "Get Report Template Info (getReportTemplateInfoById)", + "description": "Fetch the ReportTemplateInfo object based on the provided report template Id. Report Templates allows you to create reports according to the report template configuration. Report service uses report template configuration to generate report. See the 'Model' tab of the Response Class for more details. Referencing non-existing Report Template Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getReportTemplateInfoById", "parameters": [ { - "name": "deviceId", + "name": "reportTemplateId", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "rpcStatus", - "in": "query", - "description": "Status of the RPC", - "required": false, - "schema": { - "type": "string", - "enum": [ - "QUEUED", - "SENT", - "DELIVERED", - "SUCCESSFUL", - "TIMEOUT", - "EXPIRED", - "FAILED" - ] - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Not implemented. Leave empty.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "expirationTime", - "request", - "response" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -79174,7 +78729,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ReportTemplateInfo" } } } @@ -79295,19 +78850,19 @@ ] } }, - "/api/rpc/persistent/{rpcId}": { + "/api/reportTemplate/{reportTemplateId}": { "get": { "tags": [ - "rpc-v-2-controller" + "report-template-controller" ], - "summary": "Get persistent RPC request", - "description": "Get information about the status of the RPC call.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getPersistedRpc", + "summary": "Get Report Template (getReportTemplateById)", + "description": "Fetch the ReportTemplate object based on the provided report template Id. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. Referencing non-existing Report Template Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getReportTemplateById", "parameters": [ { - "name": "rpcId", + "name": "reportTemplateId", "in": "path", - "description": "A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -79320,7 +78875,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Rpc" + "$ref": "#/components/schemas/ReportTemplate" } } } @@ -79442,16 +78997,16 @@ }, "delete": { "tags": [ - "rpc-v-2-controller" + "report-template-controller" ], - "summary": "Delete persistent RPC", - "description": "Deletes the persistent RPC request.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteRpc", + "summary": "Delete Report Template (deleteReportTemplate)", + "description": "Deletes the report template. Referencing non-existing Report Template Id will cause 'Not Found' error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteReportTemplate", "parameters": [ { - "name": "rpcId", + "name": "reportTemplateId", "in": "path", - "description": "A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -79578,83 +79133,162 @@ ] } }, - "/api/rpc/twoway/{deviceId}": { - "post": { + "/api/reportTemplateInfos/all": { + "get": { "tags": [ - "rpc-v-2-controller" + "report-template-controller" ], - "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequestV2)", - "description": "Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is the response from device, or 504 Gateway Timeout if device is offline.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleTwoWayDeviceRPCRequestV2", + "summary": "Get All Report Templates for current user (getAllReportTemplateInfos)", + "description": "Returns a page of report template info objects owned by the tenant or the customer of a current user. Report Templates allows you to create reports according to the report template configuration. Report service uses report template configuration to generate report. See the 'Model' tab of the Response Class for more details. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllReportTemplateInfos", "parameters": [ { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "typeList", + "in": "query", + "description": "A list of string values separated by comma ',' representing one of the ReportTemplateType enumeration value.", + "required": false, "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { + "type": "array", + "items": { "type": "string", - "description": "A JSON value representing the RPC request." + "enum": [ + "REPORT", + "SUB_REPORT" + ] } } }, - "required": true - }, - "responses": { - "200": { - "description": "Persistent RPC request was saved to the database or lightweight RPC response received.", - "content": { - "application/json": { - "schema": { - "type": "string" - } + { + "name": "formatList", + "in": "query", + "description": "A list of string values separated by comma ',' representing one of the TbReportFormat enumeration value.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "PDF", + "CSV" + ] } } }, - "400": { - "description": "Invalid structure of the request.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" } }, - "401": { - "description": "User is not authorized to send the RPC request. Most likely, User belongs to different Customer or Tenant.", + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the report template name or customer title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "ownerName" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/PageDataReportTemplateInfo" } } } }, - "413": { - "description": "Request payload is too large", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } } } } }, - "504": { - "description": "Timeout to process the RPC call. Most likely, device is offline.", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } } } } @@ -79733,29 +79367,25 @@ ] } }, - "/api/edge/{edgeId}/ruleChain/{ruleChainId}": { - "post": { + "/api/reportTemplates": { + "get": { "tags": [ - "rule-chain-controller" + "report-template-controller" ], - "summary": "Assign rule chain to edge (assignRuleChainToEdge)", - "description": "Creates assignment of an existing rule chain to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment rule chain (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once rule chain will be delivered to edge service, it's going to start processing messages locally. \n\nOnly rule chain with type 'EDGE' can be assigned to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignRuleChainToEdge", + "summary": "Get report templates by Report Template Ids (getReportTemplatesByIds)", + "description": "Returns a list of ReportTemplateInfo objects based on the provided ids. Filters the list based on the user permissions. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getReportTemplatesByIds", "parameters": [ { - "name": "edgeId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ruleChainId", - "in": "path", + "name": "reportTemplateIds", + "in": "query", + "description": "A list of report template ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -79765,7 +79395,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "type": "array", + "items": { + "$ref": "#/components/schemas/ReportTemplateInfo" + } } } } @@ -79782,7 +79415,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -79884,39 +79517,33 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/role": { + "post": { "tags": [ - "rule-chain-controller" + "role-controller" ], - "summary": "Unassign rule chain from edge (unassignRuleChainFromEdge)", - "description": "Clears assignment of the rule chain to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove rule chain (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove rule chain locally.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "unassignRuleChainFromEdge", - "parameters": [ - { - "name": "edgeId", - "in": "path", - "required": true, - "schema": { - "type": "string" + "summary": "Create Or Update Role (saveRole)", + "description": "Creates or Updates the Role. When creating Role, platform generates Role Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Role id will be present in the response. Specify existing Role id to update the permission. Referencing non-existing Group Permission Id will cause 'Not Found' error.\n\nRole Contains a set of permissions. Role has two types. Generic Role may be assigned to the user group and will provide permissions for all entities of a certain type. Group Role may be assigned to both user and entity group and will provides permissions only for the entities that belong to specified entity group. The assignment of the Role to the User Group is done using [Group Permission Controller](/swagger-ui.html#/group-permission-controller).\n\nExample of Generic Role with read-only permissions for any resource and all permissions for the 'DEVICE' and 'PROFILE' resources is listed below: \n\n```json\n{\n \"name\": \"Read-Only User\",\n \"type\": \"GENERIC\",\n \"permissions\": {\n \"ALL\": [\n \"READ\",\n \"RPC_CALL\",\n \"READ_CREDENTIALS\",\n \"READ_ATTRIBUTES\",\n \"READ_TELEMETRY\"\n ],\n \"DEVICE\": [\n \"ALL\"\n ]\n \"PROFILE\": [\n \"ALL\"\n ]\n },\n \"additionalInfo\": {\n \"description\": \"Read-only permissions for everything, Write permissions for devices and own profile.\"\n }\n}\n```\n\nExample of Group Role with read-only permissions. Note that the group role has no association with the resources. The type of the resource is taken from the entity group that this role is assigned to: \n\n```json\n{\n \"name\": \"Entity Group Read-only User\",\n \"type\": \"GROUP\",\n \"permissions\": [\n \"READ\",\n \"RPC_CALL\",\n \"READ_CREDENTIALS\",\n \"READ_ATTRIBUTES\",\n \"READ_TELEMETRY\"\n ],\n \"additionalInfo\": {\n \"description\": \"Read-only permissions.\"\n }\n}\n```\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveRole", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } } }, - { - "name": "ruleChainId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "$ref": "#/components/schemas/Role" } } } @@ -79933,7 +79560,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -80037,79 +79664,23 @@ ] } }, - "/api/edge/{edgeId}/ruleChains": { + "/api/role/{roleId}": { "get": { "tags": [ - "rule-chain-controller" + "role-controller" ], - "summary": "Get Edge Rule Chains (getEdgeRuleChains)", - "description": "Returns a page of Rule Chains assigned to the specified edge. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEdgeRuleChains", + "summary": "Get Role by Id (getRoleById)", + "description": "Fetch the Role object based on the provided Role Id. Role Contains a set of permissions. Role has two types. Generic Role may be assigned to the user group and will provide permissions for all entities of a certain type. Group Role may be assigned to both user and entity group and will provides permissions only for the entities that belong to specified entity group. The assignment of the Role to the User Group is done using [Group Permission Controller](/swagger-ui.html#/group-permission-controller). Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getRoleById", "parameters": [ { - "name": "edgeId", + "name": "roleId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the role id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the rule chain name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "root" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -80118,7 +79689,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataRuleChain" + "$ref": "#/components/schemas/Role" } } } @@ -80237,36 +79808,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/ruleChain": { - "post": { + }, + "delete": { "tags": [ - "rule-chain-controller" + "role-controller" ], - "summary": "Create Or Update Rule Chain (saveRuleChain)", - "description": "Create or update the Rule Chain. When creating Rule Chain, platform generates Rule Chain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Rule Chain Id will be present in the response. Specify existing Rule Chain id to update the rule chain. Referencing non-existing rule chain Id will cause 'Not Found' error.\n\nThe rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.Remove 'id', 'tenantId' from the request body example (below) to create new Rule Chain entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveRuleChain", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleChain" - } + "summary": "Delete role (deleteRole)", + "description": "Deletes the role. Referencing non-existing role Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteRole", + "parameters": [ + { + "name": "roleId", + "in": "path", + "description": "A string value representing the role id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleChain" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -80280,7 +79843,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -80384,24 +79947,93 @@ ] } }, - "/api/ruleChain/autoAssignToEdgeRuleChains": { + "/api/roles": { "get": { "tags": [ - "rule-chain-controller" + "role-controller" + ], + "summary": "Get Roles (getRoles)", + "description": "Returns a page of roles that are available for the current user. Role Contains a set of permissions. Role has two types. Generic Role may be assigned to the user group and will provide permissions for all entities of a certain type. Group Role may be assigned to both user and entity group and will provides permissions only for the entities that belong to specified entity group. The assignment of the Role to the User Group is done using [Group Permission Controller](/swagger-ui.html#/group-permission-controller).You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getRoles", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "type", + "in": "query", + "description": "Type of the role", + "required": false, + "schema": { + "type": "string", + "enum": [ + "GENERIC", + "GROUP" + ] + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the role name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "description" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } ], - "summary": "Get Auto Assign To Edge Rule Chains (getAutoAssignToEdgeRuleChains)", - "description": "Returns a list of Rule Chains that will be assigned to a newly created edge. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAutoAssignToEdgeRuleChains", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RuleChain" - } + "$ref": "#/components/schemas/PageDataRole" } } } @@ -80522,31 +80154,38 @@ ] } }, - "/api/ruleChain/device/default": { - "post": { + "/api/roles/list": { + "get": { "tags": [ - "rule-chain-controller" + "role-controller" ], - "summary": "Create Default Rule Chain (setDeviceDefaultRuleChain)", - "description": "Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setDeviceDefaultRuleChain", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DefaultRuleChainCreateRequest" + "summary": "Get Roles By Ids (getRolesByIds)", + "description": "Returns the list of rows based on their ids. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getRolesByIds", + "parameters": [ + { + "name": "roleIds", + "in": "query", + "description": "A list of role ids, separated by comma ','", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" } } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } } } } @@ -80563,7 +80202,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -80667,23 +80306,22 @@ ] } }, - "/api/ruleChain/metadata": { + "/api/plugins/rpc/oneway/{deviceId}": { "post": { "tags": [ - "rule-chain-controller" + "rpc-v-1-controller" ], - "summary": "Update Rule Chain Metadata", - "description": "Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveRuleChainMetaData", + "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV1)", + "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "handleOneWayDeviceRPCRequestV1", "parameters": [ { - "name": "updateRelated", - "in": "query", - "description": "Update related rule nodes.", - "required": false, + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "boolean", - "default": true + "type": "string" } } ], @@ -80691,7 +80329,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChainMetaData" + "type": "string", + "description": "A JSON value representing the RPC request." } } }, @@ -80703,7 +80342,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChainMetaData" + "type": "string" } } } @@ -80824,21 +80463,43 @@ ] } }, - "/api/ruleChain/tbelEnabled": { - "get": { + "/api/plugins/rpc/twoway/{deviceId}": { + "post": { "tags": [ - "rule-chain-controller" + "rpc-v-1-controller" ], - "summary": "Is TBEL script executor enabled", - "description": "Returns 'True' if the TBEL script execution is enabled\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "isTbelEnabled", + "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequestV1)", + "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "handleTwoWayDeviceRPCRequestV1", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "A JSON value representing the RPC request." + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "type": "string" } } } @@ -80855,7 +80516,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -80959,31 +80620,31 @@ ] } }, - "/api/ruleChain/testScript": { + "/api/rpc/oneway/{deviceId}": { "post": { "tags": [ - "rule-chain-controller" + "rpc-v-2-controller" ], - "summary": "Test Script function", - "description": "Execute the Script function and return the result. The format of request: \n\n```json\n{\n \"script\": \"Your Function as String\",\n \"scriptType\": \"One of: update, generate, filter, switch, json, string\",\n \"argNames\": [\"msg\", \"metadata\", \"type\"],\n \"msg\": \"{\\\"temperature\\\": 42}\", \n \"metadata\": {\n \"deviceName\": \"Device A\",\n \"deviceType\": \"Thermometer\"\n },\n \"msgType\": \"POST_TELEMETRY_REQUEST\"\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "testRuleChainScript", + "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV2)", + "description": "Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "handleOneWayDeviceRPCRequestV2", "parameters": [ { - "name": "scriptLang", - "in": "query", - "description": "Script language: JS or TBEL", - "required": false, + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "$ref": "#/components/schemas/ScriptLanguage" + "type": "string" } } ], "requestBody": { - "description": "Test JS request. See API call description above.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "type": "string", + "description": "A JSON value representing the RPC request." } } }, @@ -80991,53 +80652,51 @@ }, "responses": { "200": { - "description": "OK", + "description": "Persistent RPC request was saved to the database or lightweight RPC request was sent to the device.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "type": "string" } } } }, "400": { - "description": "Bad Request", + "description": "Invalid structure of the request.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid request body", - "errorCode": 31, - "timestamp": 1609459200000 - } - } + "type": "string" } } } }, "401": { - "description": "Unauthorized", + "description": "User is not authorized to send the RPC request. Most likely, User belongs to different Customer or Tenant.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } + "type": "string" + } + } + } + }, + "413": { + "description": "Request payload is too large", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "504": { + "description": "Timeout to process the RPC call. Most likely, device is offline.", + "content": { + "application/json": { + "schema": { + "type": "string" } } } @@ -81116,23 +80775,98 @@ ] } }, - "/api/ruleChain/{ruleChainId}": { + "/api/rpc/persistent/device/{deviceId}": { "get": { "tags": [ - "rule-chain-controller" + "rpc-v-2-controller" ], - "summary": "Get Rule Chain (getRuleChainById)", - "description": "Fetch the Rule Chain object based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getRuleChainById", + "summary": "Get persistent RPC requests", + "description": "Allows to query RPC calls for specific device using pagination.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getPersistedRpcByDevice", "parameters": [ { - "name": "ruleChainId", + "name": "deviceId", "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "rpcStatus", + "in": "query", + "description": "Status of the RPC", + "required": false, + "schema": { + "type": "string", + "enum": [ + "QUEUED", + "SENT", + "DELIVERED", + "SUCCESSFUL", + "TIMEOUT", + "EXPIRED", + "FAILED" + ] + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Not implemented. Leave empty.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "expirationTime", + "request", + "response" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -81141,7 +80875,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "type": "string" } } } @@ -81260,19 +80994,21 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/rpc/persistent/{rpcId}": { + "get": { "tags": [ - "rule-chain-controller" + "rpc-v-2-controller" ], - "summary": "Delete rule chain (deleteRuleChain)", - "description": "Deletes the rule chain. Referencing non-existing rule chain Id will cause an error. Referencing rule chain that is used in the device profiles will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteRuleChain", + "summary": "Get persistent RPC request", + "description": "Get information about the status of the RPC call.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getPersistedRpc", "parameters": [ { - "name": "ruleChainId", + "name": "rpcId", "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -81281,7 +81017,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Rpc" + } + } + } }, "400": { "description": "Bad Request", @@ -81397,21 +81140,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/ruleChain/{ruleChainId}/autoAssignToEdge": { - "post": { + }, + "delete": { "tags": [ - "rule-chain-controller" + "rpc-v-2-controller" ], - "summary": "Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain)", - "description": "Makes the rule chain to be automatically assigned for any new edge that will be created. Does not assign this rule chain for already created edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setAutoAssignToEdgeRuleChain", + "summary": "Delete persistent RPC", + "description": "Deletes the persistent RPC request.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteRpc", "parameters": [ { - "name": "ruleChainId", + "name": "rpcId", "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -81420,14 +81161,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleChain" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -81441,7 +81175,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -81543,19 +81277,183 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/rpc/twoway/{deviceId}": { + "post": { + "tags": [ + "rpc-v-2-controller" + ], + "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequestV2)", + "description": "Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is the response from device, or 504 Gateway Timeout if device is offline.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "handleTwoWayDeviceRPCRequestV2", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "A JSON value representing the RPC request." + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Persistent RPC request was saved to the database or lightweight RPC response received.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Invalid structure of the request.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "User is not authorized to send the RPC request. Most likely, User belongs to different Customer or Tenant.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "413": { + "description": "Request payload is too large", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "504": { + "description": "Timeout to process the RPC call. Most likely, device is offline.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/edge/{edgeId}/ruleChain/{ruleChainId}": { + "post": { "tags": [ "rule-chain-controller" ], - "summary": "Unset Auto Assign To Edge Rule Chain (unsetAutoAssignToEdgeRuleChain)", - "description": "Removes the rule chain from the list of rule chains that are going to be automatically assigned for any new edge that will be created. Does not unassign this rule chain for already assigned edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "unsetAutoAssignToEdgeRuleChain", + "summary": "Assign rule chain to edge (assignRuleChainToEdge)", + "description": "Creates assignment of an existing rule chain to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment rule chain (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once rule chain will be delivered to edge service, it's going to start processing messages locally. \n\nOnly rule chain with type 'EDGE' can be assigned to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignRuleChainToEdge", "parameters": [ + { + "name": "edgeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "ruleChainId", "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -81585,7 +81483,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -81687,21 +81585,26 @@ "ApiKeyForm": [] } ] - } - }, - "/api/ruleChain/{ruleChainId}/edgeTemplateRoot": { - "post": { + }, + "delete": { "tags": [ "rule-chain-controller" ], - "summary": "Set Edge Template Root Rule Chain (setEdgeTemplateRootRuleChain)", - "description": "Makes the rule chain to be root rule chain for any new edge that will be created. Does not update root rule chain for already created edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setEdgeTemplateRootRuleChain", + "summary": "Unassign rule chain from edge (unassignRuleChainFromEdge)", + "description": "Clears assignment of the rule chain to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove rule chain (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove rule chain locally.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unassignRuleChainFromEdge", "parameters": [ + { + "name": "edgeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "ruleChainId", "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -81731,7 +81634,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -81835,23 +81738,79 @@ ] } }, - "/api/ruleChain/{ruleChainId}/metadata": { + "/api/edge/{edgeId}/ruleChains": { "get": { "tags": [ "rule-chain-controller" ], - "summary": "Get Rule Chain (getRuleChainById)", - "description": "Fetch the Rule Chain Metadata object based on the provided Rule Chain Id. The metadata object contains information about the rule nodes and their connections.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getRuleChainMetaData", + "summary": "Get Edge Rule Chains (getEdgeRuleChains)", + "description": "Returns a page of Rule Chains assigned to the specified edge. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEdgeRuleChains", "parameters": [ { - "name": "ruleChainId", + "name": "edgeId", "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the rule chain name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "root" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -81860,7 +81819,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChainMetaData" + "$ref": "#/components/schemas/PageDataRuleChain" } } } @@ -81981,36 +81940,31 @@ ] } }, - "/api/ruleChain/{ruleChainId}/output/labels": { - "get": { + "/api/ruleChain": { + "post": { "tags": [ "rule-chain-controller" ], - "summary": "Get Rule Chain output labels (getRuleChainOutputLabels)", - "description": "Fetch the unique labels for the \"output\" Rule Nodes that belong to the Rule Chain based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getRuleChainOutputLabels", - "parameters": [ - { - "name": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Create Or Update Rule Chain (saveRuleChain)", + "description": "Create or update the Rule Chain. When creating Rule Chain, platform generates Rule Chain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Rule Chain Id will be present in the response. Specify existing Rule Chain id to update the rule chain. Referencing non-existing rule chain Id will cause 'Not Found' error.\n\nThe rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.Remove 'id', 'tenantId' from the request body example (below) to create new Rule Chain entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveRuleChain", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChain" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true + "$ref": "#/components/schemas/RuleChain" } } } @@ -82027,7 +81981,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -82131,25 +82085,14 @@ ] } }, - "/api/ruleChain/{ruleChainId}/output/labels/usage": { + "/api/ruleChain/autoAssignToEdgeRuleChains": { "get": { "tags": [ "rule-chain-controller" ], - "summary": "Get output labels usage (getRuleChainOutputLabelsUsage)", - "description": "Fetch the list of rule chains and the relation types (labels) they use to process output of the current rule chain based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getRuleChainOutputLabelsUsage", - "parameters": [ - { - "name": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Get Auto Assign To Edge Rule Chains (getAutoAssignToEdgeRuleChains)", + "description": "Returns a list of Rule Chains that will be assigned to a newly created edge. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAutoAssignToEdgeRuleChains", "responses": { "200": { "description": "OK", @@ -82158,7 +82101,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/RuleChainOutputLabelsUsage" + "$ref": "#/components/schemas/RuleChain" } } } @@ -82280,25 +82223,24 @@ ] } }, - "/api/ruleChain/{ruleChainId}/root": { + "/api/ruleChain/device/default": { "post": { "tags": [ "rule-chain-controller" ], - "summary": "Set Root Rule Chain (setRootRuleChain)", - "description": "Makes the rule chain to be root rule chain. Updates previous root rule chain as well. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setRootRuleChain", - "parameters": [ - { - "name": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Create Default Rule Chain (setDeviceDefaultRuleChain)", + "description": "Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setDeviceDefaultRuleChain", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultRuleChainCreateRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -82426,92 +82368,43 @@ ] } }, - "/api/ruleChains": { - "get": { + "/api/ruleChain/metadata": { + "post": { "tags": [ "rule-chain-controller" ], - "summary": "Get Rule Chains (getRuleChains)", - "description": "Returns a page of Rule Chains owned by tenant. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getRuleChains", + "summary": "Update Rule Chain Metadata", + "description": "Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveRuleChainMetaData", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "Rule chain type (CORE or EDGE)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "CORE", - "EDGE" - ] - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the rule chain name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "root" - ] - } - }, - { - "name": "sortOrder", + "name": "updateRelated", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Update related rule nodes.", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "boolean", + "default": true } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChainMetaData" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataRuleChain" + "$ref": "#/components/schemas/RuleChainMetaData" } } } @@ -82528,7 +82421,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -82632,33 +82525,21 @@ ] } }, - "/api/ruleChains/export": { + "/api/ruleChain/tbelEnabled": { "get": { "tags": [ "rule-chain-controller" ], - "summary": "Export Rule Chains", - "description": "Exports all tenant rule chains as one JSON.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "exportRuleChains", - "parameters": [ - { - "name": "limit", - "in": "query", - "description": "A limit of rule chains to export.", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], + "summary": "Is TBEL script executor enabled", + "description": "Returns 'True' if the TBEL script execution is enabled\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "isTbelEnabled", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChainData" + "type": "boolean" } } } @@ -82779,31 +82660,31 @@ ] } }, - "/api/ruleChains/import": { + "/api/ruleChain/testScript": { "post": { "tags": [ "rule-chain-controller" ], - "summary": "Import Rule Chains", - "description": "Imports all tenant rule chains as one JSON.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "importRuleChains", + "summary": "Test Script function", + "description": "Execute the Script function and return the result. The format of request: \n\n```json\n{\n \"script\": \"Your Function as String\",\n \"scriptType\": \"One of: update, generate, filter, switch, json, string\",\n \"argNames\": [\"msg\", \"metadata\", \"type\"],\n \"msg\": \"{\\\"temperature\\\": 42}\", \n \"metadata\": {\n \"deviceName\": \"Device A\",\n \"deviceType\": \"Thermometer\"\n },\n \"msgType\": \"POST_TELEMETRY_REQUEST\"\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "testRuleChainScript", "parameters": [ { - "name": "overwrite", + "name": "scriptLang", "in": "query", - "description": "Enables overwrite for existing rule chains with the same name.", + "description": "Script language: JS or TBEL", "required": false, "schema": { - "type": "boolean", - "default": false + "$ref": "#/components/schemas/ScriptLanguage" } } ], "requestBody": { + "description": "Test JS request. See API call description above.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChainData" + "$ref": "#/components/schemas/JsonNode" } } }, @@ -82815,10 +82696,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RuleChainImportResult" - } + "$ref": "#/components/schemas/JsonNode" } } } @@ -82939,25 +82817,22 @@ ] } }, - "/api/ruleChains/list": { + "/api/ruleChain/{ruleChainId}": { "get": { "tags": [ "rule-chain-controller" ], - "summary": "Get Rule Chains By Ids (getRuleChainsByIds)", - "description": "Requested rule chains must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getRuleChainsByIds", + "summary": "Get Rule Chain (getRuleChainById)", + "description": "Fetch the Rule Chain object based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChainById", "parameters": [ { - "name": "ruleChainIds", - "in": "query", - "description": "A list of rule chain ids, separated by comma ','", + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -82967,10 +82842,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RuleChain" - } + "$ref": "#/components/schemas/RuleChain" } } } @@ -83089,21 +82961,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/ruleNode/{ruleNodeId}/debugIn": { - "get": { + }, + "delete": { "tags": [ "rule-chain-controller" ], - "summary": "Get latest input message (getLatestRuleNodeDebugInput)", - "description": "Gets the input message from the debug events for specified Rule Chain Id. Referencing non-existing rule chain Id will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getLatestRuleNodeDebugInput", + "summary": "Delete rule chain (deleteRuleChain)", + "description": "Deletes the rule chain. Referencing non-existing rule chain Id will cause an error. Referencing rule chain that is used in the device profiles will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteRuleChain", "parameters": [ { - "name": "ruleNodeId", + "name": "ruleChainId", "in": "path", - "description": "A string value representing the rule node id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -83112,14 +82982,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -83237,32 +83100,32 @@ ] } }, - "/api/rule-engine/": { + "/api/ruleChain/{ruleChainId}/autoAssignToEdge": { "post": { "tags": [ - "rule-engine-controller" + "rule-chain-controller" ], - "summary": "Push user message to the rule engine (handleRuleEngineRequestForUser)", - "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequestForUser", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "A JSON value representing the message." - } + "summary": "Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain)", + "description": "Makes the rule chain to be automatically assigned for any new edge that will be created. Does not assign this rule chain for already created edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setAutoAssignToEdgeRuleChain", + "parameters": [ + { + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/RuleChain" } } } @@ -83381,54 +83244,32 @@ "ApiKeyForm": [] } ] - } - }, - "/api/rule-engine/{entityType}/{entityId}": { - "post": { + }, + "delete": { "tags": [ - "rule-engine-controller" + "rule-chain-controller" ], - "summary": "Push entity message to the rule engine (handleRuleEngineRequestForEntity)", - "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequestForEntity", + "summary": "Unset Auto Assign To Edge Rule Chain (unsetAutoAssignToEdgeRuleChain)", + "description": "Removes the rule chain from the list of rule chains that are going to be automatically assigned for any new edge that will be created. Does not unassign this rule chain for already assigned edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unsetAutoAssignToEdgeRuleChain", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "ruleChainId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "A JSON value representing the message." - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/RuleChain" } } } @@ -83445,7 +83286,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -83549,71 +83390,32 @@ ] } }, - "/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}": { + "/api/ruleChain/{ruleChainId}/edgeTemplateRoot": { "post": { "tags": [ - "rule-engine-controller" + "rule-chain-controller" ], - "summary": "Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout)", - "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequestForEntityWithQueueAndTimeout", + "summary": "Set Edge Template Root Rule Chain (setEdgeTemplateRootRuleChain)", + "description": "Makes the rule chain to be root rule chain for any new edge that will be created. Does not update root rule chain for already created edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setEdgeTemplateRootRuleChain", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "queueName", + "name": "ruleChainId", "in": "path", - "description": "Queue name to process the request in the rule engine", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "timeout", - "in": "path", - "description": "Timeout to process the request in milliseconds", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "A JSON value representing the message." - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/RuleChain" } } } @@ -83734,62 +83536,32 @@ ] } }, - "/api/rule-engine/{entityType}/{entityId}/{timeout}": { - "post": { + "/api/ruleChain/{ruleChainId}/metadata": { + "get": { "tags": [ - "rule-engine-controller" + "rule-chain-controller" ], - "summary": "Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout)", - "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequestForEntityWithTimeout", + "summary": "Get Rule Chain (getRuleChainById)", + "description": "Fetch the Rule Chain Metadata object based on the provided Rule Chain Id. The metadata object contains information about the rule nodes and their connections.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChainMetaData", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "ruleChainId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "timeout", - "in": "path", - "description": "Timeout to process the request in milliseconds", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "A JSON value representing the message." - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/RuleChainMetaData" } } } @@ -83806,7 +83578,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -83910,19 +83682,19 @@ ] } }, - "/api/edge/{edgeId}/allSchedulerEvents": { + "/api/ruleChain/{ruleChainId}/output/labels": { "get": { "tags": [ - "scheduler-event-controller" + "rule-chain-controller" ], - "summary": "Get All Edge Scheduler Events (getAllEdgeSchedulerEvents)", - "description": "Fetch the list of Scheduler Event Info objects based on the provided Edge entity. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllEdgeSchedulerEvents", + "summary": "Get Rule Chain output labels (getRuleChainOutputLabels)", + "description": "Fetch the unique labels for the \"output\" Rule Nodes that belong to the Rule Chain based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChainOutputLabels", "parameters": [ { - "name": "edgeId", + "name": "ruleChainId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -83937,8 +83709,9 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/SchedulerEventInfo" - } + "type": "string" + }, + "uniqueItems": true } } } @@ -84059,28 +83832,19 @@ ] } }, - "/api/edge/{edgeId}/schedulerEvent/{schedulerEventId}": { - "post": { + "/api/ruleChain/{ruleChainId}/output/labels/usage": { + "get": { "tags": [ - "scheduler-event-controller" + "rule-chain-controller" ], - "summary": "Assign scheduler event to edge (assignSchedulerEventToEdge)", - "description": "Creates assignment of an existing scheduler event to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment scheduler event (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once scheduler event will be delivered to edge service, it is going to be available for usage on remote edge instance. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "assignSchedulerEventToEdge", + "summary": "Get output labels usage (getRuleChainOutputLabelsUsage)", + "description": "Fetch the list of rule chains and the relation types (labels) they use to process output of the current rule chain based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChainOutputLabelsUsage", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "schedulerEventId", + "name": "ruleChainId", "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -84093,7 +83857,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEventInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/RuleChainOutputLabelsUsage" + } } } } @@ -84110,7 +83877,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -84212,28 +83979,21 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/ruleChain/{ruleChainId}/root": { + "post": { "tags": [ - "scheduler-event-controller" + "rule-chain-controller" ], - "summary": "Unassign scheduler event from edge (unassignSchedulerEventFromEdge)", - "description": "Clears assignment of the scheduler event to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity group and entities inside this group locally.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "unassignSchedulerEventFromEdge", + "summary": "Set Root Rule Chain (setRootRuleChain)", + "description": "Makes the rule chain to be root rule chain. Updates previous root rule chain as well. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setRootRuleChain", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "schedulerEventId", + "name": "ruleChainId", "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -84246,7 +84006,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEventInfo" + "$ref": "#/components/schemas/RuleChain" } } } @@ -84263,7 +84023,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -84367,32 +84127,23 @@ ] } }, - "/api/edge/{edgeId}/schedulerEvents": { + "/api/ruleChains": { "get": { "tags": [ - "scheduler-event-controller" + "rule-chain-controller" ], - "summary": "Get Edge Scheduler Events (getEdgeSchedulerEvents)", - "description": "Returns a page of Scheduler Events Info objects based on the provided Edge entity. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getEdgeSchedulerEvents", + "summary": "Get Rule Chains (getRuleChains)", + "description": "Returns a page of Rule Chains owned by tenant. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChains", "parameters": [ - { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pageSize", "in": "query", "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string", - "minimum": 1 + "type": "integer", + "format": "int32" } }, { @@ -84400,15 +84151,28 @@ "in": "query", "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "Rule chain type (CORE or EDGE)", + "required": false, "schema": { "type": "string", - "minimum": 0 + "enum": [ + "CORE", + "EDGE" + ] } }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'startsWith' filter based on the scheduler event name.", + "description": "The case insensitive 'substring' filter based on the rule chain name.", "required": false, "schema": { "type": "string" @@ -84420,7 +84184,12 @@ "description": "Property of entity to sort by", "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "createdTime", + "name", + "root" + ] } }, { @@ -84443,7 +84212,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataSchedulerEventInfo" + "$ref": "#/components/schemas/PageDataRuleChain" } } } @@ -84564,93 +84333,23 @@ ] } }, - "/api/scheduledReports": { + "/api/ruleChains/export": { "get": { "tags": [ - "scheduler-event-controller" + "rule-chain-controller" ], - "summary": "Get Scheduled Report Events (getScheduledReportEvents)", - "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getScheduledReportEvents", + "summary": "Export Rule Chains", + "description": "Exports all tenant rule chains as one JSON.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "exportRuleChains", "parameters": [ { - "name": "reportTemplateId", - "in": "query", - "description": "Report template id", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "userId", - "in": "query", - "description": "The user used for report generation.", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", + "name": "limit", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A limit of rule chains to export.", "required": true, "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the scheduler event name or customer title.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "integer", + "format": "int32" } } ], @@ -84660,7 +84359,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataScheduledReportInfo" + "$ref": "#/components/schemas/RuleChainData" } } } @@ -84781,19 +84480,31 @@ ] } }, - "/api/schedulerEvent": { + "/api/ruleChains/import": { "post": { "tags": [ - "scheduler-event-controller" + "rule-chain-controller" + ], + "summary": "Import Rule Chains", + "description": "Imports all tenant rule chains as one JSON.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "importRuleChains", + "parameters": [ + { + "name": "overwrite", + "in": "query", + "description": "Enables overwrite for existing rule chains with the same name.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } ], - "summary": "Save Scheduler Event (saveSchedulerEvent)", - "description": "Creates or Updates scheduler event. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. When creating scheduler event, platform generates scheduler event Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created scheduler event id will be present in the response. Specify existing scheduler event id to update the scheduler event. Referencing non-existing scheduler event Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Scheduler Event entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveSchedulerEvent", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEvent" + "$ref": "#/components/schemas/RuleChainData" } } }, @@ -84805,7 +84516,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEvent" + "type": "array", + "items": { + "$ref": "#/components/schemas/RuleChainImportResult" + } } } } @@ -84926,22 +84640,25 @@ ] } }, - "/api/schedulerEvent/info/{schedulerEventId}": { + "/api/ruleChains/list": { "get": { "tags": [ - "scheduler-event-controller" + "rule-chain-controller" ], - "summary": "Get Scheduler Event With Customer Info (getSchedulerEventInfoById)", - "description": "Fetch the SchedulerEventWithCustomerInfo object based on the provided scheduler event Id. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEventInfoById", + "summary": "Get Rule Chains By Ids (getRuleChainsByIds)", + "description": "Requested rule chains must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getRuleChainsByIds", "parameters": [ { - "name": "schedulerEventId", - "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "ruleChainIds", + "in": "query", + "description": "A list of rule chain ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -84951,7 +84668,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/RuleChain" + } } } } @@ -85072,19 +84792,19 @@ ] } }, - "/api/schedulerEvent/{schedulerEventId}": { + "/api/ruleNode/{ruleNodeId}/debugIn": { "get": { "tags": [ - "scheduler-event-controller" + "rule-chain-controller" ], - "summary": "Get Scheduler Event (getSchedulerEventById)", - "description": "Fetch the SchedulerEvent object based on the provided scheduler event Id. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEventById", + "summary": "Get latest input message (getLatestRuleNodeDebugInput)", + "description": "Gets the input message from the debug events for specified Rule Chain Id. Referencing non-existing rule chain Id will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getLatestRuleNodeDebugInput", "parameters": [ { - "name": "schedulerEventId", + "name": "ruleNodeId", "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the rule node id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -85097,7 +84817,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEvent" + "$ref": "#/components/schemas/JsonNode" } } } @@ -85216,28 +84936,37 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/rule-engine/": { + "post": { "tags": [ - "scheduler-event-controller" + "rule-engine-controller" ], - "summary": "Delete Scheduler Event (deleteSchedulerEvent)", - "description": "Deletes the scheduler event. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteSchedulerEvent", - "parameters": [ - { - "name": "schedulerEventId", - "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Push user message to the rule engine (handleRuleEngineRequestForUser)", + "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "handleRuleEngineRequestForUser", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "A JSON value representing the message." + } } - } - ], + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } }, "400": { "description": "Bad Request", @@ -85251,7 +84980,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -85355,41 +85084,52 @@ ] } }, - "/api/schedulerEvent/{schedulerEventId}/enabled/{enabledValue}": { - "put": { + "/api/rule-engine/{entityType}/{entityId}": { + "post": { "tags": [ - "scheduler-event-controller" + "rule-engine-controller" ], - "summary": "Enable or disable Scheduler Event (enableSchedulerEvent)", - "description": "Updates scheduler event with enabled = true/false. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "enableSchedulerEvent", + "summary": "Push entity message to the rule engine (handleRuleEngineRequestForEntity)", + "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "handleRuleEngineRequestForEntity", "parameters": [ { - "name": "schedulerEventId", + "name": "entityType", "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } }, { - "name": "enabledValue", + "name": "entityId", "in": "path", - "description": "Enabled or disabled scheduler", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "boolean" + "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "A JSON value representing the message." + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEvent" + "type": "string" } } } @@ -85406,7 +85146,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -85510,89 +85250,71 @@ ] } }, - "/api/schedulerEvents": { - "get": { + "/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}": { + "post": { "tags": [ - "scheduler-event-controller" + "rule-engine-controller" ], - "summary": "Get scheduler events (getSchedulerEvents)", - "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEvents", + "summary": "Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout)", + "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "handleRuleEngineRequestForEntityWithQueueAndTimeout", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on event's name, type, or customer's name", - "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } }, { - "name": "type", - "in": "query", - "description": "A string value representing the scheduler type. For example, 'generateReport'", - "required": false, + "name": "queueName", + "in": "path", + "description": "Queue name to process the request in the rule engine", + "required": true, "schema": { "type": "string" } }, { - "name": "edgeId", - "in": "query", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, + "name": "timeout", + "in": "path", + "description": "Timeout to process the request in milliseconds", + "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "integer", + "format": "int32" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "A JSON value representing the message." + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataSchedulerEventWithCustomerInfo" + "type": "string" } } } @@ -85609,7 +85331,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -85713,35 +85435,62 @@ ] } }, - "/api/schedulerEvents/all": { - "get": { + "/api/rule-engine/{entityType}/{entityId}/{timeout}": { + "post": { "tags": [ - "scheduler-event-controller" + "rule-engine-controller" ], - "summary": "Get all scheduler events (getAllSchedulerEvents)", - "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllSchedulerEvents", + "summary": "Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout)", + "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "handleRuleEngineRequestForEntityWithTimeout", "parameters": [ { - "name": "type", - "in": "query", - "description": "A string value representing the scheduler type. For example, 'generateReport'", - "required": false, + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, "schema": { "type": "string" } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "path", + "description": "Timeout to process the request in milliseconds", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "A JSON value representing the message." + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" - } + "type": "string" } } } @@ -85758,7 +85507,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -85862,25 +85611,22 @@ ] } }, - "/api/schedulerEvents/list": { + "/api/edge/{edgeId}/allSchedulerEvents": { "get": { "tags": [ "scheduler-event-controller" ], - "summary": "Get Scheduler Events By Ids (getSchedulerEventsByIds)", - "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEventsByIds", + "summary": "Get All Edge Scheduler Events (getAllEdgeSchedulerEvents)", + "description": "Fetch the list of Scheduler Event Info objects based on the provided Edge entity. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllEdgeSchedulerEvents", "parameters": [ { - "name": "schedulerEventIds", - "in": "query", - "description": "A list of scheduler event ids, separated by comma ','", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -86014,59 +85760,29 @@ ] } }, - "/api/schedulerEvents/startTime/{startTime}/endTime/{endTime}": { - "get": { + "/api/edge/{edgeId}/schedulerEvent/{schedulerEventId}": { + "post": { "tags": [ "scheduler-event-controller" ], - "summary": "Get scheduler events (getSchedulerEventsByRange)", - "description": "Retrieves scheduler events filtering by event run time. Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEventsByRange", + "summary": "Assign scheduler event to edge (assignSchedulerEventToEdge)", + "description": "Creates assignment of an existing scheduler event to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment scheduler event (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once scheduler event will be delivered to edge service, it is going to be available for usage on remote edge instance. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "assignSchedulerEventToEdge", "parameters": [ { - "name": "startTime", + "name": "edgeId", "in": "path", - "description": "Start time filter in milliseconds for scheduler event run time", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, { - "name": "endTime", + "name": "schedulerEventId", "in": "path", - "description": "End time filter in milliseconds for scheduler event run time", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the scheduler type. For example, 'generateReport'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "edgeId", - "in": "query", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on event's name, type, or customer's name", - "required": false, "schema": { "type": "string" } @@ -86078,10 +85794,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" - } + "$ref": "#/components/schemas/SchedulerEventInfo" } } } @@ -86098,7 +85811,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -86200,20 +85913,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/secret": { - "get": { + }, + "delete": { "tags": [ - "secret-controller" + "scheduler-event-controller" ], - "summary": "Get Secret info by name (getSecretInfoByName)", - "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getSecretInfoByName", + "summary": "Unassign scheduler event from edge (unassignSchedulerEventFromEdge)", + "description": "Clears assignment of the scheduler event to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity group and entities inside this group locally.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "unassignSchedulerEventFromEdge", "parameters": [ { - "name": "name", - "in": "query", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "schedulerEventId", + "in": "path", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -86226,7 +85947,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecretInfo" + "$ref": "#/components/schemas/SchedulerEventInfo" } } } @@ -86345,31 +86066,85 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/edge/{edgeId}/schedulerEvents": { + "get": { "tags": [ - "secret-controller" + "scheduler-event-controller" ], - "summary": "Save or Update Secret (saveSecret)", - "description": "Create or update the Secret. When creating secret, platform generates Secret Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Secret Id will be present in the response. Specify existing Secret Id to update the secret. Secret name is not updatable, only value could be changed. Referencing non-existing Secret Id will cause 'Not Found' error.\n\nSecret name is unique in the scope of tenant.", - "operationId": "saveSecret", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Secret" - } + "summary": "Get Edge Scheduler Events (getEdgeSchedulerEvents)", + "description": "Returns a page of Scheduler Events Info objects based on the provided Edge entity. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getEdgeSchedulerEvents", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the scheduler event name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecretInfo" + "$ref": "#/components/schemas/PageDataSchedulerEventInfo" } } } @@ -86386,7 +86161,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -86490,24 +86265,103 @@ ] } }, - "/api/secret/names": { + "/api/scheduledReports": { "get": { "tags": [ - "secret-controller" + "scheduler-event-controller" + ], + "summary": "Get Scheduled Report Events (getScheduledReportEvents)", + "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getScheduledReportEvents", + "parameters": [ + { + "name": "reportTemplateId", + "in": "query", + "description": "Report template id", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "The user used for report generation.", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the scheduler event name or customer title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } ], - "summary": "Get Tenant Secret names (getSecretNames)", - "description": "Returns a page of secret names owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getSecretNames", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/PageDataScheduledReportInfo" } } } @@ -86628,32 +86482,31 @@ ] } }, - "/api/secret/{id}": { - "delete": { + "/api/schedulerEvent": { + "post": { "tags": [ - "secret-controller" + "scheduler-event-controller" ], - "summary": "Delete secret by ID (deleteSecret)", - "description": "Deletes the secret. Referencing non-existing Secret Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteSecret", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Save Scheduler Event (saveSchedulerEvent)", + "description": "Creates or Updates scheduler event. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. When creating scheduler event, platform generates scheduler event Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created scheduler event id will be present in the response. Specify existing scheduler event id to update the scheduler event. Referencing non-existing scheduler event Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Scheduler Event entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveSchedulerEvent", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchedulerEvent" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbSecretDeleteResult" + "$ref": "#/components/schemas/SchedulerEvent" } } } @@ -86670,7 +86523,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -86774,43 +86627,32 @@ ] } }, - "/api/secret/{id}/description": { - "put": { + "/api/schedulerEvent/info/{schedulerEventId}": { + "get": { "tags": [ - "secret-controller" + "scheduler-event-controller" ], - "summary": "Update Secret Description", - "description": "Updates the description of the existing Secret by secretId. Only the description can be updated. Referencing a non-existing Secret Id will cause a 'Not Found' error.", - "operationId": "updateSecretDescription", + "summary": "Get Scheduler Event With Customer Info (getSchedulerEventInfoById)", + "description": "Fetch the SchedulerEventWithCustomerInfo object based on the provided scheduler event Id. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSchedulerEventInfoById", "parameters": [ { - "name": "id", + "name": "schedulerEventId", "in": "path", - "description": "Unique identifier of the Secret to update", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "New description for the Secret" - } - } - } - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecretInfo" + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" } } } @@ -86931,22 +86773,22 @@ ] } }, - "/api/secret/{id}/info": { + "/api/schedulerEvent/{schedulerEventId}": { "get": { "tags": [ - "secret-controller" + "scheduler-event-controller" ], - "summary": "Get Secret info by Id (getSecretInfoById)", - "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getSecretInfoById", + "summary": "Get Scheduler Event (getSchedulerEventById)", + "description": "Fetch the SchedulerEvent object based on the provided scheduler event Id. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSchedulerEventById", "parameters": [ { - "name": "id", + "name": "schedulerEventId", "in": "path", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], @@ -86956,7 +86798,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecretInfo" + "$ref": "#/components/schemas/SchedulerEvent" } } } @@ -87075,46 +86917,180 @@ "ApiKeyForm": [] } ] - } - }, - "/api/secret/{id}/value": { - "put": { + }, + "delete": { "tags": [ - "secret-controller" + "scheduler-event-controller" ], - "summary": "Update Secret value", - "description": "Updates the value of the existing Secret by secretId. Referencing a non-existing Secret Id will cause a 'Not Found' error.", - "operationId": "updateSecretValue", + "summary": "Delete Scheduler Event (deleteSchedulerEvent)", + "description": "Deletes the scheduler event. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteSchedulerEvent", "parameters": [ { - "name": "id", + "name": "schedulerEventId", "in": "path", - "description": "Unique identifier of the Secret to update", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "New value for the Secret" + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } } } }, - "required": true + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/schedulerEvent/{schedulerEventId}/enabled/{enabledValue}": { + "put": { + "tags": [ + "scheduler-event-controller" + ], + "summary": "Enable or disable Scheduler Event (enableSchedulerEvent)", + "description": "Updates scheduler event with enabled = true/false. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "enableSchedulerEvent", + "parameters": [ + { + "name": "schedulerEventId", + "in": "path", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "enabledValue", + "in": "path", + "description": "Enabled or disabled scheduler", + "required": true, + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecretInfo" + "$ref": "#/components/schemas/SchedulerEvent" } } } @@ -87235,14 +87211,14 @@ ] } }, - "/api/secrets": { + "/api/schedulerEvents": { "get": { "tags": [ - "secret-controller" + "scheduler-event-controller" ], - "summary": "Get Tenant Secret infos (getSecretInfos)", - "description": "Returns a page of secret infos owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getSecretInfos", + "summary": "Get scheduler events (getSchedulerEvents)", + "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSchedulerEvents", "parameters": [ { "name": "pageSize", @@ -87267,7 +87243,7 @@ { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the secret name and description.", + "description": "Case-insensitive 'substring' filter based on event's name, type, or customer's name", "required": false, "schema": { "type": "string" @@ -87279,10 +87255,7 @@ "description": "Property of entity to sort by", "required": false, "schema": { - "type": "string", - "enum": [ - "name" - ] + "type": "string" } }, { @@ -87290,12 +87263,27 @@ "in": "query", "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the scheduler type. For example, 'generateReport'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "edgeId", + "in": "query", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, "schema": { "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "format": "uuid" } } ], @@ -87305,7 +87293,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataSecretInfo" + "$ref": "#/components/schemas/PageDataSchedulerEventWithCustomerInfo" } } } @@ -87426,30 +87414,23 @@ ] } }, - "/api/noauth/selfRegistration/privacyPolicy": { + "/api/schedulerEvents/all": { "get": { "tags": [ - "self-registration-controller" + "scheduler-event-controller" ], - "summary": "Get Privacy Policy for Self Registration form (getPrivacyPolicy)", - "description": "Fetch the Privacy Policy based on the domain name from the request. Available for non-authorized users. ", - "operationId": "getPrivacyPolicy", + "summary": "Get all scheduler events (getAllSchedulerEvents)", + "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllSchedulerEvents", "parameters": [ { - "name": "pkgName", + "name": "type", "in": "query", + "description": "A string value representing the scheduler type. For example, 'generateReport'", "required": false, "schema": { "type": "string" } - }, - { - "name": "platform", - "in": "query", - "required": false, - "schema": { - "$ref": "#/components/schemas/PlatformType" - } } ], "responses": { @@ -87458,7 +87439,10 @@ "content": { "application/json": { "schema": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + } } } } @@ -87568,37 +87552,36 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/selfRegistration/signUpSelfRegistrationParams": { + "/api/schedulerEvents/list": { "get": { "tags": [ - "self-registration-controller" + "scheduler-event-controller" ], - "summary": "Get Self Registration form parameters without authentication (getSignUpSelfRegistrationParams)", - "description": "Fetch the Self Registration parameters based on the domain name from the request. Available for non-authorized users. Contains the information to customize the sign-up form.", - "operationId": "getSignUpSelfRegistrationParams", + "summary": "Get Scheduler Events By Ids (getSchedulerEventsByIds)", + "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSchedulerEventsByIds", "parameters": [ { - "name": "pkgName", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "platformType", + "name": "schedulerEventIds", "in": "query", - "description": "Platform type", - "required": false, + "description": "A list of scheduler event ids, separated by comma ','", + "required": true, "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] + "type": "array", + "items": { + "type": "string" + } } } ], @@ -87608,7 +87591,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignUpSelfRegistrationParams" + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventInfo" + } } } } @@ -87718,32 +87704,72 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/selfRegistration/termsOfUse": { + "/api/schedulerEvents/startTime/{startTime}/endTime/{endTime}": { "get": { "tags": [ - "self-registration-controller" + "scheduler-event-controller" ], - "summary": "Get Terms of Use for Self Registration form (getTermsOfUse)", - "description": "Fetch the Terms of Use based on the domain name from the request. Available for non-authorized users. ", - "operationId": "getTermsOfUse", + "summary": "Get scheduler events (getSchedulerEventsByRange)", + "description": "Retrieves scheduler events filtering by event run time. Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSchedulerEventsByRange", "parameters": [ { - "name": "pkgName", + "name": "startTime", + "in": "path", + "description": "Start time filter in milliseconds for scheduler event run time", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "path", + "description": "End time filter in milliseconds for scheduler event run time", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "type", "in": "query", + "description": "A string value representing the scheduler type. For example, 'generateReport'", "required": false, "schema": { "type": "string" } }, { - "name": "platform", + "name": "edgeId", "in": "query", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": false, "schema": { - "$ref": "#/components/schemas/PlatformType" + "type": "string", + "format": "uuid" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on event's name, type, or customer's name", + "required": false, + "schema": { + "type": "string" } } ], @@ -87753,7 +87779,10 @@ "content": { "application/json": { "schema": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + } } } } @@ -87863,24 +87892,42 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/selfRegistration/selfRegistrationParams": { + "/api/secret": { "get": { "tags": [ - "self-registration-controller" + "secret-controller" + ], + "summary": "Get Secret info by name (getSecretInfoByName)", + "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getSecretInfoByName", + "parameters": [ + { + "name": "name", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Get Self Registration parameters (getSelfRegistrationParams)", - "description": "Fetch the Self Registration parameters object for the tenant of the current user. \n\nAvailable for users with 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", - "operationId": "getWebSelfRegistrationParams", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SelfRegistrationParams" + "$ref": "#/components/schemas/SecretInfo" } } } @@ -88002,16 +88049,16 @@ }, "post": { "tags": [ - "self-registration-controller" + "secret-controller" ], - "summary": "Create Or Update Self Registration parameters (saveSelfRegistrationParams)", - "description": "Creates or Updates the Self Registration parameters. When creating, platform generates Admin Settings Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Admin Settings Id will be present in the response. Specify existing Admin Settings Id to update the Self Registration parameters. Referencing non-existing Admin Settings Id will cause 'Not Found' error.\n\nSelf Registration allows users to signup for using the platform and automatically create a Customer account for them. You may configure default dashboard and user roles that will be assigned for this Customer. This allows you to build out-of-the-box solutions for customers. Ability to white-label the login and main pages helps to brand the platform.\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", - "operationId": "saveWebSelfRegistrationParams", + "summary": "Save or Update Secret (saveSecret)", + "description": "Create or update the Secret. When creating secret, platform generates Secret Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Secret Id will be present in the response. Specify existing Secret Id to update the secret. Secret name is not updatable, only value could be changed. Referencing non-existing Secret Id will cause 'Not Found' error.\n\nSecret name is unique in the scope of tenant.", + "operationId": "saveSecret", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WebSelfRegistrationParams" + "$ref": "#/components/schemas/Secret" } } }, @@ -88023,7 +88070,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WebSelfRegistrationParams" + "$ref": "#/components/schemas/SecretInfo" } } } @@ -88142,16 +88189,29 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/secret/names": { + "get": { "tags": [ - "self-registration-controller" + "secret-controller" ], - "summary": "deleteWebSelfRegistrationParams", - "operationId": "deleteWebSelfRegistrationParams", + "summary": "Get Tenant Secret names (getSecretNames)", + "description": "Returns a page of secret names owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getSecretNames", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } }, "400": { "description": "Bad Request", @@ -88269,44 +88329,22 @@ ] } }, - "/api/noauth/activateByEmailCode": { - "post": { + "/api/secret/{id}": { + "delete": { "tags": [ - "sign-up-controller" + "secret-controller" ], - "summary": "Activate and login using code from Email (activateUserByEmailCode)", - "description": "Activate the user using code(link) from the activation email and return the JWT Token. Sends the notification and email about user activation. Checks that user was not activated yet.", - "operationId": "activateUserByEmailCode", + "summary": "Delete secret by ID (deleteSecret)", + "description": "Deletes the secret. Referencing non-existing Secret Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteSecret", "parameters": [ { - "name": "emailCode", - "in": "query", - "description": "Activation token.", + "name": "id", + "in": "path", "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pkgName", - "in": "query", - "description": "Optional package name of the mobile application.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "platform", - "in": "query", - "description": "Platform type", - "required": false, "schema": { "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] + "format": "uuid" } } ], @@ -88316,7 +88354,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "$ref": "#/components/schemas/TbSecretDeleteResult" } } } @@ -88333,7 +88371,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -88426,57 +88464,54 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/activateEmail": { - "get": { + "/api/secret/{id}/description": { + "put": { "tags": [ - "sign-up-controller" + "secret-controller" ], - "summary": "Activate User using code from Email (activateEmail)", - "description": "Activate the user using code(link) from the activation email. Validates the code an redirects according to the signup flow. Checks that user was not activated yet.", - "operationId": "activateEmail", + "summary": "Update Secret Description", + "description": "Updates the description of the existing Secret by secretId. Only the description can be updated. Referencing a non-existing Secret Id will cause a 'Not Found' error.", + "operationId": "updateSecretDescription", "parameters": [ { - "name": "emailCode", - "in": "query", - "description": "Activation token.", + "name": "id", + "in": "path", + "description": "Unique identifier of the Secret to update", "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pkgName", - "in": "query", - "description": "Optional package name of the mobile application.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "platform", - "in": "query", - "description": "Platform type", - "required": false, "schema": { "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] + "format": "uuid" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "New description for the Secret" + } + } + } + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/SecretInfo" } } } @@ -88586,38 +88621,33 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/login": { + "/api/secret/{id}/info": { "get": { "tags": [ - "sign-up-controller" + "secret-controller" ], - "summary": "Mobile Login redirect (mobileLogin)", - "description": "This method generates redirect to the special link that is handled by mobile application. Useful for email verification flow on mobile app.", - "operationId": "mobileLogin", + "summary": "Get Secret info by Id (getSecretInfoById)", + "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getSecretInfoById", "parameters": [ { - "name": "pkgName", - "in": "query", - "description": "Mobile app package name. Used to identify the application and build the redirect link.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "platform", - "in": "query", - "description": "Platform type", + "name": "id", + "in": "path", "required": true, "schema": { "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] + "format": "uuid" } } ], @@ -88627,7 +88657,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/SecretInfo" } } } @@ -88737,54 +88767,58 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/resendEmailActivation": { - "post": { + "/api/secret/{id}/value": { + "put": { "tags": [ - "sign-up-controller" + "secret-controller" ], - "summary": "Resend Activation Email (resendEmailActivation)", - "description": "Request to resend the activation email for the user. Checks that user was not activated yet.", - "operationId": "resendEmailActivation", + "summary": "Update Secret value", + "description": "Updates the value of the existing Secret by secretId. Referencing a non-existing Secret Id will cause a 'Not Found' error.", + "operationId": "updateSecretValue", "parameters": [ { - "name": "email", - "in": "query", - "description": "Email of the user.", + "name": "id", + "in": "path", + "description": "Unique identifier of the Secret to update", "required": true, - "schema": { - "type": "string" - }, - "example": "john.doe@company.com" - }, - { - "name": "pkgName", - "in": "query", - "description": "Optional package name of the mobile application.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "platform", - "in": "query", - "description": "Platform type", - "required": false, "schema": { "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] + "format": "uuid" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "New value for the Secret" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SecretInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -88798,7 +88832,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -88891,34 +88925,88 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/signup": { - "post": { + "/api/secrets": { + "get": { "tags": [ - "sign-up-controller" + "secret-controller" ], - "summary": "User Sign Up (signUp)", - "description": "Process user sign up request. Creates the Customer and corresponding User based on self Registration parameters for the domain. See [Self Registration Controller](/swagger-ui.html#/self-registration-controller) for more details. The result is either 'SUCCESS' or 'INACTIVE_USER_EXISTS'. If Success, the user will receive an email with instruction to activate the account. The content of the email is customizable via the mail templates.", - "operationId": "signUp", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignUpRequest" - } + "summary": "Get Tenant Secret infos (getSecretInfos)", + "description": "Returns a page of secret infos owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getSecretInfos", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the secret name and description.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "name" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignUpResult" + "$ref": "#/components/schemas/PageDataSecretInfo" } } } @@ -88935,7 +89023,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -89028,24 +89116,50 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/signup/acceptPrivacyPolicy": { - "post": { + "/api/noauth/selfRegistration/privacyPolicy": { + "get": { "tags": [ - "sign-up-controller" + "self-registration-controller" + ], + "summary": "Get Privacy Policy for Self Registration form (getPrivacyPolicy)", + "description": "Fetch the Privacy Policy based on the domain name from the request. Available for non-authorized users. ", + "operationId": "getPrivacyPolicy", + "parameters": [ + { + "name": "pkgName", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PlatformType" + } + } ], - "summary": "Accept privacy policy (acceptPrivacyPolicy)", - "description": "Accept privacy policy by the current user.", - "operationId": "acceptPrivacyPolicy", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "type": "string" } } } @@ -89062,7 +89176,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -89155,32 +89269,47 @@ } } } - }, - "security": [ + } + } + }, + "/api/noauth/selfRegistration/signUpSelfRegistrationParams": { + "get": { + "tags": [ + "self-registration-controller" + ], + "summary": "Get Self Registration form parameters without authentication (getSignUpSelfRegistrationParams)", + "description": "Fetch the Self Registration parameters based on the domain name from the request. Available for non-authorized users. Contains the information to customize the sign-up form.", + "operationId": "getSignUpSelfRegistrationParams", + "parameters": [ { - "HttpLoginForm": [] + "name": "pkgName", + "in": "query", + "required": false, + "schema": { + "type": "string" + } }, { - "ApiKeyForm": [] + "name": "platformType", + "in": "query", + "description": "Platform type", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ANDROID", + "IOS" + ] + } } - ] - } - }, - "/api/signup/acceptTermsOfUse": { - "post": { - "tags": [ - "sign-up-controller" ], - "summary": "Accept Terms of Use (acceptTermsOfUse)", - "description": "Accept Terms of Use by the current user.", - "operationId": "acceptTermsOfUse", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/SignUpSelfRegistrationParams" } } } @@ -89197,7 +89326,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -89290,32 +89419,42 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/signup/privacyPolicyAccepted": { + "/api/noauth/selfRegistration/termsOfUse": { "get": { "tags": [ - "sign-up-controller" + "self-registration-controller" + ], + "summary": "Get Terms of Use for Self Registration form (getTermsOfUse)", + "description": "Fetch the Terms of Use based on the domain name from the request. Available for non-authorized users. ", + "operationId": "getTermsOfUse", + "parameters": [ + { + "name": "pkgName", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PlatformType" + } + } ], - "summary": "Check privacy policy (privacyPolicyAccepted)", - "description": "Checks that current user accepted the privacy policy.", - "operationId": "privacyPolicyAccepted", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "type": "string" } } } @@ -89425,32 +89564,24 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/signup/termsOfUseAccepted": { + "/api/selfRegistration/selfRegistrationParams": { "get": { "tags": [ - "sign-up-controller" + "self-registration-controller" ], - "summary": "Check Terms Of User (termsOfUseAccepted)", - "description": "Checks that current user accepted the privacy policy.", - "operationId": "termsOfUseAccepted", + "summary": "Get Self Registration parameters (getSelfRegistrationParams)", + "description": "Fetch the Self Registration parameters object for the tenant of the current user. \n\nAvailable for users with 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", + "operationId": "getWebSelfRegistrationParams", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/SelfRegistrationParams" } } } @@ -89569,34 +89700,31 @@ "ApiKeyForm": [] } ] - } - }, - "/api/solutions/templates/details/{solutionTemplateId}": { - "get": { + }, + "post": { "tags": [ - "solution-controller" + "self-registration-controller" ], - "summary": "Get Solution template details (getSolutionTemplateDetails)", - "description": "Get a solution template details based on the provided id\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSolutionTemplateDetails", - "parameters": [ - { - "name": "solutionTemplateId", - "in": "path", - "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Create Or Update Self Registration parameters (saveSelfRegistrationParams)", + "description": "Creates or Updates the Self Registration parameters. When creating, platform generates Admin Settings Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Admin Settings Id will be present in the response. Specify existing Admin Settings Id to update the Self Registration parameters. Referencing non-existing Admin Settings Id will cause 'Not Found' error.\n\nSelf Registration allows users to signup for using the platform and automatically create a Customer account for them. You may configure default dashboard and user roles that will be assigned for this Customer. This allows you to build out-of-the-box solutions for customers. Ability to white-label the login and main pages helps to brand the platform.\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "saveWebSelfRegistrationParams", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebSelfRegistrationParams" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TenantSolutionTemplateDetails" + "$ref": "#/components/schemas/WebSelfRegistrationParams" } } } @@ -89613,7 +89741,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -89715,29 +89843,16 @@ "ApiKeyForm": [] } ] - } - }, - "/api/solutions/templates/infos": { - "get": { + }, + "delete": { "tags": [ - "solution-controller" + "self-registration-controller" ], - "summary": "Get Solution templates (getSolutionTemplateInfos)", - "description": "Get a list of solution template descriptors\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSolutionTemplateInfos", + "summary": "deleteWebSelfRegistrationParams", + "operationId": "deleteWebSelfRegistrationParams", "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TenantSolutionTemplateInfo" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -89855,23 +89970,45 @@ ] } }, - "/api/solutions/templates/instructions/{solutionTemplateId}": { - "get": { + "/api/noauth/activateByEmailCode": { + "post": { "tags": [ - "solution-controller" + "sign-up-controller" ], - "summary": "Get Solution Template Instructions (getSolutionTemplateInstructions)", - "description": "Get a solution template instructions based on the provided id\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSolutionTemplateInstructions", + "summary": "Activate and login using code from Email (activateUserByEmailCode)", + "description": "Activate the user using code(link) from the activation email and return the JWT Token. Sends the notification and email about user activation. Checks that user was not activated yet.", + "operationId": "activateUserByEmailCode", "parameters": [ { - "name": "solutionTemplateId", - "in": "path", - "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "emailCode", + "in": "query", + "description": "Activation token.", "required": true, "schema": { "type": "string" } + }, + { + "name": "pkgName", + "in": "query", + "description": "Optional package name of the mobile application.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ANDROID", + "IOS" + ] + } } ], "responses": { @@ -89880,7 +90017,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TenantSolutionTemplateInstructions" + "$ref": "#/components/schemas/JwtPair" } } } @@ -89897,7 +90034,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -89990,39 +90127,60 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/solutions/templates/{solutionTemplateId}/delete": { - "delete": { + "/api/noauth/activateEmail": { + "get": { "tags": [ - "solution-controller" + "sign-up-controller" ], - "summary": "Uninstall Solution Template (uninstallSolutionTemplate)", - "description": "Uninstall solution template based on the provided id\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "uninstallSolutionTemplate", + "summary": "Activate User using code from Email (activateEmail)", + "description": "Activate the user using code(link) from the activation email. Validates the code an redirects according to the signup flow. Checks that user was not activated yet.", + "operationId": "activateEmail", "parameters": [ { - "name": "solutionTemplateId", - "in": "path", - "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "emailCode", + "in": "query", + "description": "Activation token.", "required": true, "schema": { "type": "string" } + }, + { + "name": "pkgName", + "in": "query", + "description": "Optional package name of the mobile application.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ANDROID", + "IOS" + ] + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } }, "400": { "description": "Bad Request", @@ -90129,34 +90287,39 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/solutions/templates/{solutionTemplateId}/install": { - "post": { + "/api/noauth/login": { + "get": { "tags": [ - "solution-controller" + "sign-up-controller" ], - "summary": "Install Solution Template (installSolutionTemplate)", - "description": "Install solution template based on the provided id\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "installSolutionTemplate", + "summary": "Mobile Login redirect (mobileLogin)", + "description": "This method generates redirect to the special link that is handled by mobile application. Useful for email verification flow on mobile app.", + "operationId": "mobileLogin", "parameters": [ { - "name": "solutionTemplateId", - "in": "path", - "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pkgName", + "in": "query", + "description": "Mobile app package name. Used to identify the application and build the redirect link.", "required": true, "schema": { "type": "string" } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ANDROID", + "IOS" + ] + } } ], "responses": { @@ -90165,7 +90328,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SolutionInstallResponse" + "type": "string" } } } @@ -90182,7 +90345,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -90275,122 +90438,54 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/resource": { - "get": { + "/api/noauth/resendEmailActivation": { + "post": { "tags": [ - "tb-resource-controller" + "sign-up-controller" ], - "summary": "Get Resource Infos (getResources)", - "description": "Returns a page of Resource Info objects owned by tenant or sysadmin. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getResources", + "summary": "Resend Activation Email (resendEmailActivation)", + "description": "Request to resend the activation email for the user. Checks that user was not activated yet.", + "operationId": "resendEmailActivation", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "email", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "Email of the user.", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "resourceType", - "in": "query", - "description": "A string value representing the resource type.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "LWM2M_MODEL", - "JKS", - "PKCS_12", - "JS_MODULE" - ] - } - }, - { - "name": "resourceSubType", - "in": "query", - "description": "A string value representing the resource sub-type.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "EXTENSION", - "MODULE" - ] - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the resource title.", - "required": false, "schema": { "type": "string" - } + }, + "example": "john.doe@company.com" }, { - "name": "sortProperty", + "name": "pkgName", "in": "query", - "description": "Property of entity to sort by", + "description": "Optional package name of the mobile application.", "required": false, "schema": { - "type": "string", - "enum": [ - "createdTime", - "title", - "resourceType", - "tenantId" - ] + "type": "string" } }, { - "name": "sortOrder", + "name": "platform", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Platform type", "required": false, "schema": { "type": "string", "enum": [ - "ASC", - "DESC" + "ANDROID", + "IOS" ] } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataTbResourceInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -90404,7 +90499,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -90497,28 +90592,22 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - }, + } + } + }, + "/api/noauth/signup": { "post": { "tags": [ - "tb-resource-controller" + "sign-up-controller" ], - "summary": "Create Or Update Resource (saveResource)", - "description": "Create or update the Resource. When creating the Resource, platform generates Resource id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Resource id will be present in the response. Specify existing Resource id to update the Resource. Referencing non-existing Resource Id will cause 'Not Found' error. \n\nResource combination of the title with the key is unique in the scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Resource entity.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveResource", + "summary": "User Sign Up (signUp)", + "description": "Process user sign up request. Creates the Customer and corresponding User based on self Registration parameters for the domain. See [Self Registration Controller](/swagger-ui.html#/self-registration-controller) for more details. The result is either 'SUCCESS' or 'INACTIVE_USER_EXISTS'. If Success, the user will receive an email with instruction to activate the account. The content of the email is customizable via the mail templates.", + "operationId": "signUp", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResource" + "$ref": "#/components/schemas/SignUpRequest" } } }, @@ -90530,7 +90619,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "$ref": "#/components/schemas/SignUpResult" } } } @@ -90640,44 +90729,24 @@ } } } - }, - "deprecated": true, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/resource/info/{resourceId}": { - "get": { + "/api/signup/acceptPrivacyPolicy": { + "post": { "tags": [ - "tb-resource-controller" - ], - "summary": "Get Resource Info (getResourceInfoById)", - "description": "Fetch the Resource Info object based on the provided Resource Id. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getResourceInfoById", - "parameters": [ - { - "name": "resourceId", - "in": "path", - "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "sign-up-controller" ], + "summary": "Accept privacy policy (acceptPrivacyPolicy)", + "description": "Accept privacy policy by the current user.", + "operationId": "acceptPrivacyPolicy", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "$ref": "#/components/schemas/JsonNode" } } } @@ -90694,7 +90763,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -90798,41 +90867,156 @@ ] } }, - "/api/resource/jks/{resourceId}/download": { - "get": { + "/api/signup/acceptTermsOfUse": { + "post": { "tags": [ - "tb-resource-controller" + "sign-up-controller" ], - "summary": "Download JKS Resource (downloadJksResourceIfChanged)", - "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "downloadJksResourceIfChanged", - "parameters": [ - { - "name": "resourceId", - "in": "path", - "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Accept Terms of Use (acceptTermsOfUse)", + "description": "Accept Terms of Use by the current user.", + "operationId": "acceptTermsOfUse", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } } }, - { - "name": "If-None-Match", - "in": "header", - "required": false, - "schema": { - "type": "string" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid request body", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } } } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/signup/privacyPolicyAccepted": { + "get": { + "tags": [ + "sign-up-controller" ], + "summary": "Check privacy policy (privacyPolicyAccepted)", + "description": "Checks that current user accepted the privacy policy.", + "operationId": "privacyPolicyAccepted", "responses": { "200": { "description": "OK", "content": { - "application/x-java-keystore": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "boolean" } } } @@ -90953,41 +91137,21 @@ ] } }, - "/api/resource/js/{resourceId}/download": { + "/api/signup/termsOfUseAccepted": { "get": { "tags": [ - "tb-resource-controller" - ], - "summary": "Download JS Resource (downloadJsResourceIfChanged)", - "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for any authorized user. ", - "operationId": "downloadJsResourceIfChanged", - "parameters": [ - { - "name": "resourceId", - "in": "path", - "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "If-None-Match", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - } + "sign-up-controller" ], + "summary": "Check Terms Of User (termsOfUseAccepted)", + "description": "Checks that current user accepted the privacy policy.", + "operationId": "termsOfUseAccepted", "responses": { "200": { "description": "OK", "content": { - "application/javascript": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "boolean" } } } @@ -91108,24 +91272,22 @@ ] } }, - "/api/resource/list": { + "/api/solutions/templates/details/{solutionTemplateId}": { "get": { "tags": [ - "tb-resource-controller" + "solution-controller" ], - "summary": "Get Resource Infos by ids (getSystemOrTenantResourcesByIds)", - "operationId": "getSystemOrTenantResourcesByIds", + "summary": "Get Solution template details (getSolutionTemplateDetails)", + "description": "Get a solution template details based on the provided id\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSolutionTemplateDetails", "parameters": [ { - "name": "resourceIds", - "in": "query", - "description": "A list of resource ids, separated by comma ','", + "name": "solutionTemplateId", + "in": "path", + "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -91135,10 +91297,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TbResourceInfo" - } + "$ref": "#/components/schemas/TenantSolutionTemplateDetails" } } } @@ -91259,54 +91418,14 @@ ] } }, - "/api/resource/lwm2m": { + "/api/solutions/templates/infos": { "get": { "tags": [ - "tb-resource-controller" - ], - "summary": "Get LwM2M Objects (getLwm2mListObjects)", - "description": "Returns a page of LwM2M objects parsed from Resources with type 'LWM2M_MODEL' owned by tenant or sysadmin. You can specify parameters to filter the results. LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getLwm2mListObjects", - "parameters": [ - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": true, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": true, - "schema": { - "type": "string", - "enum": [ - "id", - "name" - ] - } - }, - { - "name": "objectIds", - "in": "query", - "description": "LwM2M Object ids.", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } + "solution-controller" ], + "summary": "Get Solution templates (getSolutionTemplateInfos)", + "description": "Get a list of solution template descriptors\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSolutionTemplateInfos", "responses": { "200": { "description": "OK", @@ -91315,7 +91434,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/LwM2mObject" + "$ref": "#/components/schemas/TenantSolutionTemplateInfo" } } } @@ -91437,69 +91556,23 @@ ] } }, - "/api/resource/lwm2m/page": { + "/api/solutions/templates/instructions/{solutionTemplateId}": { "get": { "tags": [ - "tb-resource-controller" + "solution-controller" ], - "summary": "Get LwM2M Objects (getLwm2mListObjectsPage)", - "description": "Returns a page of LwM2M objects parsed from Resources with type 'LWM2M_MODEL' owned by tenant or sysadmin. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getLwm2mListObjectsPage", + "summary": "Get Solution Template Instructions (getSolutionTemplateInstructions)", + "description": "Get a solution template instructions based on the provided id\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSolutionTemplateInstructions", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "solutionTemplateId", + "in": "path", + "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the resource title.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "id", - "name" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -91508,10 +91581,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LwM2mObject" - } + "$ref": "#/components/schemas/TenantSolutionTemplateInstructions" } } } @@ -91632,44 +91702,28 @@ ] } }, - "/api/resource/lwm2m/{resourceId}/download": { - "get": { + "/api/solutions/templates/{solutionTemplateId}/delete": { + "delete": { "tags": [ - "tb-resource-controller" + "solution-controller" ], - "summary": "Download LWM2M Resource (downloadLwm2mResourceIfChanged)", - "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "downloadLwm2mResourceIfChanged", + "summary": "Uninstall Solution Template (uninstallSolutionTemplate)", + "description": "Uninstall solution template based on the provided id\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "uninstallSolutionTemplate", "parameters": [ { - "name": "resourceId", + "name": "solutionTemplateId", "in": "path", - "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "If-None-Match", - "in": "header", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/xml": { - "schema": { - "type": "string", - "format": "binary" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -91787,41 +91841,32 @@ ] } }, - "/api/resource/pkcs12/{resourceId}/download": { - "get": { + "/api/solutions/templates/{solutionTemplateId}/install": { + "post": { "tags": [ - "tb-resource-controller" + "solution-controller" ], - "summary": "Download PKCS_12 Resource (downloadPkcs12ResourceIfChanged)", - "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "downloadPkcs12ResourceIfChanged", + "summary": "Install Solution Template (installSolutionTemplate)", + "description": "Install solution template based on the provided id\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "installSolutionTemplate", "parameters": [ { - "name": "resourceId", + "name": "solutionTemplateId", "in": "path", - "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "If-None-Match", - "in": "header", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { "200": { "description": "OK", "content": { - "application/x-pkcs12": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/SolutionInstallResponse" } } } @@ -91838,7 +91883,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -91942,14 +91987,14 @@ ] } }, - "/api/resource/tenant": { + "/api/resource": { "get": { "tags": [ "tb-resource-controller" ], - "summary": "Get All Resource Infos (getTenantResources)", - "description": "Returns a page of Resource Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantResources", + "summary": "Get Resource Infos (getResources)", + "description": "Returns a page of Resource Info objects owned by tenant or sysadmin. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getResources", "parameters": [ { "name": "pageSize", @@ -91971,6 +92016,34 @@ "format": "int32" } }, + { + "name": "resourceType", + "in": "query", + "description": "A string value representing the resource type.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "LWM2M_MODEL", + "JKS", + "PKCS_12", + "JS_MODULE" + ] + } + }, + { + "name": "resourceSubType", + "in": "query", + "description": "A string value representing the resource sub-type.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "EXTENSION", + "MODULE" + ] + } + }, { "name": "textSearch", "in": "query", @@ -92134,51 +92207,23 @@ "ApiKeyForm": [] } ] - } - }, - "/api/resource/upload": { + }, "post": { "tags": [ "tb-resource-controller" ], - "summary": "Upload Resource via Multipart File (uploadResource)", - "description": "Create the Resource using multipart file upload. \n\nResource combination of the title with the key is unique in the scope of tenant. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "uploadResource", + "summary": "Create Or Update Resource (saveResource)", + "description": "Create or update the Resource. When creating the Resource, platform generates Resource id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Resource id will be present in the response. Specify existing Resource id to update the Resource. Referencing non-existing Resource Id will cause 'Not Found' error. \n\nResource combination of the title with the key is unique in the scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Resource entity.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveResource", "requestBody": { "content": { - "multipart/form-data": { + "application/json": { "schema": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "Resource title." - }, - "resourceType": { - "type": "string", - "description": "Resource type." - }, - "descriptor": { - "type": "string", - "description": "Resource descriptor (JSON)." - }, - "resourceSubType": { - "type": "string", - "description": "Resource sub type." - }, - "file": { - "type": "string", - "format": "binary", - "description": "Resource file." - } - }, - "required": [ - "file", - "resourceType" - ] + "$ref": "#/components/schemas/TbResource" } } - } + }, + "required": true }, "responses": { "200": { @@ -92297,6 +92342,7 @@ } } }, + "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -92307,44 +92353,25 @@ ] } }, - "/api/resource/{id}/data": { - "put": { + "/api/resource/info/{resourceId}": { + "get": { "tags": [ "tb-resource-controller" ], - "summary": "updateResourceData", - "operationId": "updateResourceData", + "summary": "Get Resource Info (getResourceInfoById)", + "description": "Fetch the Resource Info object based on the provided Resource Id. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getResourceInfoById", "parameters": [ { - "name": "id", + "name": "resourceId", "in": "path", - "description": "Unique identifier of the Resource to update", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary", - "description": "Resource file." - } - }, - "required": [ - "file" - ] - } - } - } - }, "responses": { "200": { "description": "OK", @@ -92472,42 +92499,41 @@ ] } }, - "/api/resource/{id}/info": { - "put": { + "/api/resource/jks/{resourceId}/download": { + "get": { "tags": [ "tb-resource-controller" ], - "summary": "updateResourceInfo", - "operationId": "updateResourceInfo", + "summary": "Download JKS Resource (downloadJksResourceIfChanged)", + "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "downloadJksResourceIfChanged", "parameters": [ { - "name": "id", + "name": "resourceId", "in": "path", - "description": "Unique identifier of the Resource to update", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TbResourceInfo" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/x-java-keystore": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "type": "string", + "format": "binary" } } } @@ -92628,14 +92654,14 @@ ] } }, - "/api/resource/{resourceId}": { + "/api/resource/js/{resourceId}/download": { "get": { "tags": [ "tb-resource-controller" ], - "summary": "Get Resource (getResourceById)", - "description": "Fetch the Resource object based on the provided Resource Id. Resource is a heavyweight object that includes main information about the Resource and also data. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getResourceById", + "summary": "Download JS Resource (downloadJsResourceIfChanged)", + "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for any authorized user. ", + "operationId": "downloadJsResourceIfChanged", "parameters": [ { "name": "resourceId", @@ -92645,15 +92671,24 @@ "schema": { "type": "string" } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/javascript": { "schema": { - "$ref": "#/components/schemas/TbResource" + "type": "string", + "format": "binary" } } } @@ -92764,7 +92799,6 @@ } } }, - "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -92773,30 +92807,26 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/resource/list": { + "get": { "tags": [ "tb-resource-controller" ], - "summary": "Delete Resource (deleteResource)", - "description": "Deletes the Resource. Referencing non-existing Resource Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "deleteResource", + "summary": "Get Resource Infos by ids (getSystemOrTenantResourcesByIds)", + "operationId": "getSystemOrTenantResourcesByIds", "parameters": [ { - "name": "resourceId", - "in": "path", - "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "force", + "name": "resourceIds", "in": "query", - "required": false, + "description": "A list of resource ids, separated by comma ','", + "required": true, "schema": { - "type": "boolean" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -92806,7 +92836,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResourceDeleteResult" + "type": "array", + "items": { + "$ref": "#/components/schemas/TbResourceInfo" + } } } } @@ -92927,22 +92960,51 @@ ] } }, - "/api/resource/{resourceId}/download": { + "/api/resource/lwm2m": { "get": { "tags": [ "tb-resource-controller" ], - "summary": "Download Resource (downloadResource)", - "description": "Download Resource based on the provided Resource Id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "downloadResource", + "summary": "Get LwM2M Objects (getLwm2mListObjects)", + "description": "Returns a page of LwM2M objects parsed from Resources with type 'LWM2M_MODEL' owned by tenant or sysadmin. You can specify parameters to filter the results. LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getLwm2mListObjects", "parameters": [ { - "name": "resourceId", - "in": "path", - "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": true, "schema": { - "type": "string" + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": true, + "schema": { + "type": "string", + "enum": [ + "id", + "name" + ] + } + }, + { + "name": "objectIds", + "in": "query", + "description": "LwM2M Object ids.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } } } ], @@ -92952,8 +93014,10 @@ "content": { "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "array", + "items": { + "$ref": "#/components/schemas/LwM2mObject" + } } } } @@ -93074,59 +93138,68 @@ ] } }, - "/api/resource/{resourceType}/{scope}/{key}": { + "/api/resource/lwm2m/page": { "get": { "tags": [ "tb-resource-controller" ], - "summary": "Download resource (downloadResourceIfChanged)", - "description": "Download resource with a given type and key for the given scope\n\nAvailable for any authorized user. ", - "operationId": "downloadResourceIfChanged", + "summary": "Get LwM2M Objects (getLwm2mListObjectsPage)", + "description": "Returns a page of LwM2M objects parsed from Resources with type 'LWM2M_MODEL' owned by tenant or sysadmin. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getLwm2mListObjectsPage", "parameters": [ { - "name": "resourceType", - "in": "path", - "description": "Type of the resource", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string", - "enum": [ - "lwm2m_model", - "jks", - "pkcs_12", - "js_module", - "dashboard" - ] + "type": "integer", + "format": "int32" } }, { - "name": "scope", - "in": "path", - "description": "Scope of the resource", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string", - "enum": [ - "system", - "tenant" - ] + "type": "integer", + "format": "int32" } }, { - "name": "key", - "in": "path", - "description": "Key of the resource, e.g. 'extension.js'", - "required": true, + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the resource title.", + "required": false, "schema": { "type": "string" } }, { - "name": "If-None-Match", - "in": "header", + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "id", + "name" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -93136,8 +93209,10 @@ "content": { "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "array", + "items": { + "$ref": "#/components/schemas/LwM2mObject" + } } } } @@ -93258,49 +93333,28 @@ ] } }, - "/api/resource/{resourceType}/{scope}/{key}/info": { + "/api/resource/lwm2m/{resourceId}/download": { "get": { "tags": [ "tb-resource-controller" ], - "summary": "Get resource info (getResourceInfo)", - "description": "Get info for the resource with the given type, scope and key. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getResourceInfo", + "summary": "Download LWM2M Resource (downloadLwm2mResourceIfChanged)", + "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "downloadLwm2mResourceIfChanged", "parameters": [ { - "name": "resourceType", - "in": "path", - "description": "Type of the resource", - "required": true, - "schema": { - "type": "string", - "enum": [ - "lwm2m_model", - "jks", - "pkcs_12", - "js_module", - "dashboard" - ] - } - }, - { - "name": "scope", + "name": "resourceId", "in": "path", - "description": "Scope of the resource", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "enum": [ - "system", - "tenant" - ] + "type": "string" } }, { - "name": "key", - "in": "path", - "description": "Key of the resource, e.g. 'extension.js'", - "required": true, + "name": "If-None-Match", + "in": "header", + "required": false, "schema": { "type": "string" } @@ -93310,9 +93364,10 @@ "200": { "description": "OK", "content": { - "application/json": { + "application/xml": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "type": "string", + "format": "binary" } } } @@ -93433,86 +93488,83 @@ ] } }, - "/api/plugins/telemetry/{deviceId}/{scope}": { - "post": { + "/api/resource/pkcs12/{resourceId}/download": { + "get": { "tags": [ - "telemetry-controller" + "tb-resource-controller" ], - "summary": "Save device attributes (saveDeviceAttributes)", - "description": "Creates or updates the device attributes based on device id and specified attribute scope. The request payload is a JSON object with key-value format of attributes to create or update. For example:\n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveDeviceAttributes", + "summary": "Download PKCS_12 Resource (downloadPkcs12ResourceIfChanged)", + "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "downloadPkcs12ResourceIfChanged", "parameters": [ { - "name": "deviceId", + "name": "resourceId", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "scope", - "in": "path", - "description": "A string value representing the attributes scope. For example, 'SERVER_SCOPE'.", - "required": true, + "name": "If-None-Match", + "in": "header", + "required": false, "schema": { - "type": "string", - "enum": [ - "SERVER_SCOPE", - "SHARED_SCOPE" - ] + "type": "string" } } ], - "requestBody": { - "description": "A string value representing the json object. For example, '{\"key\":\"value\"}'. See API call description for more details.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Attribute from the request was created or updated. Platform creates an audit log event about device attributes updates with action type 'ATTRIBUTES_UPDATED', and also sends event msg to the rule engine with msg type 'ATTRIBUTES_UPDATED'.", + "description": "OK", "content": { - "application/json": { + "application/x-pkcs12": { "schema": { - "type": "string" + "type": "string", + "format": "binary" } } } }, "400": { - "description": "Invalid structure of the request or invalid attributes scope provided.", + "description": "Bad Request", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } } } } }, "401": { - "description": "User is not authorized to save device attributes for selected device. Most likely, User belongs to different Customer or Tenant.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "The exception was thrown during processing the request. Platform creates an audit log event about device attributes updates with action type 'ATTRIBUTES_UPDATED' that includes an error stacktrace.", + "description": "Unauthorized", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } } } } @@ -93589,96 +93641,124 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/resource/tenant": { + "get": { "tags": [ - "telemetry-controller" + "tb-resource-controller" ], - "summary": "Delete device attributes (deleteDeviceAttributes)", - "description": "Delete device attributes using provided Device Id, scope and a list of keys. Referencing a non-existing Device Id will cause an error\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "deleteDeviceAttributes", + "summary": "Get All Resource Infos (getTenantResources)", + "description": "Returns a page of Resource Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantResources", "parameters": [ { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "scope", - "in": "path", - "description": "A string value representing the attributes scope. For example, 'SERVER_SCOPE'.", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string", - "enum": [ - "SERVER_SCOPE", - "SHARED_SCOPE", - "CLIENT_SCOPE" - ] + "type": "integer", + "format": "int32" } }, { - "name": "keys", + "name": "textSearch", "in": "query", - "description": "A string value representing the comma-separated list of attributes keys. For example, 'active,inactivityAlarmTime'. If attribute keys contain comma, duplicate 'key' parameter for each key, for example '?key=my,key&key=my,second,key", + "description": "The case insensitive 'substring' filter based on the resource title.", "required": false, "schema": { "type": "string" } }, { - "name": "key", + "name": "sortProperty", "in": "query", - "description": "Repeatable key query parameter (alternative to comma-separated 'keys')", + "description": "Property of entity to sort by", + "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string", + "enum": [ + "createdTime", + "title", + "resourceType", + "tenantId" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], "responses": { "200": { - "description": "Device attributes was removed for the selected keys in the request. Platform creates an audit log event about device attributes removal with action type 'ATTRIBUTES_DELETED'.", + "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/PageDataTbResourceInfo" } } } }, "400": { - "description": "Platform returns a bad request in case if keys or scope are not specified.", + "description": "Bad Request", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } } } } }, "401": { - "description": "User is not authorized to delete device attributes for selected entity. Most likely, User belongs to different Customer or Tenant.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "The exception was thrown during processing the request. Platform creates an audit log event about device attributes removal with action type 'ATTRIBUTES_DELETED' that includes an error stacktrace.", + "description": "Unauthorized", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } } } } @@ -93757,95 +93837,99 @@ ] } }, - "/api/plugins/telemetry/{entityType}/{entityId}/attributes/{scope}": { + "/api/resource/upload": { "post": { "tags": [ - "telemetry-controller" - ], - "summary": "Save entity attributes (saveEntityAttributesV2)", - "description": "Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: \n\n * SERVER_SCOPE - supported for all entity types;\n * SHARED_SCOPE - supported for devices.\n\nThe request payload is a JSON object with key-value format of attributes to create or update. For example:\n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\nReferencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveEntityAttributesV2", - "parameters": [ - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "scope", - "in": "path", - "description": "A string value representing the attributes scope. For example, 'SERVER_SCOPE'.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "SERVER_SCOPE", - "SHARED_SCOPE" - ] - } - } + "tb-resource-controller" ], + "summary": "Upload Resource via Multipart File (uploadResource)", + "description": "Create the Resource using multipart file upload. \n\nResource combination of the title with the key is unique in the scope of tenant. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "uploadResource", "requestBody": { - "description": "A string value representing the json object. For example, '{\"key\":\"value\"}'. See API call description for more details.", "content": { - "application/json": { + "multipart/form-data": { "schema": { - "type": "string" + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Resource title." + }, + "resourceType": { + "type": "string", + "description": "Resource type." + }, + "descriptor": { + "type": "string", + "description": "Resource descriptor (JSON)." + }, + "resourceSubType": { + "type": "string", + "description": "Resource sub type." + }, + "file": { + "type": "string", + "format": "binary", + "description": "Resource file." + } + }, + "required": [ + "file", + "resourceType" + ] } } - }, - "required": true + } }, "responses": { "200": { - "description": "Attribute from the request was created or updated. Platform creates an audit log event about entity attributes updates with action type 'ATTRIBUTES_UPDATED', and also sends event msg to the rule engine with msg type 'ATTRIBUTES_UPDATED'.", + "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/TbResourceInfo" } } } }, "400": { - "description": "Invalid structure of the request or invalid attributes scope provided.", + "description": "Bad Request", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid request body", + "errorCode": 31, + "timestamp": 1609459200000 + } + } } } } }, "401": { - "description": "User is not authorized to save entity attributes for selected entity. Most likely, User belongs to different Customer or Tenant.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "The exception was thrown during processing the request. Platform creates an audit log event about entity attributes updates with action type 'ATTRIBUTES_UPDATED' that includes an error stacktrace.", + "description": "Unauthorized", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } } } } @@ -93924,44 +94008,51 @@ ] } }, - "/api/plugins/telemetry/{entityType}/{entityId}/keys/attributes": { - "get": { + "/api/resource/{id}/data": { + "put": { "tags": [ - "telemetry-controller" + "tb-resource-controller" ], - "summary": "Get all attribute keys (getAttributeKeys)", - "description": "Returns a set of unique attribute key names for the selected entity. The response will include merged key names set for all attribute scopes:\n\n * SERVER_SCOPE - supported for all entity types;\n * CLIENT_SCOPE - supported for devices;\n * SHARED_SCOPE - supported for devices. \n\nReferencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAttributeKeys", + "summary": "updateResourceData", + "operationId": "updateResourceData", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "id", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Unique identifier of the Resource to update", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary", + "description": "Resource file." + } + }, + "required": [ + "file" + ] + } + } + } + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -94082,58 +94173,42 @@ ] } }, - "/api/plugins/telemetry/{entityType}/{entityId}/keys/attributes/{scope}": { - "get": { + "/api/resource/{id}/info": { + "put": { "tags": [ - "telemetry-controller" + "tb-resource-controller" ], - "summary": "Get all attribute keys by scope (getAttributeKeysByScope)", - "description": "Returns a set of unique attribute key names for the selected entity and attributes scope: \n\n * SERVER_SCOPE - supported for all entity types;\n * CLIENT_SCOPE - supported for devices;\n * SHARED_SCOPE - supported for devices. \n\nReferencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAttributeKeysByScope", + "summary": "updateResourceInfo", + "operationId": "updateResourceInfo", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "scope", + "name": "id", "in": "path", - "description": "A string value representing the attributes scope. For example, 'SERVER_SCOPE'.", + "description": "Unique identifier of the Resource to update", "required": true, "schema": { "type": "string", - "enum": [ - "SERVER_SCOPE", - "SHARED_SCOPE", - "CLIENT_SCOPE" - ] + "format": "uuid" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceInfo" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -94254,28 +94329,19 @@ ] } }, - "/api/plugins/telemetry/{entityType}/{entityId}/keys/timeseries": { + "/api/resource/{resourceId}": { "get": { "tags": [ - "telemetry-controller" + "tb-resource-controller" ], - "summary": "Get time series keys (getTimeseriesKeys)", - "description": "Returns a set of unique time series key names for the selected entity. \n\nReferencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getTimeseriesKeys", + "summary": "Get Resource (getResourceById)", + "description": "Fetch the Resource object based on the provided Resource Id. Resource is a heavyweight object that includes main information about the Resource and also data. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getResourceById", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "resourceId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -94288,10 +94354,1645 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/TbResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "deprecated": true, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + }, + "delete": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Delete Resource (deleteResource)", + "description": "Deletes the Resource. Referencing non-existing Resource Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteResource", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "force", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceDeleteResult" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/resource/{resourceId}/download": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Download Resource (downloadResource)", + "description": "Download Resource based on the provided Resource Id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "downloadResource", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/resource/{resourceType}/{scope}/{key}": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Download resource (downloadResourceIfChanged)", + "description": "Download resource with a given type and key for the given scope\n\nAvailable for any authorized user. ", + "operationId": "downloadResourceIfChanged", + "parameters": [ + { + "name": "resourceType", + "in": "path", + "description": "Type of the resource", + "required": true, + "schema": { + "type": "string", + "enum": [ + "lwm2m_model", + "jks", + "pkcs_12", + "js_module", + "dashboard" + ] + } + }, + { + "name": "scope", + "in": "path", + "description": "Scope of the resource", + "required": true, + "schema": { + "type": "string", + "enum": [ + "system", + "tenant" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Key of the resource, e.g. 'extension.js'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/resource/{resourceType}/{scope}/{key}/info": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Get resource info (getResourceInfo)", + "description": "Get info for the resource with the given type, scope and key. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getResourceInfo", + "parameters": [ + { + "name": "resourceType", + "in": "path", + "description": "Type of the resource", + "required": true, + "schema": { + "type": "string", + "enum": [ + "lwm2m_model", + "jks", + "pkcs_12", + "js_module", + "dashboard" + ] + } + }, + { + "name": "scope", + "in": "path", + "description": "Scope of the resource", + "required": true, + "schema": { + "type": "string", + "enum": [ + "system", + "tenant" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Key of the resource, e.g. 'extension.js'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/plugins/telemetry/{deviceId}/{scope}": { + "post": { + "tags": [ + "telemetry-controller" + ], + "summary": "Save device attributes (saveDeviceAttributes)", + "description": "Creates or updates the device attributes based on device id and specified attribute scope. The request payload is a JSON object with key-value format of attributes to create or update. For example:\n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveDeviceAttributes", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "scope", + "in": "path", + "description": "A string value representing the attributes scope. For example, 'SERVER_SCOPE'.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE" + ] + } + } + ], + "requestBody": { + "description": "A string value representing the json object. For example, '{\"key\":\"value\"}'. See API call description for more details.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Attribute from the request was created or updated. Platform creates an audit log event about device attributes updates with action type 'ATTRIBUTES_UPDATED', and also sends event msg to the rule engine with msg type 'ATTRIBUTES_UPDATED'.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Invalid structure of the request or invalid attributes scope provided.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "User is not authorized to save device attributes for selected device. Most likely, User belongs to different Customer or Tenant.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "The exception was thrown during processing the request. Platform creates an audit log event about device attributes updates with action type 'ATTRIBUTES_UPDATED' that includes an error stacktrace.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + }, + "delete": { + "tags": [ + "telemetry-controller" + ], + "summary": "Delete device attributes (deleteDeviceAttributes)", + "description": "Delete device attributes using provided Device Id, scope and a list of keys. Referencing a non-existing Device Id will cause an error\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteDeviceAttributes", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "scope", + "in": "path", + "description": "A string value representing the attributes scope. For example, 'SERVER_SCOPE'.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE", + "CLIENT_SCOPE" + ] + } + }, + { + "name": "keys", + "in": "query", + "description": "A string value representing the comma-separated list of attributes keys. For example, 'active,inactivityAlarmTime'. If attribute keys contain comma, duplicate 'key' parameter for each key, for example '?key=my,key&key=my,second,key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "key", + "in": "query", + "description": "Repeatable key query parameter (alternative to comma-separated 'keys')", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Device attributes was removed for the selected keys in the request. Platform creates an audit log event about device attributes removal with action type 'ATTRIBUTES_DELETED'.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Platform returns a bad request in case if keys or scope are not specified.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "User is not authorized to delete device attributes for selected entity. Most likely, User belongs to different Customer or Tenant.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "The exception was thrown during processing the request. Platform creates an audit log event about device attributes removal with action type 'ATTRIBUTES_DELETED' that includes an error stacktrace.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/plugins/telemetry/{entityType}/{entityId}/attributes/{scope}": { + "post": { + "tags": [ + "telemetry-controller" + ], + "summary": "Save entity attributes (saveEntityAttributesV2)", + "description": "Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: \n\n * SERVER_SCOPE - supported for all entity types;\n * SHARED_SCOPE - supported for devices.\n\nThe request payload is a JSON object with key-value format of attributes to create or update. For example:\n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\nReferencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveEntityAttributesV2", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "scope", + "in": "path", + "description": "A string value representing the attributes scope. For example, 'SERVER_SCOPE'.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE" + ] + } + } + ], + "requestBody": { + "description": "A string value representing the json object. For example, '{\"key\":\"value\"}'. See API call description for more details.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Attribute from the request was created or updated. Platform creates an audit log event about entity attributes updates with action type 'ATTRIBUTES_UPDATED', and also sends event msg to the rule engine with msg type 'ATTRIBUTES_UPDATED'.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Invalid structure of the request or invalid attributes scope provided.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "User is not authorized to save entity attributes for selected entity. Most likely, User belongs to different Customer or Tenant.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "The exception was thrown during processing the request. Platform creates an audit log event about entity attributes updates with action type 'ATTRIBUTES_UPDATED' that includes an error stacktrace.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/plugins/telemetry/{entityType}/{entityId}/keys/attributes": { + "get": { + "tags": [ + "telemetry-controller" + ], + "summary": "Get all attribute keys (getAttributeKeys)", + "description": "Returns a set of unique attribute key names for the selected entity. The response will include merged key names set for all attribute scopes:\n\n * SERVER_SCOPE - supported for all entity types;\n * CLIENT_SCOPE - supported for devices;\n * SHARED_SCOPE - supported for devices. \n\nReferencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAttributeKeys", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/plugins/telemetry/{entityType}/{entityId}/keys/attributes/{scope}": { + "get": { + "tags": [ + "telemetry-controller" + ], + "summary": "Get all attribute keys by scope (getAttributeKeysByScope)", + "description": "Returns a set of unique attribute key names for the selected entity and attributes scope: \n\n * SERVER_SCOPE - supported for all entity types;\n * CLIENT_SCOPE - supported for devices;\n * SHARED_SCOPE - supported for devices. \n\nReferencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAttributeKeysByScope", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "scope", + "in": "path", + "description": "A string value representing the attributes scope. For example, 'SERVER_SCOPE'.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE", + "CLIENT_SCOPE" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/plugins/telemetry/{entityType}/{entityId}/keys/timeseries": { + "get": { + "tags": [ + "telemetry-controller" + ], + "summary": "Get time series keys (getTimeseriesKeys)", + "description": "Returns a set of unique time series key names for the selected entity. \n\nReferencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getTimeseriesKeys", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } } } } @@ -113766,25 +115467,13 @@ }, "AdminSettingsId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ADMIN_SETTINGS" - ], - "example": "ADMIN_SETTINGS" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "AffectedTenantAdministratorsFilter": { @@ -114024,32 +115713,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "AiModelId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "Entity type of the AI model", - "enum": [ - "AI_MODEL" - ], - "example": "AI_MODEL" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "AiModelType": { @@ -114260,8 +115934,7 @@ } ], "required": [ - "notifyOn", - "triggerType" + "notifyOn" ] }, "AlarmAssignmentRecipientsConfig": { @@ -114486,9 +116159,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "AlarmCommentRecipientsConfig": { @@ -115028,25 +116698,13 @@ }, "AlarmId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ALARM" - ], - "example": "ALARM" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "AlarmInfo": { @@ -115240,8 +116898,7 @@ } ], "required": [ - "notifyOn", - "triggerType" + "notifyOn" ] }, "AlarmRule": { @@ -115444,7 +117101,6 @@ } ], "required": [ - "expression", "unit", "value" ] @@ -115529,8 +117185,7 @@ } ], "required": [ - "count", - "expression" + "count" ] }, "AlarmRuleSchedule": { @@ -115556,9 +117211,6 @@ { "$ref": "#/components/schemas/AlarmRuleCondition" } - ], - "required": [ - "expression" ] }, "AlarmRuleSpecificTimeSchedule": { @@ -115719,10 +117371,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "AliasEntityId": { @@ -115861,10 +117509,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -115968,10 +117612,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -116110,25 +117750,13 @@ }, "ApiKeyId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "API_KEY" - ], - "example": "API_KEY" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "ApiKeyInfo": { @@ -116206,9 +117834,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "ApiUsageLimitRecipientsConfig": { @@ -116249,6 +117874,17 @@ } ] }, + "ApiUsageStateId": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" + }, + { + "type": "object" + } + ] + }, "ApiUsageStateValue": { "type": "string", "enum": [ @@ -116290,7 +117926,9 @@ "TS_ROLLING" ] }, - "ArrayNode": {}, + "ArrayNode": { + + }, "Asset": { "type": "object", "properties": { @@ -116340,8 +117978,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -116360,32 +117997,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "AssetId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ASSET" - ], - "example": "ASSET" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "AssetInfo": { @@ -116450,8 +118072,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -116529,32 +118150,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "AssetProfileId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ASSET_PROFILE" - ], - "example": "ASSET_PROFILE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "AssetProfileInfo": { @@ -116801,12 +118407,7 @@ "$ref": "#/components/schemas/Output" }, { - "type": "object", - "properties": { - "strategy": { - "$ref": "#/components/schemas/AttributesOutputStrategy" - } - } + "type": "object" } ] }, @@ -116860,8 +118461,7 @@ }, "entityId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Entity id", - "readOnly": true + "description": "JSON object with Entity id" }, "entityName": { "type": "string", @@ -117130,10 +118730,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -117358,25 +118954,13 @@ }, "BlobEntityId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "BLOB_ENTITY" - ], - "example": "BLOB_ENTITY" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "BlobEntityInfo": { @@ -117428,8 +119012,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -117496,8 +119079,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -117889,32 +119471,17 @@ } } } - ], - "required": [ - "eventType" ] }, "CalculatedFieldId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "CALCULATED_FIELD" - ], - "example": "CALCULATED_FIELD" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "CalculatedFieldInfo": { @@ -118068,8 +119635,7 @@ } ], "required": [ - "calculatedFieldId", - "tasksKey" + "calculatedFieldId" ] }, "CfReprocessingJobResult": { @@ -118260,9 +119826,6 @@ } } } - ], - "required": [ - "spec" ] }, "CoapDeviceProfileTransportConfiguration": { @@ -118445,9 +120008,6 @@ } } } - ], - "required": [ - "type" ] }, "ComponentClusteringMode": { @@ -118589,7 +120149,9 @@ "ContactBasedObject": { "type": "object", "properties": { - "id": {}, + "id": { + + }, "createdTime": { "type": "integer", "format": "int64", @@ -118702,32 +120264,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "ConverterId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "CONVERTER" - ], - "example": "CONVERTER" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "ConverterType": { @@ -118760,10 +120307,6 @@ { "$ref": "#/components/schemas/ReportTemplateConfig" } - ], - "required": [ - "components", - "format" ] }, "CurrentOwnerDynamicSourceConfiguration": { @@ -119002,10 +120545,6 @@ "type": "boolean", "description": "Set the access token of the current user to a new dashboard" }, - "visible": { - "type": "boolean", - "description": "Mark if menu item is visible for user" - }, "pages": { "type": "array", "description": "List of child menu items", @@ -119018,8 +120557,7 @@ ], "required": [ "menuItemType", - "name", - "type" + "name" ] }, "CustomMobilePage": { @@ -119035,11 +120573,6 @@ "description": "Page label", "example": "Air quality" }, - "visible": { - "type": "boolean", - "description": "Indicates if page is visible", - "example": true - }, "icon": { "type": "string", "description": "URL of the page icon", @@ -119052,10 +120585,6 @@ } } } - ], - "required": [ - "type", - "visible" ] }, "CustomTimeSchedule": { @@ -119185,8 +120714,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -119209,32 +120737,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "CustomerId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "CUSTOMER" - ], - "example": "CUSTOMER" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "CustomerInfo": { @@ -119336,8 +120849,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -119446,8 +120958,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" } } }, @@ -119503,9 +121014,7 @@ } ], "required": [ - "config", - "subType", - "type" + "config" ] }, "DashboardExportData": { @@ -119513,32 +121022,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "DashboardId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "DASHBOARD" - ], - "example": "DASHBOARD" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "DashboardInfo": { @@ -119626,8 +121120,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" } } }, @@ -119644,11 +121137,6 @@ "description": "Page label", "example": "Air quality" }, - "visible": { - "type": "boolean", - "description": "Indicates if page is visible", - "example": true - }, "icon": { "type": "string", "description": "URL of the page icon", @@ -119661,10 +121149,6 @@ } } } - ], - "required": [ - "type", - "visible" ] }, "DashboardReportConfig": { @@ -119921,9 +121405,6 @@ } } } - ], - "required": [ - "eventType" ] }, "DebugIntegrationEventFilter": { @@ -119962,9 +121443,6 @@ } } } - ], - "required": [ - "eventType" ] }, "DebugSettings": { @@ -120021,9 +121499,6 @@ { "$ref": "#/components/schemas/DataKeySettings" } - ], - "required": [ - "type" ] }, "DefaultDeviceConfiguration": { @@ -120032,10 +121507,7 @@ "$ref": "#/components/schemas/DeviceConfiguration" } ], - "description": "Default device configuration", - "required": [ - "type" - ] + "description": "Default device configuration" }, "DefaultDeviceProfileConfiguration": { "allOf": [ @@ -120083,10 +121555,6 @@ "description": "URL of the menu item icon. Overrides 'materialIcon'", "example": "My Custom Menu" }, - "visible": { - "type": "boolean", - "description": "Mark if menu item is visible for user" - }, "pages": { "type": "array", "description": "List of child menu items", @@ -120096,9 +121564,6 @@ } } } - ], - "required": [ - "type" ] }, "DefaultMobilePage": { @@ -120114,11 +121579,6 @@ "description": "Page label", "example": "Air quality" }, - "visible": { - "type": "boolean", - "description": "Indicates if page is visible", - "example": true - }, "icon": { "type": "string", "description": "URL of the page icon", @@ -120131,10 +121591,6 @@ } } } - ], - "required": [ - "type", - "visible" ] }, "DefaultPageId": { @@ -120624,14 +122080,9 @@ "type": "integer", "format": "int64" }, - "deviceData": { - "$ref": "#/components/schemas/DeviceData", - "description": "JSON object with content specific to type of transport in the device profile." - }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -120641,6 +122092,10 @@ "description": "Temperature sensor", "lastConnectedGateway": "784f394c-42b6-435a-983c-b7beff2784f9" } + }, + "deviceData": { + "$ref": "#/components/schemas/DeviceData", + "description": "JSON object with content specific to type of transport in the device profile." } }, "required": [ @@ -120683,8 +122138,7 @@ } ], "required": [ - "notifyOn", - "triggerType" + "notifyOn" ] }, "DeviceActivityRecipientsConfig": { @@ -120836,9 +122290,6 @@ } } } - ], - "required": [ - "entityType" ] }, "DeviceGroupOtaPackage": { @@ -120865,25 +122316,13 @@ }, "DeviceId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "DEVICE" - ], - "example": "DEVICE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "DeviceInfo": { @@ -120959,14 +122398,9 @@ "description": "Device active flag.", "readOnly": true }, - "deviceData": { - "$ref": "#/components/schemas/DeviceData", - "description": "JSON object with content specific to type of transport in the device profile." - }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -120976,6 +122410,10 @@ "description": "Temperature sensor", "lastConnectedGateway": "784f394c-42b6-435a-983c-b7beff2784f9" } + }, + "deviceData": { + "$ref": "#/components/schemas/DeviceData", + "description": "JSON object with content specific to type of transport in the device profile." } }, "required": [ @@ -121167,32 +122605,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "DeviceProfileId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "DEVICE_PROFILE" - ], - "example": "DEVICE_PROFILE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "DeviceProfileInfo": { @@ -121465,10 +122888,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "Domain": { @@ -121508,8 +122927,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" } }, "required": [ @@ -121518,21 +122936,13 @@ }, "DomainId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "example": "DEVICE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "DomainInfo": { @@ -121578,8 +122988,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" } }, "required": [ @@ -121641,10 +123050,7 @@ } } ], - "description": "Dummy job configuration", - "required": [ - "tasksKey" - ] + "description": "Dummy job configuration" }, "DummyJobResult": { "allOf": [ @@ -121869,8 +123275,7 @@ "format": "int64" }, "ownerId": { - "$ref": "#/components/schemas/EntityId", - "readOnly": true + "$ref": "#/components/schemas/EntityId" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -121907,9 +123312,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "EdgeCommunicationFailureRecipientsConfig": { @@ -121960,9 +123362,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "EdgeConnectionRecipientsConfig": { @@ -122136,25 +123535,13 @@ }, "EdgeId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "EDGE" - ], - "example": "EDGE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "EdgeInfo": { @@ -122237,8 +123624,7 @@ "readOnly": true }, "ownerId": { - "$ref": "#/components/schemas/EntityId", - "readOnly": true + "$ref": "#/components/schemas/EntityId" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -122419,7 +123805,6 @@ } ], "required": [ - "body", "subject" ] }, @@ -122493,9 +123878,6 @@ } } } - ], - "required": [ - "version" ] }, "EntitiesByGroupNameFilter": { @@ -122547,9 +123929,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "EntitiesLimitRecipientsConfig": { @@ -122617,9 +123996,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "EntityActionRecipientsConfig": { @@ -122682,8 +124058,7 @@ "required": [ "arguments", "interval", - "metrics", - "output" + "metrics" ] }, "EntityAlias": { @@ -123064,9 +124439,6 @@ } } } - ], - "required": [ - "entityType" ] }, "EntityGroupFilter": { @@ -123098,25 +124470,13 @@ }, "EntityGroupId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ENTITY_GROUP" - ], - "example": "ENTITY_GROUP" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "EntityGroupInfo": { @@ -123174,7 +124534,146 @@ "type": "array", "description": "List of the entity group owners.", "items": { - "$ref": "#/components/schemas/EntityId" + "oneOf": [ + { + "$ref": "#/components/schemas/AdminSettingsId" + }, + { + "$ref": "#/components/schemas/AiModelId" + }, + { + "$ref": "#/components/schemas/AlarmId" + }, + { + "$ref": "#/components/schemas/ApiKeyId" + }, + { + "$ref": "#/components/schemas/ApiUsageStateId" + }, + { + "$ref": "#/components/schemas/AssetId" + }, + { + "$ref": "#/components/schemas/AssetProfileId" + }, + { + "$ref": "#/components/schemas/BlobEntityId" + }, + { + "$ref": "#/components/schemas/CalculatedFieldId" + }, + { + "$ref": "#/components/schemas/ConverterId" + }, + { + "$ref": "#/components/schemas/CustomerId" + }, + { + "$ref": "#/components/schemas/DashboardId" + }, + { + "$ref": "#/components/schemas/DeviceId" + }, + { + "$ref": "#/components/schemas/DeviceProfileId" + }, + { + "$ref": "#/components/schemas/DomainId" + }, + { + "$ref": "#/components/schemas/EdgeId" + }, + { + "$ref": "#/components/schemas/EntityGroupId" + }, + { + "$ref": "#/components/schemas/EntityViewId" + }, + { + "$ref": "#/components/schemas/GroupPermissionId" + }, + { + "$ref": "#/components/schemas/IntegrationId" + }, + { + "$ref": "#/components/schemas/JobId" + }, + { + "$ref": "#/components/schemas/MobileAppBundleId" + }, + { + "$ref": "#/components/schemas/MobileAppId" + }, + { + "$ref": "#/components/schemas/NotificationId" + }, + { + "$ref": "#/components/schemas/NotificationRequestId" + }, + { + "$ref": "#/components/schemas/NotificationRuleId" + }, + { + "$ref": "#/components/schemas/NotificationTargetId" + }, + { + "$ref": "#/components/schemas/NotificationTemplateId" + }, + { + "$ref": "#/components/schemas/OAuth2ClientId" + }, + { + "$ref": "#/components/schemas/OtaPackageId" + }, + { + "$ref": "#/components/schemas/QueueId" + }, + { + "$ref": "#/components/schemas/QueueStatsId" + }, + { + "$ref": "#/components/schemas/ReportId" + }, + { + "$ref": "#/components/schemas/ReportTemplateId" + }, + { + "$ref": "#/components/schemas/RoleId" + }, + { + "$ref": "#/components/schemas/RpcId" + }, + { + "$ref": "#/components/schemas/RuleChainId" + }, + { + "$ref": "#/components/schemas/RuleNodeId" + }, + { + "$ref": "#/components/schemas/SchedulerEventId" + }, + { + "$ref": "#/components/schemas/SecretId" + }, + { + "$ref": "#/components/schemas/TbResourceId" + }, + { + "$ref": "#/components/schemas/TenantId" + }, + { + "$ref": "#/components/schemas/TenantProfileId" + }, + { + "$ref": "#/components/schemas/UserId" + }, + { + "$ref": "#/components/schemas/WidgetTypeId" + }, + { + "$ref": "#/components/schemas/WidgetsBundleId" + } + ] }, "uniqueItems": true }, @@ -123239,6 +124738,57 @@ }, "EntityId": { "type": "object", + "discriminator": { + "propertyName": "entityType", + "mapping": { + "ADMIN_SETTINGS": "#/components/schemas/AdminSettingsId", + "AI_MODEL": "#/components/schemas/AiModelId", + "ALARM": "#/components/schemas/AlarmId", + "API_KEY": "#/components/schemas/ApiKeyId", + "API_USAGE_STATE": "#/components/schemas/ApiUsageStateId", + "ASSET": "#/components/schemas/AssetId", + "ASSET_PROFILE": "#/components/schemas/AssetProfileId", + "BLOB_ENTITY": "#/components/schemas/BlobEntityId", + "CALCULATED_FIELD": "#/components/schemas/CalculatedFieldId", + "CONVERTER": "#/components/schemas/ConverterId", + "CUSTOMER": "#/components/schemas/CustomerId", + "DASHBOARD": "#/components/schemas/DashboardId", + "DEVICE": "#/components/schemas/DeviceId", + "DEVICE_PROFILE": "#/components/schemas/DeviceProfileId", + "DOMAIN": "#/components/schemas/DomainId", + "EDGE": "#/components/schemas/EdgeId", + "ENTITY_GROUP": "#/components/schemas/EntityGroupId", + "ENTITY_VIEW": "#/components/schemas/EntityViewId", + "GROUP_PERMISSION": "#/components/schemas/GroupPermissionId", + "INTEGRATION": "#/components/schemas/IntegrationId", + "JOB": "#/components/schemas/JobId", + "MOBILE_APP": "#/components/schemas/MobileAppId", + "MOBILE_APP_BUNDLE": "#/components/schemas/MobileAppBundleId", + "NOTIFICATION": "#/components/schemas/NotificationId", + "NOTIFICATION_REQUEST": "#/components/schemas/NotificationRequestId", + "NOTIFICATION_RULE": "#/components/schemas/NotificationRuleId", + "NOTIFICATION_TARGET": "#/components/schemas/NotificationTargetId", + "NOTIFICATION_TEMPLATE": "#/components/schemas/NotificationTemplateId", + "OAUTH2_CLIENT": "#/components/schemas/OAuth2ClientId", + "OTA_PACKAGE": "#/components/schemas/OtaPackageId", + "QUEUE": "#/components/schemas/QueueId", + "QUEUE_STATS": "#/components/schemas/QueueStatsId", + "REPORT": "#/components/schemas/ReportId", + "REPORT_TEMPLATE": "#/components/schemas/ReportTemplateId", + "ROLE": "#/components/schemas/RoleId", + "RPC": "#/components/schemas/RpcId", + "RULE_CHAIN": "#/components/schemas/RuleChainId", + "RULE_NODE": "#/components/schemas/RuleNodeId", + "SCHEDULER_EVENT": "#/components/schemas/SchedulerEventId", + "SECRET": "#/components/schemas/SecretId", + "TB_RESOURCE": "#/components/schemas/TbResourceId", + "TENANT": "#/components/schemas/TenantId", + "TENANT_PROFILE": "#/components/schemas/TenantProfileId", + "USER": "#/components/schemas/UserId", + "WIDGETS_BUNDLE": "#/components/schemas/WidgetsBundleId", + "WIDGET_TYPE": "#/components/schemas/WidgetTypeId" + } + }, "properties": { "id": { "type": "string", @@ -123535,10 +125085,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "EntityType": { @@ -123726,9 +125272,6 @@ } } } - ], - "required": [ - "type" ] }, "EntityVersion": { @@ -123808,8 +125351,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -123830,32 +125372,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "EntityViewId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ENTITY_VIEW" - ], - "example": "ENTITY_VIEW" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "EntityViewInfo": { @@ -123929,8 +125456,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -124181,10 +125707,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "ErrorEventFilter": { @@ -124212,9 +125734,6 @@ } } } - ], - "required": [ - "eventType" ] }, "EscalatedNotificationRuleRecipientsConfig": { @@ -124241,8 +125760,7 @@ ], "description": "Escalated notification rule recipients configuration", "required": [ - "escalationTable", - "triggerType" + "escalationTable" ] }, "EventFilter": { @@ -124320,8 +125838,7 @@ }, "entityId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Entity Id for which event is created.", - "readOnly": true + "description": "JSON object with Entity Id for which event is created." }, "body": { "$ref": "#/components/schemas/JsonNode" @@ -124364,10 +125881,6 @@ "errorDetails": { "type": "string", "description": "A string containing details about the failure" - }, - "status": { - "type": "string", - "example": "FAILURE" } } } @@ -124384,22 +125897,22 @@ "FeaturesInfo": { "type": "object", "properties": { - "whiteLabelingEnabled": { - "type": "boolean" - }, "smsEnabled": { "type": "boolean" }, "oauthEnabled": { "type": "boolean" }, - "twoFaEnabled": { + "whiteLabelingEnabled": { "type": "boolean" }, - "emailEnabled": { + "notificationEnabled": { "type": "boolean" }, - "notificationEnabled": { + "twoFaEnabled": { + "type": "boolean" + }, + "emailEnabled": { "type": "boolean" } } @@ -124572,7 +126085,6 @@ ], "required": [ "entityCoordinates", - "output", "zoneGroups" ] }, @@ -124627,10 +126139,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -124742,10 +126250,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -124861,10 +126365,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -125001,25 +126501,13 @@ }, "GroupPermissionId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "GROUP_PERMISSION" - ], - "example": "GROUP_PERMISSION" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "GroupPermissionInfo": { @@ -125106,7 +126594,9 @@ "HasIdObject": { "type": "object", "properties": { - "id": {} + "id": { + + } } }, "HeaderFooter": { @@ -125210,10 +126700,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "History": { @@ -125290,10 +126776,6 @@ "description": "URL of the menu item icon. Overrides 'materialIcon'", "example": "My Custom Menu" }, - "visible": { - "type": "boolean", - "description": "Mark if menu item is visible for user" - }, "pages": { "type": "array", "description": "List of child menu items", @@ -125315,9 +126797,6 @@ } } } - ], - "required": [ - "type" ] }, "HomeMenuItemType": { @@ -125410,10 +126889,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "ImageSourceType": { @@ -125562,32 +127037,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "IntegrationId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "INTEGRATION" - ], - "example": "INTEGRATION" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "IntegrationInfo": { @@ -125695,9 +127155,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "IntegrationLifecycleEventRecipientsConfig": { @@ -125860,25 +127317,13 @@ }, "JobId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "JOB" - ], - "example": "JOB" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "JobResult": { @@ -125967,7 +127412,9 @@ }, "JsonNode": { "description": "A value representing the any type (object or primitive)", - "example": {} + "example": { + + } }, "JsonTransportPayloadConfiguration": { "allOf": [ @@ -126172,10 +127619,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "LegendConfig": { @@ -126284,9 +127727,6 @@ } } } - ], - "required": [ - "eventType" ] }, "LimitedApi": { @@ -126983,9 +128423,6 @@ } } } - ], - "required": [ - "body" ] }, "MicrosoftTeamsNotificationTargetConfig": { @@ -127007,7 +128444,9 @@ "useOldApi": { "type": "boolean" }, - "id": {}, + "id": { + + }, "title": { "type": "string" }, @@ -127071,10 +128510,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -127261,21 +128696,13 @@ }, "MobileAppBundleId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "example": "DEVICE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "MobileAppBundleInfo": { @@ -127376,27 +128803,18 @@ } ], "required": [ - "body", "subject" ] }, "MobileAppId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "example": "DEVICE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "MobileAppNotificationDeliveryMethodConfig": { @@ -127515,64 +128933,6 @@ { "type": "object", "properties": { - "enabled": { - "type": "boolean", - "description": "Indicates if self-registration is allowed via sign-up form" - }, - "title": { - "type": "string", - "description": "The text message to appear on login form" - }, - "captcha": { - "$ref": "#/components/schemas/CaptchaParams", - "description": "Captcha site key for 'I'm not a robot' validation" - }, - "signUpFields": { - "type": "array", - "description": "List of sign-up form fields", - "items": { - "$ref": "#/components/schemas/SignUpField" - } - }, - "showPrivacyPolicy": { - "type": "boolean", - "description": "Show or hide 'Privacy Policy'" - }, - "showTermsOfUse": { - "type": "boolean", - "description": "Show or hide 'Terms of Use'" - }, - "notificationRecipient": { - "$ref": "#/components/schemas/NotificationTargetId", - "description": "Recipient to use for notifications when new user self-registered." - }, - "customerTitlePrefix": { - "type": "string", - "description": "Prefix to add to created customer" - }, - "customerGroupId": { - "$ref": "#/components/schemas/EntityGroupId", - "description": "Id of the customer group customer wil be added to." - }, - "permissions": { - "type": "array", - "description": "Group Permissions to assign for the new customer user.", - "items": { - "$ref": "#/components/schemas/GroupPermission" - } - }, - "defaultDashboard": { - "$ref": "#/components/schemas/DefaultDashboardParams", - "description": "Default dashboard params" - }, - "homeDashboard": { - "$ref": "#/components/schemas/HomeDashboardParams", - "description": "Home dashboard params" - }, - "customMenuId": { - "$ref": "#/components/schemas/CustomMenuId", - "description": "Custom menu id" - }, "privacyPolicy": { "type": "string", "description": "Privacy policy text. Supports HTML." @@ -127589,12 +128949,7 @@ } ], "required": [ - "captcha", - "permissions", - "redirect", - "signUpFields", - "title", - "type" + "redirect" ] }, "MobileSessionInfo": { @@ -127699,9 +129054,6 @@ { "$ref": "#/components/schemas/NotificationRuleTriggerConfig" } - ], - "required": [ - "triggerType" ] }, "NewPlatformVersionRecipientsConfig": { @@ -127920,25 +129272,13 @@ }, "NotificationId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION" - ], - "example": "NOTIFICATION" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "NotificationInfo": { @@ -128049,25 +129389,13 @@ }, "NotificationRequestId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION_REQUEST" - ], - "example": "NOTIFICATION_REQUEST" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "NotificationRequestInfo": { @@ -128261,32 +129589,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "NotificationRuleId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION_RULE" - ], - "example": "NOTIFICATION_RULE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "NotificationRuleInfo": { @@ -128371,10 +129684,7 @@ "triggerType": { "$ref": "#/components/schemas/NotificationRuleTriggerType" } - }, - "required": [ - "triggerType" - ] + } }, "NotificationRuleTriggerConfig": { "type": "object", @@ -128505,32 +129815,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "NotificationTargetId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION_TARGET" - ], - "example": "NOTIFICATION_TARGET" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "NotificationTemplate": { @@ -128598,32 +129893,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "NotificationTemplateId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION_TEMPLATE" - ], - "example": "NOTIFICATION_TEMPLATE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "NotificationType": { @@ -128837,8 +130117,7 @@ "readOnly": true }, "ownerId": { - "$ref": "#/components/schemas/EntityId", - "readOnly": true + "$ref": "#/components/schemas/EntityId" } }, "required": [ @@ -128857,21 +130136,13 @@ }, "OAuth2ClientId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "example": "DEVICE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "OAuth2ClientInfo": { @@ -129232,10 +130503,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -129347,10 +130614,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -129484,7 +130747,7 @@ "version": { "type": "string", "description": "OTA Package version.", - "example": 1.0 + "example": 1 }, "tag": { "type": "string", @@ -129584,32 +130847,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "OtaPackageId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "OTA_PACKAGE" - ], - "example": "OTA_PACKAGE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "OtaPackageInfo": { @@ -129648,7 +130896,7 @@ "version": { "type": "string", "description": "OTA Package version.", - "example": 1.0 + "example": 1 }, "tag": { "type": "string", @@ -129791,7 +131039,9 @@ "type" ] }, - "OutputStrategy": {}, + "OutputStrategy": { + + }, "PSKLwM2MBootstrapServerCredential": { "allOf": [ { @@ -129887,10 +131137,6 @@ { "$ref": "#/components/schemas/ReportComponent" } - ], - "required": [ - "subType", - "type" ] }, "PageDataAiModel": { @@ -132081,10 +133327,6 @@ } } } - ], - "required": [ - "components", - "format" ] }, "PieChartLabelPosition": { @@ -132266,7 +133508,6 @@ ], "required": [ "arguments", - "output", "relation" ] }, @@ -132468,25 +133709,13 @@ }, "QueueId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "QUEUE" - ], - "example": "QUEUE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "QueueStats": { @@ -132515,25 +133744,13 @@ }, "QueueStatsId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "QUEUE_STATS" - ], - "example": "QUEUE_STATS" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "QuickTimeInterval": { @@ -132672,9 +133889,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "RateLimitsRecipientsConfig": { @@ -132728,9 +133942,6 @@ } } } - ], - "required": [ - "eventType" ] }, "ReadTsKvQueryResult": { @@ -132811,7 +134022,6 @@ "required": [ "arguments", "metrics", - "output", "relation" ] }, @@ -133017,8 +134227,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" } }, "required": [ @@ -133204,25 +134413,13 @@ }, "ReportId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "REPORT" - ], - "example": "REPORT" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "ReportInfo": { @@ -133268,8 +134465,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" } }, "required": [ @@ -133330,9 +134526,6 @@ } } } - ], - "required": [ - "tasksKey" ] }, "ReportJobResult": { @@ -133608,8 +134801,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" } }, "required": [ @@ -133667,32 +134859,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "ReportTemplateId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "REPORT_TEMPLATE" - ], - "example": "REPORT_TEMPLATE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "ReportTemplateInfo": { @@ -133753,8 +134930,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" } }, "required": [ @@ -133829,15 +135005,15 @@ "legendValueColor": { "type": "string" }, - "xaxis": { - "$ref": "#/components/schemas/TimeSeriesChartXAxisSettings" - }, "yaxes": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TimeSeriesChartYAxisSettings" } }, + "xaxis": { + "$ref": "#/components/schemas/TimeSeriesChartXAxisSettings" + }, "thresholds": { "type": "array", "items": { @@ -134126,9 +135302,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "RichTextComponent": { @@ -134170,10 +135343,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "Role": { @@ -134220,8 +135389,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -134242,32 +135410,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "RoleId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ROLE" - ], - "example": "ROLE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "RoleType": { @@ -134331,25 +135484,13 @@ }, "RpcId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "RPC" - ], - "example": "RPC" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "RpcStatus": { @@ -134508,9 +135649,6 @@ } } } - ], - "required": [ - "eventType" ] }, "RuleChainExportData": { @@ -134526,32 +135664,17 @@ } } } - ], - "required": [ - "entityType" ] }, "RuleChainId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "RULE_CHAIN" - ], - "example": "RULE_CHAIN" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "RuleChainImportResult": { @@ -134709,9 +135832,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "RuleEngineComponentLifecycleEventRecipientsConfig": { @@ -134881,32 +136001,17 @@ } } } - ], - "required": [ - "eventType" ] }, "RuleNodeId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "RULE_NODE" - ], - "example": "RULE_NODE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "SaveDeviceWithCredentialsRequest": { @@ -134964,7 +136069,7 @@ "version": { "type": "string", "description": "OTA Package version.", - "example": 1.0 + "example": 1 }, "tag": { "type": "string", @@ -135057,8 +136162,7 @@ }, "originatorId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Originator Id", - "readOnly": true + "description": "JSON object with Originator Id" }, "name": { "type": "string", @@ -135100,8 +136204,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -135136,8 +136239,7 @@ }, "originatorId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Originator Id", - "readOnly": true + "description": "JSON object with Originator Id" }, "name": { "type": "string", @@ -135167,8 +136269,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -135181,9 +136282,6 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "SchedulerEventFilter": { @@ -135212,25 +136310,13 @@ }, "SchedulerEventId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "SCHEDULER_EVENT" - ], - "example": "SCHEDULER_EVENT" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "SchedulerEventInfo": { @@ -135259,8 +136345,7 @@ }, "originatorId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Originator Id", - "readOnly": true + "description": "JSON object with Originator Id" }, "name": { "type": "string", @@ -135287,8 +136372,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -135322,8 +136406,7 @@ }, "originatorId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Originator Id", - "readOnly": true + "description": "JSON object with Originator Id" }, "name": { "type": "string", @@ -135367,8 +136450,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -135398,8 +136480,7 @@ } ], "required": [ - "arguments", - "output" + "arguments" ] }, "ScriptLanguage": { @@ -135459,25 +136540,13 @@ }, "SecretId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "SECRET" - ], - "example": "SECRET" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "SecretInfo": { @@ -135607,9 +136676,6 @@ "notificationRecipient": { "$ref": "#/components/schemas/NotificationTargetId" }, - "captcha": { - "$ref": "#/components/schemas/CaptchaParams" - }, "signUpFields": { "type": "array", "items": { @@ -135627,6 +136693,9 @@ }, "customerGroupId": { "$ref": "#/components/schemas/EntityGroupId" + }, + "captcha": { + "$ref": "#/components/schemas/CaptchaParams" } }, "required": [ @@ -135688,9 +136757,6 @@ } } } - ], - "required": [ - "spec" ] }, "ShortCustomerInfo": { @@ -135718,8 +136784,7 @@ "properties": { "id": { "$ref": "#/components/schemas/EntityId", - "description": "Entity Id object", - "readOnly": true + "description": "Entity Id object" }, "name": { "type": "string", @@ -135886,8 +136951,7 @@ } ], "required": [ - "arguments", - "output" + "arguments" ] }, "SimpleEntity": { @@ -135933,9 +136997,6 @@ } } } - ], - "required": [ - "type" ] }, "SingleEntityVersionLoadRequest": { @@ -135957,9 +137018,6 @@ } } } - ], - "required": [ - "type" ] }, "SlackConversation": { @@ -136005,9 +137063,6 @@ { "$ref": "#/components/schemas/DeliveryMethodNotificationTemplate" } - ], - "required": [ - "body" ] }, "SlackNotificationDeliveryMethodConfig": { @@ -136153,9 +137208,6 @@ { "$ref": "#/components/schemas/DeliveryMethodNotificationTemplate" } - ], - "required": [ - "body" ] }, "SmsProviderConfiguration": { @@ -136470,10 +137522,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "StarredDashboardInfo": { @@ -136568,9 +137616,6 @@ } } } - ], - "required": [ - "eventType" ] }, "StoreInfo": { @@ -136644,10 +137689,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "SubmitStrategy": { @@ -136683,10 +137724,6 @@ "generatedContent": { "type": "string", "description": "The text content generated by the model" - }, - "status": { - "type": "string", - "example": "SUCCESS" } } } @@ -136764,7 +137801,9 @@ } } }, - "SystemLevelUsersFilter": {}, + "SystemLevelUsersFilter": { + + }, "TableSortOrder": { "type": "object", "properties": { @@ -136781,9 +137820,6 @@ { "$ref": "#/components/schemas/NotificationRuleTriggerConfig" } - ], - "required": [ - "triggerType" ] }, "TaskProcessingFailureRecipientsConfig": { @@ -137004,11 +138040,11 @@ "public": { "type": "boolean" }, - "link": { + "publicLink": { "type": "string", "readOnly": true }, - "publicLink": { + "link": { "type": "string", "readOnly": true } @@ -137036,32 +138072,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "TbResourceId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "TB_RESOURCE" - ], - "example": "TB_RESOURCE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "TbResourceInfo": { @@ -137135,11 +138156,11 @@ "public": { "type": "boolean" }, - "link": { + "publicLink": { "type": "string", "readOnly": true }, - "publicLink": { + "link": { "type": "string", "readOnly": true } @@ -137321,9 +138342,6 @@ } } } - ], - "required": [ - "spec" ] }, "Tenant": { @@ -137448,25 +138466,13 @@ }, "TenantId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "TENANT" - ], - "example": "TENANT" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "TenantInfo": { @@ -137647,25 +138653,13 @@ }, "TenantProfileId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "TENANT_PROFILE" - ], - "example": "TENANT_PROFILE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "TenantProfileQueueConfiguration": { @@ -137901,23 +138895,7 @@ }, "ThingsboardErrorCode": { "description": "Platform error code", - "enum": [ - 2, - 10, - 11, - 15, - 20, - 30, - 31, - 32, - 33, - 34, - 35, - 40, - 41, - 45, - 46 - ] + "enum": [2, 10, 11, 15, 20, 30, 31, 32, 33, 34, 35, 40, 41, 45, 46] }, "ThingsboardErrorResponse": { "properties": { @@ -138040,9 +139018,6 @@ } } } - ], - "required": [ - "type" ] }, "TimeSeriesChartNoAggregationBarWidthSettings": { @@ -138352,12 +139327,7 @@ "$ref": "#/components/schemas/Output" }, { - "type": "object", - "properties": { - "strategy": { - "$ref": "#/components/schemas/TimeSeriesOutputStrategy" - } - } + "type": "object" } ] }, @@ -138467,10 +139437,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "TimeseriesTableComponent": { @@ -138533,10 +139499,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "ToCoreEdqsRequest": { @@ -138566,9 +139528,6 @@ } } } - ], - "required": [ - "spec" ] }, "ToServerRpcRequestSnmpCommunicationConfig": { @@ -138587,9 +139546,6 @@ } } } - ], - "required": [ - "spec" ] }, "Token": { @@ -138726,27 +139682,39 @@ "properties": { "metricSummaryItems": { "type": "array", - "items": {} + "items": { + + } }, "anomalyModelSummaryItems": { "type": "array", - "items": {} + "items": { + + } }, "calculationFieldSummaryItems": { "type": "array", - "items": {} + "items": { + + } }, "predictionModelSummaryItems": { "type": "array", - "items": {} + "items": { + + } }, "viewSummaryItems": { "type": "array", - "items": {} + "items": { + + } }, "aiSummaryItems": { "type": "array", - "items": {} + "items": { + + } } } }, @@ -138829,7 +139797,9 @@ }, "runtimeFilters": { "type": "array", - "items": {} + "items": { + + } } } }, @@ -138869,16 +139839,23 @@ "type": "integer", "format": "int64" }, - "value": {}, + "value": { + + }, "key": { "type": "string" }, + "doubleValue": { + "type": "number", + "format": "double" + }, + "longValue": { + "type": "integer", + "format": "int64" + }, "booleanValue": { "type": "boolean" }, - "valueAsString": { - "type": "string" - }, "dataType": { "$ref": "#/components/schemas/DataType" }, @@ -138888,13 +139865,8 @@ "strValue": { "type": "string" }, - "longValue": { - "type": "integer", - "format": "int64" - }, - "doubleValue": { - "type": "number", - "format": "double" + "valueAsString": { + "type": "string" }, "version": { "type": "integer", @@ -139236,8 +140208,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -139338,25 +140309,13 @@ }, "UserId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "USER" - ], - "example": "USER" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "UserInfo": { @@ -139434,8 +140393,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -139634,9 +140592,6 @@ } } } - ], - "required": [ - "version" ] }, "V3CaptchaParams": { @@ -139661,9 +140616,6 @@ } } } - ], - "required": [ - "version" ] }, "ValueSourceType": { @@ -139685,7 +140637,9 @@ } } }, - "Version": {}, + "Version": { + + }, "VersionCreateConfig": { "type": "object", "properties": { @@ -139892,7 +140846,6 @@ } ], "required": [ - "body", "subject" ] }, @@ -139904,64 +140857,6 @@ { "type": "object", "properties": { - "enabled": { - "type": "boolean", - "description": "Indicates if self-registration is allowed via sign-up form" - }, - "title": { - "type": "string", - "description": "The text message to appear on login form" - }, - "captcha": { - "$ref": "#/components/schemas/CaptchaParams", - "description": "Captcha site key for 'I'm not a robot' validation" - }, - "signUpFields": { - "type": "array", - "description": "List of sign-up form fields", - "items": { - "$ref": "#/components/schemas/SignUpField" - } - }, - "showPrivacyPolicy": { - "type": "boolean", - "description": "Show or hide 'Privacy Policy'" - }, - "showTermsOfUse": { - "type": "boolean", - "description": "Show or hide 'Terms of Use'" - }, - "notificationRecipient": { - "$ref": "#/components/schemas/NotificationTargetId", - "description": "Recipient to use for notifications when new user self-registered." - }, - "customerTitlePrefix": { - "type": "string", - "description": "Prefix to add to created customer" - }, - "customerGroupId": { - "$ref": "#/components/schemas/EntityGroupId", - "description": "Id of the customer group customer wil be added to." - }, - "permissions": { - "type": "array", - "description": "Group Permissions to assign for the new customer user.", - "items": { - "$ref": "#/components/schemas/GroupPermission" - } - }, - "defaultDashboard": { - "$ref": "#/components/schemas/DefaultDashboardParams", - "description": "Default dashboard params" - }, - "homeDashboard": { - "$ref": "#/components/schemas/HomeDashboardParams", - "description": "Home dashboard params" - }, - "customMenuId": { - "$ref": "#/components/schemas/CustomMenuId", - "description": "Custom menu id" - }, "privacyPolicy": { "type": "string", "description": "Privacy policy text. Supports HTML." @@ -139978,12 +140873,7 @@ } ], "required": [ - "captcha", - "domainId", - "permissions", - "signUpFields", - "title", - "type" + "domainId" ] }, "WebViewPage": { @@ -139999,11 +140889,6 @@ "description": "Page label", "example": "Air quality" }, - "visible": { - "type": "boolean", - "description": "Indicates if page is visible", - "example": true - }, "icon": { "type": "string", "description": "URL of the page icon", @@ -140016,10 +140901,6 @@ } } } - ], - "required": [ - "type", - "visible" ] }, "WeekInterval": { @@ -140309,32 +141190,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "WidgetTypeId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "WIDGET_TYPE" - ], - "example": "WIDGET_TYPE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "WidgetTypeInfo": { @@ -140497,32 +141363,17 @@ } } } - ], - "required": [ - "entityType" ] }, "WidgetsBundleId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "WIDGETS_BUNDLE" - ], - "example": "WIDGETS_BUNDLE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "X509CertificateChainProvisionConfiguration": { @@ -140697,10 +141548,10 @@ }, "ApiKeyForm": { "type": "apiKey", - "description": "Enter the API key value with 'ApiKey' prefix in format: **ApiKey **\n\nExample: **ApiKey tb_5te51SkLRYpjGrujUGwqkjFvooWBlQpVe2An2Dr3w13wjfxDW**\n\n
**NOTE**: Use only ONE authentication method at a time. If both are authorized, JWT auth takes the priority.
\n", + "description": "Enter the API key value with 'ApiKey' prefix in format: **ApiKey \u003Cyour_api_key_value\u003E**\n\nExample: **ApiKey tb_5te51SkLRYpjGrujUGwqkjFvooWBlQpVe2An2Dr3w13wjfxDW**\n\n\u003Cbr\u003E**NOTE**: Use only ONE authentication method at a time. If both are authorized, JWT auth takes the priority.\u003Cbr\u003E\n", "name": "X-Authorization", "in": "header" } } } -} +} \ No newline at end of file diff --git a/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java b/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java index 8d39484b..423eb56b 100644 --- a/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java +++ b/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java @@ -34538,6 +34538,157 @@ private HttpRequest.Builder getDefaultTenantProfileInfoRequestBuilder(Map headers) throws ApiException { + ApiResponse localVarResponse = getDeviceAttributesWithHttpInfo(deviceToken, clientKeys, sharedKeys, headers); + return localVarResponse.getData(); + } + + /** + * Get attributes (getDeviceAttributes) + * Returns all attributes that belong to device. Use optional 'clientKeys' and/or 'sharedKeys' parameter to return specific attributes. Example of the result: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param clientKeys Comma separated key names for attribute with client scope (required) + * @param sharedKeys Comma separated key names for attribute with shared scope (required) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getDeviceAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String clientKeys, @javax.annotation.Nonnull String sharedKeys) throws ApiException { + return getDeviceAttributesWithHttpInfo(deviceToken, clientKeys, sharedKeys, null); + } + + /** + * Get attributes (getDeviceAttributes) + * Returns all attributes that belong to device. Use optional 'clientKeys' and/or 'sharedKeys' parameter to return specific attributes. Example of the result: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param clientKeys Comma separated key names for attribute with client scope (required) + * @param sharedKeys Comma separated key names for attribute with shared scope (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getDeviceAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String clientKeys, @javax.annotation.Nonnull String sharedKeys, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDeviceAttributesRequestBuilder(deviceToken, clientKeys, sharedKeys, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getDeviceAttributes", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getDeviceAttributesRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String clientKeys, @javax.annotation.Nonnull String sharedKeys, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling getDeviceAttributes"); + } + // verify the required parameter 'clientKeys' is set + if (clientKeys == null) { + throw new ApiException(400, "Missing the required parameter 'clientKeys' when calling getDeviceAttributes"); + } + // verify the required parameter 'sharedKeys' is set + if (sharedKeys == null) { + throw new ApiException(400, "Missing the required parameter 'sharedKeys' when calling getDeviceAttributes"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/attributes" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "clientKeys"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("clientKeys", clientKeys)); + localVarQueryParameterBaseName = "sharedKeys"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sharedKeys", sharedKeys)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get Device (getDeviceById) * Fetch the Device object based on the provided Device Id. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -42895,6 +43046,169 @@ private HttpRequest.Builder getFeaturesInfoRequestBuilder(Map he return localVarRequestBuilder; } + /** + * Get Device Firmware (getFirmware) + * Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the firmware, corresponds to the value of 'fw_title' attribute. (required) + * @param version Version of the firmware, corresponds to the value of 'fw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @return String + * @throws ApiException if fails to make API call + */ + public String getFirmware(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk) throws ApiException { + return getFirmware(deviceToken, title, version, size, chunk, null); + } + + /** + * Get Device Firmware (getFirmware) + * Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the firmware, corresponds to the value of 'fw_title' attribute. (required) + * @param version Version of the firmware, corresponds to the value of 'fw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String getFirmware(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { + ApiResponse localVarResponse = getFirmwareWithHttpInfo(deviceToken, title, version, size, chunk, headers); + return localVarResponse.getData(); + } + + /** + * Get Device Firmware (getFirmware) + * Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the firmware, corresponds to the value of 'fw_title' attribute. (required) + * @param version Version of the firmware, corresponds to the value of 'fw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getFirmwareWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk) throws ApiException { + return getFirmwareWithHttpInfo(deviceToken, title, version, size, chunk, null); + } + + /** + * Get Device Firmware (getFirmware) + * Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the firmware, corresponds to the value of 'fw_title' attribute. (required) + * @param version Version of the firmware, corresponds to the value of 'fw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getFirmwareWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getFirmwareRequestBuilder(deviceToken, title, version, size, chunk, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getFirmware", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getFirmwareRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling getFirmware"); + } + // verify the required parameter 'title' is set + if (title == null) { + throw new ApiException(400, "Missing the required parameter 'title' when calling getFirmware"); + } + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException(400, "Missing the required parameter 'version' when calling getFirmware"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/firmware" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "title"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("title", title)); + localVarQueryParameterBaseName = "version"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("version", version)); + localVarQueryParameterBaseName = "size"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("size", size)); + localVarQueryParameterBaseName = "chunk"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("chunk", chunk)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * getFirmwareById * @@ -58568,6 +58882,169 @@ private HttpRequest.Builder getSignUpSelfRegistrationParamsRequestBuilder(@javax return localVarRequestBuilder; } + /** + * Get Device Software (getSoftware) + * Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the software, corresponds to the value of 'sw_title' attribute. (required) + * @param version Version of the software, corresponds to the value of 'sw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @return String + * @throws ApiException if fails to make API call + */ + public String getSoftware(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk) throws ApiException { + return getSoftware(deviceToken, title, version, size, chunk, null); + } + + /** + * Get Device Software (getSoftware) + * Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the software, corresponds to the value of 'sw_title' attribute. (required) + * @param version Version of the software, corresponds to the value of 'sw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String getSoftware(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { + ApiResponse localVarResponse = getSoftwareWithHttpInfo(deviceToken, title, version, size, chunk, headers); + return localVarResponse.getData(); + } + + /** + * Get Device Software (getSoftware) + * Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the software, corresponds to the value of 'sw_title' attribute. (required) + * @param version Version of the software, corresponds to the value of 'sw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getSoftwareWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk) throws ApiException { + return getSoftwareWithHttpInfo(deviceToken, title, version, size, chunk, null); + } + + /** + * Get Device Software (getSoftware) + * Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the software, corresponds to the value of 'sw_title' attribute. (required) + * @param version Version of the software, corresponds to the value of 'sw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getSoftwareWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getSoftwareRequestBuilder(deviceToken, title, version, size, chunk, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getSoftware", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getSoftwareRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling getSoftware"); + } + // verify the required parameter 'title' is set + if (title == null) { + throw new ApiException(400, "Missing the required parameter 'title' when calling getSoftware"); + } + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException(400, "Missing the required parameter 'version' when calling getSoftware"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/software" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "title"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("title", title)); + localVarQueryParameterBaseName = "version"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("version", version)); + localVarQueryParameterBaseName = "size"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("size", size)); + localVarQueryParameterBaseName = "chunk"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("chunk", chunk)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get Solution template details (getSolutionTemplateDetails) * Get a solution template details based on the provided id Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -74772,42 +75249,396 @@ public ApiResponse mobileLoginWithHttpInfo(@javax.annotation.Nonnull Str } } - private HttpRequest.Builder mobileLoginRequestBuilder(@javax.annotation.Nonnull String pkgName, @javax.annotation.Nonnull String platform, Map headers) throws ApiException { - // verify the required parameter 'pkgName' is set - if (pkgName == null) { - throw new ApiException(400, "Missing the required parameter 'pkgName' when calling mobileLogin"); + private HttpRequest.Builder mobileLoginRequestBuilder(@javax.annotation.Nonnull String pkgName, @javax.annotation.Nonnull String platform, Map headers) throws ApiException { + // verify the required parameter 'pkgName' is set + if (pkgName == null) { + throw new ApiException(400, "Missing the required parameter 'pkgName' when calling mobileLogin"); + } + // verify the required parameter 'platform' is set + if (platform == null) { + throw new ApiException(400, "Missing the required parameter 'platform' when calling mobileLogin"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/noauth/login"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "pkgName"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pkgName", pkgName)); + localVarQueryParameterBaseName = "platform"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("platform", platform)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Update Custom Translation for specified translation keys only (patchCustomTranslation) + * The API call is designed to update the custom translation for specified key only. Request example: ```json {\"notification.active\":\"active\"} ``` Security check is performed to verify that the user has 'WRITE' permission for the white labeling resource. + * @param localeCode Locale code (e.g. 'en_US'). (required) + * @param body (required) + * @throws ApiException if fails to make API call + */ + public void patchCustomTranslation(@javax.annotation.Nonnull String localeCode, @javax.annotation.Nullable Object body) throws ApiException { + patchCustomTranslation(localeCode, body, null); + } + + /** + * Update Custom Translation for specified translation keys only (patchCustomTranslation) + * The API call is designed to update the custom translation for specified key only. Request example: ```json {\"notification.active\":\"active\"} ``` Security check is performed to verify that the user has 'WRITE' permission for the white labeling resource. + * @param localeCode Locale code (e.g. 'en_US'). (required) + * @param body (required) + * @param headers Optional headers to include in the request + * @throws ApiException if fails to make API call + */ + public void patchCustomTranslation(@javax.annotation.Nonnull String localeCode, @javax.annotation.Nullable Object body, Map headers) throws ApiException { + patchCustomTranslationWithHttpInfo(localeCode, body, headers); + } + + /** + * Update Custom Translation for specified translation keys only (patchCustomTranslation) + * The API call is designed to update the custom translation for specified key only. Request example: ```json {\"notification.active\":\"active\"} ``` Security check is performed to verify that the user has 'WRITE' permission for the white labeling resource. + * @param localeCode Locale code (e.g. 'en_US'). (required) + * @param body (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse patchCustomTranslationWithHttpInfo(@javax.annotation.Nonnull String localeCode, @javax.annotation.Nullable Object body) throws ApiException { + return patchCustomTranslationWithHttpInfo(localeCode, body, null); + } + + /** + * Update Custom Translation for specified translation keys only (patchCustomTranslation) + * The API call is designed to update the custom translation for specified key only. Request example: ```json {\"notification.active\":\"active\"} ``` Security check is performed to verify that the user has 'WRITE' permission for the white labeling resource. + * @param localeCode Locale code (e.g. 'en_US'). (required) + * @param body (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse patchCustomTranslationWithHttpInfo(@javax.annotation.Nonnull String localeCode, @javax.annotation.Nullable Object body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = patchCustomTranslationRequestBuilder(localeCode, body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("patchCustomTranslation", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody != null) { + localVarResponseBody.readAllBytes(); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder patchCustomTranslationRequestBuilder(@javax.annotation.Nonnull String localeCode, @javax.annotation.Nullable Object body, Map headers) throws ApiException { + // verify the required parameter 'localeCode' is set + if (localeCode == null) { + throw new ApiException(400, "Missing the required parameter 'localeCode' when calling patchCustomTranslation"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling patchCustomTranslation"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/translation/custom/{localeCode}" + .replace("{localeCode}", ApiClient.urlEncode(localeCode.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Perform Trendz healthcheck (performTrendzHealthcheck) + * Performs healthcheck for Trendz integration. Returns version, type, status, and message. Can only be performed if Trendz is already synchronized and integration is enabled. Available for any authorized user. + * @return TrendzHealthcheckResult + * @throws ApiException if fails to make API call + */ + public TrendzHealthcheckResult performTrendzHealthcheck() throws ApiException { + return performTrendzHealthcheck(null); + } + + /** + * Perform Trendz healthcheck (performTrendzHealthcheck) + * Performs healthcheck for Trendz integration. Returns version, type, status, and message. Can only be performed if Trendz is already synchronized and integration is enabled. Available for any authorized user. + * @param headers Optional headers to include in the request + * @return TrendzHealthcheckResult + * @throws ApiException if fails to make API call + */ + public TrendzHealthcheckResult performTrendzHealthcheck(Map headers) throws ApiException { + ApiResponse localVarResponse = performTrendzHealthcheckWithHttpInfo(headers); + return localVarResponse.getData(); + } + + /** + * Perform Trendz healthcheck (performTrendzHealthcheck) + * Performs healthcheck for Trendz integration. Returns version, type, status, and message. Can only be performed if Trendz is already synchronized and integration is enabled. Available for any authorized user. + * @return ApiResponse<TrendzHealthcheckResult> + * @throws ApiException if fails to make API call + */ + public ApiResponse performTrendzHealthcheckWithHttpInfo() throws ApiException { + return performTrendzHealthcheckWithHttpInfo(null); + } + + /** + * Perform Trendz healthcheck (performTrendzHealthcheck) + * Performs healthcheck for Trendz integration. Returns version, type, status, and message. Can only be performed if Trendz is already synchronized and integration is enabled. Available for any authorized user. + * @param headers Optional headers to include in the request + * @return ApiResponse<TrendzHealthcheckResult> + * @throws ApiException if fails to make API call + */ + public ApiResponse performTrendzHealthcheckWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = performTrendzHealthcheckRequestBuilder(headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("performTrendzHealthcheck", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + TrendzHealthcheckResult responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder performTrendzHealthcheckRequestBuilder(Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/trendz/healthcheck"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Post attributes (postDeviceAttributes) + * Post client attribute updates on behalf of device. Example of the request: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body JSON with attribute key-value pairs. See API call description for example. (required) + * @return String + * @throws ApiException if fails to make API call + */ + public String postDeviceAttributes(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { + return postDeviceAttributes(deviceToken, body, null); + } + + /** + * Post attributes (postDeviceAttributes) + * Post client attribute updates on behalf of device. Example of the request: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body JSON with attribute key-value pairs. See API call description for example. (required) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String postDeviceAttributes(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = postDeviceAttributesWithHttpInfo(deviceToken, body, headers); + return localVarResponse.getData(); + } + + /** + * Post attributes (postDeviceAttributes) + * Post client attribute updates on behalf of device. Example of the request: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body JSON with attribute key-value pairs. See API call description for example. (required) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse postDeviceAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { + return postDeviceAttributesWithHttpInfo(deviceToken, body, null); + } + + /** + * Post attributes (postDeviceAttributes) + * Post client attribute updates on behalf of device. Example of the request: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body JSON with attribute key-value pairs. See API call description for example. (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse postDeviceAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = postDeviceAttributesRequestBuilder(deviceToken, body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("postDeviceAttributes", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder postDeviceAttributesRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling postDeviceAttributes"); } - // verify the required parameter 'platform' is set - if (platform == null) { - throw new ApiException(400, "Missing the required parameter 'platform' when calling mobileLogin"); + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling postDeviceAttributes"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/noauth/login"; + String localVarPath = "/api/v1/{deviceToken}/attributes" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "pkgName"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("pkgName", pkgName)); - localVarQueryParameterBaseName = "platform"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("platform", platform)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -74820,51 +75651,54 @@ private HttpRequest.Builder mobileLoginRequestBuilder(@javax.annotation.Nonnull } /** - * Update Custom Translation for specified translation keys only (patchCustomTranslation) - * The API call is designed to update the custom translation for specified key only. Request example: ```json {\"notification.active\":\"active\"} ``` Security check is performed to verify that the user has 'WRITE' permission for the white labeling resource. - * @param localeCode Locale code (e.g. 'en_US'). (required) - * @param body (required) + * Send the RPC command (postRpcRequest) + * Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body The RPC request JSON (required) + * @return String * @throws ApiException if fails to make API call */ - public void patchCustomTranslation(@javax.annotation.Nonnull String localeCode, @javax.annotation.Nullable Object body) throws ApiException { - patchCustomTranslation(localeCode, body, null); + public String postRpcRequest(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { + return postRpcRequest(deviceToken, body, null); } /** - * Update Custom Translation for specified translation keys only (patchCustomTranslation) - * The API call is designed to update the custom translation for specified key only. Request example: ```json {\"notification.active\":\"active\"} ``` Security check is performed to verify that the user has 'WRITE' permission for the white labeling resource. - * @param localeCode Locale code (e.g. 'en_US'). (required) - * @param body (required) + * Send the RPC command (postRpcRequest) + * Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body The RPC request JSON (required) * @param headers Optional headers to include in the request + * @return String * @throws ApiException if fails to make API call */ - public void patchCustomTranslation(@javax.annotation.Nonnull String localeCode, @javax.annotation.Nullable Object body, Map headers) throws ApiException { - patchCustomTranslationWithHttpInfo(localeCode, body, headers); + public String postRpcRequest(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = postRpcRequestWithHttpInfo(deviceToken, body, headers); + return localVarResponse.getData(); } /** - * Update Custom Translation for specified translation keys only (patchCustomTranslation) - * The API call is designed to update the custom translation for specified key only. Request example: ```json {\"notification.active\":\"active\"} ``` Security check is performed to verify that the user has 'WRITE' permission for the white labeling resource. - * @param localeCode Locale code (e.g. 'en_US'). (required) - * @param body (required) - * @return ApiResponse<Void> + * Send the RPC command (postRpcRequest) + * Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body The RPC request JSON (required) + * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse patchCustomTranslationWithHttpInfo(@javax.annotation.Nonnull String localeCode, @javax.annotation.Nullable Object body) throws ApiException { - return patchCustomTranslationWithHttpInfo(localeCode, body, null); + public ApiResponse postRpcRequestWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { + return postRpcRequestWithHttpInfo(deviceToken, body, null); } /** - * Update Custom Translation for specified translation keys only (patchCustomTranslation) - * The API call is designed to update the custom translation for specified key only. Request example: ```json {\"notification.active\":\"active\"} ``` Security check is performed to verify that the user has 'WRITE' permission for the white labeling resource. - * @param localeCode Locale code (e.g. 'en_US'). (required) - * @param body (required) + * Send the RPC command (postRpcRequest) + * Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body The RPC request JSON (required) * @param headers Optional headers to include in the request - * @return ApiResponse<Void> + * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse patchCustomTranslationWithHttpInfo(@javax.annotation.Nonnull String localeCode, @javax.annotation.Nullable Object body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = patchCustomTranslationRequestBuilder(localeCode, body, headers); + public ApiResponse postRpcRequestWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = postRpcRequestRequestBuilder(deviceToken, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -74875,16 +75709,27 @@ public ApiResponse patchCustomTranslationWithHttpInfo(@javax.annotation.No InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("patchCustomTranslation", localVarResponse); + throw getApiException("postRpcRequest", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); } - return new ApiResponse<>( + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null + responseValue ); } finally { if (localVarResponseBody != null) { @@ -74900,32 +75745,27 @@ public ApiResponse patchCustomTranslationWithHttpInfo(@javax.annotation.No } } - private HttpRequest.Builder patchCustomTranslationRequestBuilder(@javax.annotation.Nonnull String localeCode, @javax.annotation.Nullable Object body, Map headers) throws ApiException { - // verify the required parameter 'localeCode' is set - if (localeCode == null) { - throw new ApiException(400, "Missing the required parameter 'localeCode' when calling patchCustomTranslation"); + private HttpRequest.Builder postRpcRequestRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling postRpcRequest"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling patchCustomTranslation"); + throw new ApiException(400, "Missing the required parameter 'body' when calling postRpcRequest"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/translation/custom/{localeCode}" - .replace("{localeCode}", ApiClient.urlEncode(localeCode.toString())); + String localVarPath = "/api/v1/{deviceToken}/rpc" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); - localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -74938,46 +75778,54 @@ private HttpRequest.Builder patchCustomTranslationRequestBuilder(@javax.annotati } /** - * Perform Trendz healthcheck (performTrendzHealthcheck) - * Performs healthcheck for Trendz integration. Returns version, type, status, and message. Can only be performed if Trendz is already synchronized and integration is enabled. Available for any authorized user. - * @return TrendzHealthcheckResult + * Post time series data (postTelemetry) + * Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (required) + * @return String * @throws ApiException if fails to make API call */ - public TrendzHealthcheckResult performTrendzHealthcheck() throws ApiException { - return performTrendzHealthcheck(null); + public String postTelemetry(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { + return postTelemetry(deviceToken, body, null); } /** - * Perform Trendz healthcheck (performTrendzHealthcheck) - * Performs healthcheck for Trendz integration. Returns version, type, status, and message. Can only be performed if Trendz is already synchronized and integration is enabled. Available for any authorized user. + * Post time series data (postTelemetry) + * Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (required) * @param headers Optional headers to include in the request - * @return TrendzHealthcheckResult + * @return String * @throws ApiException if fails to make API call */ - public TrendzHealthcheckResult performTrendzHealthcheck(Map headers) throws ApiException { - ApiResponse localVarResponse = performTrendzHealthcheckWithHttpInfo(headers); + public String postTelemetry(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = postTelemetryWithHttpInfo(deviceToken, body, headers); return localVarResponse.getData(); } /** - * Perform Trendz healthcheck (performTrendzHealthcheck) - * Performs healthcheck for Trendz integration. Returns version, type, status, and message. Can only be performed if Trendz is already synchronized and integration is enabled. Available for any authorized user. - * @return ApiResponse<TrendzHealthcheckResult> + * Post time series data (postTelemetry) + * Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (required) + * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse performTrendzHealthcheckWithHttpInfo() throws ApiException { - return performTrendzHealthcheckWithHttpInfo(null); + public ApiResponse postTelemetryWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { + return postTelemetryWithHttpInfo(deviceToken, body, null); } /** - * Perform Trendz healthcheck (performTrendzHealthcheck) - * Performs healthcheck for Trendz integration. Returns version, type, status, and message. Can only be performed if Trendz is already synchronized and integration is enabled. Available for any authorized user. + * Post time series data (postTelemetry) + * Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (required) * @param headers Optional headers to include in the request - * @return ApiResponse<TrendzHealthcheckResult> + * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse performTrendzHealthcheckWithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = performTrendzHealthcheckRequestBuilder(headers); + public ApiResponse postTelemetryWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = postTelemetryRequestBuilder(deviceToken, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -74988,11 +75836,11 @@ public ApiResponse performTrendzHealthcheckWithHttpInfo InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("performTrendzHealthcheck", localVarResponse); + throw getApiException("postTelemetry", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -75002,10 +75850,10 @@ public ApiResponse performTrendzHealthcheckWithHttpInfo String responseBody = new String(localVarResponseBody.readAllBytes()); - TrendzHealthcheckResult responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -75024,17 +75872,27 @@ public ApiResponse performTrendzHealthcheckWithHttpInfo } } - private HttpRequest.Builder performTrendzHealthcheckRequestBuilder(Map headers) throws ApiException { + private HttpRequest.Builder postTelemetryRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling postTelemetry"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling postTelemetry"); + } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/trendz/healthcheck"; + String localVarPath = "/api/v1/{deviceToken}/telemetry" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -75402,50 +76260,173 @@ private HttpRequest.Builder processAssetBulkImportRequestBuilder(@javax.annotati } /** - * Import the bulk of devices (processDevicesBulkImport) - * There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Import the bulk of devices (processDevicesBulkImport) + * There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * @param bulkImportRequest (required) + * @return BulkImportResultDevice + * @throws ApiException if fails to make API call + */ + public BulkImportResultDevice processDevicesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { + return processDevicesBulkImport(bulkImportRequest, null); + } + + /** + * Import the bulk of devices (processDevicesBulkImport) + * There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * @param bulkImportRequest (required) + * @param headers Optional headers to include in the request + * @return BulkImportResultDevice + * @throws ApiException if fails to make API call + */ + public BulkImportResultDevice processDevicesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + ApiResponse localVarResponse = processDevicesBulkImportWithHttpInfo(bulkImportRequest, headers); + return localVarResponse.getData(); + } + + /** + * Import the bulk of devices (processDevicesBulkImport) + * There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * @param bulkImportRequest (required) + * @return ApiResponse<BulkImportResultDevice> + * @throws ApiException if fails to make API call + */ + public ApiResponse processDevicesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { + return processDevicesBulkImportWithHttpInfo(bulkImportRequest, null); + } + + /** + * Import the bulk of devices (processDevicesBulkImport) + * There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * @param bulkImportRequest (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<BulkImportResultDevice> + * @throws ApiException if fails to make API call + */ + public ApiResponse processDevicesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = processDevicesBulkImportRequestBuilder(bulkImportRequest, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("processDevicesBulkImport", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + BulkImportResultDevice responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder processDevicesBulkImportRequestBuilder(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + // verify the required parameter 'bulkImportRequest' is set + if (bulkImportRequest == null) { + throw new ApiException(400, "Missing the required parameter 'bulkImportRequest' when calling processDevicesBulkImport"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/device/bulk_import"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(bulkImportRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Import the bulk of edges (processEdgesBulkImport) + * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param bulkImportRequest (required) - * @return BulkImportResultDevice + * @return BulkImportResultEdge * @throws ApiException if fails to make API call */ - public BulkImportResultDevice processDevicesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { - return processDevicesBulkImport(bulkImportRequest, null); + public BulkImportResultEdge processEdgesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { + return processEdgesBulkImport(bulkImportRequest, null); } /** - * Import the bulk of devices (processDevicesBulkImport) - * There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Import the bulk of edges (processEdgesBulkImport) + * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param bulkImportRequest (required) * @param headers Optional headers to include in the request - * @return BulkImportResultDevice + * @return BulkImportResultEdge * @throws ApiException if fails to make API call */ - public BulkImportResultDevice processDevicesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { - ApiResponse localVarResponse = processDevicesBulkImportWithHttpInfo(bulkImportRequest, headers); + public BulkImportResultEdge processEdgesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + ApiResponse localVarResponse = processEdgesBulkImportWithHttpInfo(bulkImportRequest, headers); return localVarResponse.getData(); } /** - * Import the bulk of devices (processDevicesBulkImport) - * There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Import the bulk of edges (processEdgesBulkImport) + * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param bulkImportRequest (required) - * @return ApiResponse<BulkImportResultDevice> + * @return ApiResponse<BulkImportResultEdge> * @throws ApiException if fails to make API call */ - public ApiResponse processDevicesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { - return processDevicesBulkImportWithHttpInfo(bulkImportRequest, null); + public ApiResponse processEdgesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { + return processEdgesBulkImportWithHttpInfo(bulkImportRequest, null); } /** - * Import the bulk of devices (processDevicesBulkImport) - * There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Import the bulk of edges (processEdgesBulkImport) + * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param bulkImportRequest (required) * @param headers Optional headers to include in the request - * @return ApiResponse<BulkImportResultDevice> + * @return ApiResponse<BulkImportResultEdge> * @throws ApiException if fails to make API call */ - public ApiResponse processDevicesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = processDevicesBulkImportRequestBuilder(bulkImportRequest, headers); + public ApiResponse processEdgesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = processEdgesBulkImportRequestBuilder(bulkImportRequest, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -75456,11 +76437,11 @@ public ApiResponse processDevicesBulkImportWithHttpInfo( InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("processDevicesBulkImport", localVarResponse); + throw getApiException("processEdgesBulkImport", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -75470,10 +76451,10 @@ public ApiResponse processDevicesBulkImportWithHttpInfo( String responseBody = new String(localVarResponseBody.readAllBytes()); - BulkImportResultDevice responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + BulkImportResultEdge responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -75492,15 +76473,15 @@ public ApiResponse processDevicesBulkImportWithHttpInfo( } } - private HttpRequest.Builder processDevicesBulkImportRequestBuilder(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + private HttpRequest.Builder processEdgesBulkImportRequestBuilder(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { // verify the required parameter 'bulkImportRequest' is set if (bulkImportRequest == null) { - throw new ApiException(400, "Missing the required parameter 'bulkImportRequest' when calling processDevicesBulkImport"); + throw new ApiException(400, "Missing the required parameter 'bulkImportRequest' when calling processEdgesBulkImport"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/device/bulk_import"; + String localVarPath = "/api/edge/bulk_import"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -75525,50 +76506,47 @@ private HttpRequest.Builder processDevicesBulkImportRequestBuilder(@javax.annota } /** - * Import the bulk of edges (processEdgesBulkImport) - * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param bulkImportRequest (required) - * @return BulkImportResultEdge + * processSystemEdqsRequest + * + * @param toCoreEdqsRequest (required) * @throws ApiException if fails to make API call */ - public BulkImportResultEdge processEdgesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { - return processEdgesBulkImport(bulkImportRequest, null); + public void processSystemEdqsRequest(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest) throws ApiException { + processSystemEdqsRequest(toCoreEdqsRequest, null); } /** - * Import the bulk of edges (processEdgesBulkImport) - * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param bulkImportRequest (required) + * processSystemEdqsRequest + * + * @param toCoreEdqsRequest (required) * @param headers Optional headers to include in the request - * @return BulkImportResultEdge * @throws ApiException if fails to make API call */ - public BulkImportResultEdge processEdgesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { - ApiResponse localVarResponse = processEdgesBulkImportWithHttpInfo(bulkImportRequest, headers); - return localVarResponse.getData(); + public void processSystemEdqsRequest(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest, Map headers) throws ApiException { + processSystemEdqsRequestWithHttpInfo(toCoreEdqsRequest, headers); } /** - * Import the bulk of edges (processEdgesBulkImport) - * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param bulkImportRequest (required) - * @return ApiResponse<BulkImportResultEdge> + * processSystemEdqsRequest + * + * @param toCoreEdqsRequest (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse processEdgesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { - return processEdgesBulkImportWithHttpInfo(bulkImportRequest, null); + public ApiResponse processSystemEdqsRequestWithHttpInfo(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest) throws ApiException { + return processSystemEdqsRequestWithHttpInfo(toCoreEdqsRequest, null); } /** - * Import the bulk of edges (processEdgesBulkImport) - * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param bulkImportRequest (required) + * processSystemEdqsRequest + * + * @param toCoreEdqsRequest (required) * @param headers Optional headers to include in the request - * @return ApiResponse<BulkImportResultEdge> + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse processEdgesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = processEdgesBulkImportRequestBuilder(bulkImportRequest, headers); + public ApiResponse processSystemEdqsRequestWithHttpInfo(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = processSystemEdqsRequestRequestBuilder(toCoreEdqsRequest, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -75579,27 +76557,16 @@ public ApiResponse processEdgesBulkImportWithHttpInfo(@jav InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("processEdgesBulkImport", localVarResponse); + throw getApiException("processSystemEdqsRequest", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); + if (localVarResponseBody != null) { + localVarResponseBody.readAllBytes(); } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - BulkImportResultEdge responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( + return new ApiResponse<>( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseValue + null ); } finally { if (localVarResponseBody != null) { @@ -75615,15 +76582,15 @@ public ApiResponse processEdgesBulkImportWithHttpInfo(@jav } } - private HttpRequest.Builder processEdgesBulkImportRequestBuilder(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { - // verify the required parameter 'bulkImportRequest' is set - if (bulkImportRequest == null) { - throw new ApiException(400, "Missing the required parameter 'bulkImportRequest' when calling processEdgesBulkImport"); + private HttpRequest.Builder processSystemEdqsRequestRequestBuilder(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest, Map headers) throws ApiException { + // verify the required parameter 'toCoreEdqsRequest' is set + if (toCoreEdqsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'toCoreEdqsRequest' when calling processSystemEdqsRequest"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/edge/bulk_import"; + String localVarPath = "/api/edqs/system/request"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -75631,7 +76598,7 @@ private HttpRequest.Builder processEdgesBulkImportRequestBuilder(@javax.annotati localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(bulkImportRequest); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(toCoreEdqsRequest); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -75648,47 +76615,50 @@ private HttpRequest.Builder processEdgesBulkImportRequestBuilder(@javax.annotati } /** - * processSystemEdqsRequest - * - * @param toCoreEdqsRequest (required) + * Provision new device (provisionDevice) + * Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` + * @param body JSON with provision request. See API call description for example. (required) + * @return String * @throws ApiException if fails to make API call */ - public void processSystemEdqsRequest(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest) throws ApiException { - processSystemEdqsRequest(toCoreEdqsRequest, null); + public String provisionDevice(@javax.annotation.Nonnull String body) throws ApiException { + return provisionDevice(body, null); } /** - * processSystemEdqsRequest - * - * @param toCoreEdqsRequest (required) + * Provision new device (provisionDevice) + * Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` + * @param body JSON with provision request. See API call description for example. (required) * @param headers Optional headers to include in the request + * @return String * @throws ApiException if fails to make API call */ - public void processSystemEdqsRequest(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest, Map headers) throws ApiException { - processSystemEdqsRequestWithHttpInfo(toCoreEdqsRequest, headers); + public String provisionDevice(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = provisionDeviceWithHttpInfo(body, headers); + return localVarResponse.getData(); } /** - * processSystemEdqsRequest - * - * @param toCoreEdqsRequest (required) - * @return ApiResponse<Void> + * Provision new device (provisionDevice) + * Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` + * @param body JSON with provision request. See API call description for example. (required) + * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse processSystemEdqsRequestWithHttpInfo(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest) throws ApiException { - return processSystemEdqsRequestWithHttpInfo(toCoreEdqsRequest, null); + public ApiResponse provisionDeviceWithHttpInfo(@javax.annotation.Nonnull String body) throws ApiException { + return provisionDeviceWithHttpInfo(body, null); } /** - * processSystemEdqsRequest - * - * @param toCoreEdqsRequest (required) + * Provision new device (provisionDevice) + * Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` + * @param body JSON with provision request. See API call description for example. (required) * @param headers Optional headers to include in the request - * @return ApiResponse<Void> + * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse processSystemEdqsRequestWithHttpInfo(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = processSystemEdqsRequestRequestBuilder(toCoreEdqsRequest, headers); + public ApiResponse provisionDeviceWithHttpInfo(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = provisionDeviceRequestBuilder(body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -75699,16 +76669,27 @@ public ApiResponse processSystemEdqsRequestWithHttpInfo(@javax.annotation. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("processSystemEdqsRequest", localVarResponse); + throw getApiException("provisionDevice", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); } - return new ApiResponse<>( + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null + responseValue ); } finally { if (localVarResponseBody != null) { @@ -75724,27 +76705,22 @@ public ApiResponse processSystemEdqsRequestWithHttpInfo(@javax.annotation. } } - private HttpRequest.Builder processSystemEdqsRequestRequestBuilder(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest, Map headers) throws ApiException { - // verify the required parameter 'toCoreEdqsRequest' is set - if (toCoreEdqsRequest == null) { - throw new ApiException(400, "Missing the required parameter 'toCoreEdqsRequest' when calling processSystemEdqsRequest"); + private HttpRequest.Builder provisionDeviceRequestBuilder(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling provisionDevice"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/edqs/system/request"; + String localVarPath = "/api/v1/provision"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(toCoreEdqsRequest); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -76539,6 +77515,142 @@ private HttpRequest.Builder removeMobileSessionRequestBuilder(@javax.annotation. return localVarRequestBuilder; } + /** + * Reply to RPC commands (replyToCommand) + * Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param requestId RPC request id from the incoming RPC request (required) + * @param body Reply to the RPC request, JSON. For example: {\"status\":\"success\"} (required) + * @return String + * @throws ApiException if fails to make API call + */ + public String replyToCommand(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body) throws ApiException { + return replyToCommand(deviceToken, requestId, body, null); + } + + /** + * Reply to RPC commands (replyToCommand) + * Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param requestId RPC request id from the incoming RPC request (required) + * @param body Reply to the RPC request, JSON. For example: {\"status\":\"success\"} (required) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String replyToCommand(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = replyToCommandWithHttpInfo(deviceToken, requestId, body, headers); + return localVarResponse.getData(); + } + + /** + * Reply to RPC commands (replyToCommand) + * Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param requestId RPC request id from the incoming RPC request (required) + * @param body Reply to the RPC request, JSON. For example: {\"status\":\"success\"} (required) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse replyToCommandWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body) throws ApiException { + return replyToCommandWithHttpInfo(deviceToken, requestId, body, null); + } + + /** + * Reply to RPC commands (replyToCommand) + * Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param requestId RPC request id from the incoming RPC request (required) + * @param body Reply to the RPC request, JSON. For example: {\"status\":\"success\"} (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse replyToCommandWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = replyToCommandRequestBuilder(deviceToken, requestId, body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("replyToCommand", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder replyToCommandRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling replyToCommand"); + } + // verify the required parameter 'requestId' is set + if (requestId == null) { + throw new ApiException(400, "Missing the required parameter 'requestId' when calling replyToCommand"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling replyToCommand"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/rpc/{requestId}" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())) + .replace("{requestId}", ApiClient.urlEncode(requestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Report action of User over the dashboard (reportUserDashboardAction) * Report action of User over the dashboard. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -78915,6 +80027,129 @@ private HttpRequest.Builder saveCalculatedFieldRequestBuilder(@javax.annotation. return localVarRequestBuilder; } + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @return String + * @throws ApiException if fails to make API call + */ + public String saveClaimingInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { + return saveClaimingInfo(deviceToken, body, null); + } + + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String saveClaimingInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { + ApiResponse localVarResponse = saveClaimingInfoWithHttpInfo(deviceToken, body, headers); + return localVarResponse.getData(); + } + + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveClaimingInfoWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { + return saveClaimingInfoWithHttpInfo(deviceToken, body, null); + } + + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveClaimingInfoWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = saveClaimingInfoRequestBuilder(deviceToken, body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("saveClaimingInfo", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder saveClaimingInfoRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling saveClaimingInfo"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/claim" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Create or update OAuth2 client registration template (saveClientRegistrationTemplate) Available for users with 'SYS_ADMIN' authority. * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients @@ -89085,6 +90320,280 @@ private HttpRequest.Builder submitTwoFaAccountConfigRequestBuilder(@javax.annota return localVarRequestBuilder; } + /** + * Subscribe to attribute updates (subscribeToAttributes) (Deprecated) + * Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @return String + * @throws ApiException if fails to make API call + */ + public String subscribeToAttributes(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout) throws ApiException { + return subscribeToAttributes(deviceToken, timeout, null); + } + + /** + * Subscribe to attribute updates (subscribeToAttributes) (Deprecated) + * Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String subscribeToAttributes(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { + ApiResponse localVarResponse = subscribeToAttributesWithHttpInfo(deviceToken, timeout, headers); + return localVarResponse.getData(); + } + + /** + * Subscribe to attribute updates (subscribeToAttributes) (Deprecated) + * Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse subscribeToAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout) throws ApiException { + return subscribeToAttributesWithHttpInfo(deviceToken, timeout, null); + } + + /** + * Subscribe to attribute updates (subscribeToAttributes) (Deprecated) + * Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse subscribeToAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = subscribeToAttributesRequestBuilder(deviceToken, timeout, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("subscribeToAttributes", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder subscribeToAttributesRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling subscribeToAttributes"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/attributes/updates" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "timeout"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("timeout", timeout)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Subscribe to RPC commands (subscribeToCommands) (Deprecated) + * Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @return String + * @throws ApiException if fails to make API call + */ + public String subscribeToCommands(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout) throws ApiException { + return subscribeToCommands(deviceToken, timeout, null); + } + + /** + * Subscribe to RPC commands (subscribeToCommands) (Deprecated) + * Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String subscribeToCommands(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { + ApiResponse localVarResponse = subscribeToCommandsWithHttpInfo(deviceToken, timeout, headers); + return localVarResponse.getData(); + } + + /** + * Subscribe to RPC commands (subscribeToCommands) (Deprecated) + * Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse subscribeToCommandsWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout) throws ApiException { + return subscribeToCommandsWithHttpInfo(deviceToken, timeout, null); + } + + /** + * Subscribe to RPC commands (subscribeToCommands) (Deprecated) + * Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse subscribeToCommandsWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = subscribeToCommandsRequestBuilder(deviceToken, timeout, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("subscribeToCommands", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder subscribeToCommandsRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling subscribeToCommands"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/rpc" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "timeout"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("timeout", timeout)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Sync edge (syncEdge) * Starts synchronization process between edge and cloud. All entities that are assigned to particular edge are going to be send to remote edge service. Available for users with 'TENANT_ADMIN' authority. diff --git a/pe/src/main/java/org/thingsboard/client/model/AdminSettingsId.java b/pe/src/main/java/org/thingsboard/client/model/AdminSettingsId.java index de11a59a..7ad6f9fd 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AdminSettingsId.java +++ b/pe/src/main/java/org/thingsboard/client/model/AdminSettingsId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * AdminSettingsId */ @JsonPropertyOrder({ - AdminSettingsId.JSON_PROPERTY_ID, - AdminSettingsId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AdminSettingsId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class AdminSettingsId extends EntityId { public AdminSettingsId() { } + @Override public AdminSettingsId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public AdminSettingsId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this AdminSettingsId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AdminSettingsId adminSettingsId = (AdminSettingsId) o; - return Objects.equals(this.id, adminSettingsId.id) && - Objects.equals(this.entityType, adminSettingsId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdminSettingsId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AdminSettingsId", AdminSettingsId.class); + JSON.registerDiscriminator(AdminSettingsId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/AiModelId.java b/pe/src/main/java/org/thingsboard/client/model/AiModelId.java index d5f505ed..4ec02d0c 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AiModelId.java +++ b/pe/src/main/java/org/thingsboard/client/model/AiModelId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * AiModelId */ @JsonPropertyOrder({ - AiModelId.JSON_PROPERTY_ID, - AiModelId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AiModelId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class AiModelId extends EntityId { public AiModelId() { } + @Override public AiModelId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public AiModelId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * Entity type of the AI model - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this AiModelId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AiModelId aiModelId = (AiModelId) o; - return Objects.equals(this.id, aiModelId.id) && - Objects.equals(this.entityType, aiModelId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AiModelId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AiModelId", AiModelId.class); + JSON.registerDiscriminator(AiModelId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java index 62a6084e..0729c623 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public AlarmAssignmentRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public AlarmAssignmentRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java index 910e38e3..703d5744 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public AlarmCommentRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public AlarmCommentRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/AlarmId.java b/pe/src/main/java/org/thingsboard/client/model/AlarmId.java index 1d7d87ef..d24b8337 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AlarmId.java +++ b/pe/src/main/java/org/thingsboard/client/model/AlarmId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * AlarmId */ @JsonPropertyOrder({ - AlarmId.JSON_PROPERTY_ID, - AlarmId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AlarmId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class AlarmId extends EntityId { public AlarmId() { } + @Override public AlarmId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public AlarmId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this AlarmId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AlarmId alarmId = (AlarmId) o; - return Objects.equals(this.id, alarmId.id) && - Objects.equals(this.entityType, alarmId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AlarmId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AlarmId", AlarmId.class); + JSON.registerDiscriminator(AlarmId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/ApiKeyId.java b/pe/src/main/java/org/thingsboard/client/model/ApiKeyId.java index cfc0cd67..aa45306b 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ApiKeyId.java +++ b/pe/src/main/java/org/thingsboard/client/model/ApiKeyId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * ApiKeyId */ @JsonPropertyOrder({ - ApiKeyId.JSON_PROPERTY_ID, - ApiKeyId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class ApiKeyId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class ApiKeyId extends EntityId { public ApiKeyId() { } + @Override public ApiKeyId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public ApiKeyId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this ApiKeyId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ApiKeyId apiKeyId = (ApiKeyId) o; - return Objects.equals(this.id, apiKeyId.id) && - Objects.equals(this.entityType, apiKeyId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ApiKeyId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ApiKeyId", ApiKeyId.class); + JSON.registerDiscriminator(ApiKeyId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java index 09389b53..a9a563d3 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public ApiUsageLimitRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public ApiUsageLimitRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java b/pe/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java new file mode 100644 index 00000000..1e2ff9c3 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java @@ -0,0 +1,159 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.thingsboard.client.model.EntityId; +import org.thingsboard.client.model.EntityType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * ApiUsageStateId + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class ApiUsageStateId extends EntityId { + public ApiUsageStateId() { + } + + @Override + public ApiUsageStateId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); + return this; + } + + @Override + public ApiUsageStateId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + /** + * Return true if this ApiUsageStateId object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiUsageStateId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ApiUsageStateId", ApiUsageStateId.class); + JSON.registerDiscriminator(ApiUsageStateId.class, "entityType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/Asset.java b/pe/src/main/java/org/thingsboard/client/model/Asset.java index 652c43ad..760a904a 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Asset.java +++ b/pe/src/main/java/org/thingsboard/client/model/Asset.java @@ -105,14 +105,12 @@ public Asset() { public Asset( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; - this.ownerId = ownerId; } public Asset id(@javax.annotation.Nullable AssetId id) { @@ -301,6 +299,11 @@ public void setVersion(@javax.annotation.Nullable Long version) { } + public Asset ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -313,6 +316,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public Asset additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/AssetId.java b/pe/src/main/java/org/thingsboard/client/model/AssetId.java index 35afaee3..e8d5db42 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AssetId.java +++ b/pe/src/main/java/org/thingsboard/client/model/AssetId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * AssetId */ @JsonPropertyOrder({ - AssetId.JSON_PROPERTY_ID, - AssetId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AssetId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class AssetId extends EntityId { public AssetId() { } + @Override public AssetId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public AssetId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this AssetId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AssetId assetId = (AssetId) o; - return Objects.equals(this.id, assetId.id) && - Objects.equals(this.entityType, assetId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AssetId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AssetId", AssetId.class); + JSON.registerDiscriminator(AssetId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/AssetInfo.java b/pe/src/main/java/org/thingsboard/client/model/AssetInfo.java index f8b8a531..12e4bf59 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AssetInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/AssetInfo.java @@ -119,15 +119,13 @@ public AssetInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; this.ownerName = ownerName; - this.ownerId = ownerId; } public AssetInfo id(@javax.annotation.Nullable AssetId id) { @@ -362,6 +360,11 @@ public void setGroups(@javax.annotation.Nullable List groups) { } + public AssetInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -374,6 +377,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public AssetInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/AssetProfileId.java b/pe/src/main/java/org/thingsboard/client/model/AssetProfileId.java index afb23a04..63cd8f02 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AssetProfileId.java +++ b/pe/src/main/java/org/thingsboard/client/model/AssetProfileId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * AssetProfileId */ @JsonPropertyOrder({ - AssetProfileId.JSON_PROPERTY_ID, - AssetProfileId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AssetProfileId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class AssetProfileId extends EntityId { public AssetProfileId() { } + @Override public AssetProfileId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public AssetProfileId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this AssetProfileId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AssetProfileId assetProfileId = (AssetProfileId) o; - return Objects.equals(this.id, assetProfileId.id) && - Objects.equals(this.entityType, assetProfileId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AssetProfileId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AssetProfileId", AssetProfileId.class); + JSON.registerDiscriminator(AssetProfileId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/AttributesOutput.java b/pe/src/main/java/org/thingsboard/client/model/AttributesOutput.java index 1359decc..82704939 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AttributesOutput.java +++ b/pe/src/main/java/org/thingsboard/client/model/AttributesOutput.java @@ -30,8 +30,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; import org.thingsboard.client.model.AttributeScope; -import org.thingsboard.client.model.AttributesOutputStrategy; import org.thingsboard.client.model.Output; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -42,7 +42,6 @@ * AttributesOutput */ @JsonPropertyOrder({ - AttributesOutput.JSON_PROPERTY_STRATEGY }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -52,37 +51,9 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) public class AttributesOutput extends Output { - public static final String JSON_PROPERTY_STRATEGY = "strategy"; - @javax.annotation.Nullable - private AttributesOutputStrategy strategy; - public AttributesOutput() { } - public AttributesOutput strategy(@javax.annotation.Nullable AttributesOutputStrategy strategy) { - this.strategy = strategy; - return this; - } - - /** - * Get strategy - * @return strategy - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_STRATEGY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AttributesOutputStrategy getStrategy() { - return strategy; - } - - - @JsonProperty(value = JSON_PROPERTY_STRATEGY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStrategy(@javax.annotation.Nullable AttributesOutputStrategy strategy) { - this.strategy = strategy; - } - - @Override public AttributesOutput name(@javax.annotation.Nullable String name) { this.setName(name); @@ -101,6 +72,12 @@ public AttributesOutput decimalsByDefault(@javax.annotation.Nullable Integer dec return this; } + @Override + public AttributesOutput strategy(@javax.annotation.Nullable Object strategy) { + this.setStrategy(strategy); + return this; + } + @Override public AttributesOutput type(@javax.annotation.Nonnull String type) { this.setType(type); @@ -118,14 +95,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AttributesOutput attributesOutput = (AttributesOutput) o; - return Objects.equals(this.strategy, attributesOutput.strategy) && - super.equals(o); + return super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { - return Objects.hash(strategy, super.hashCode()); + return Objects.hash(super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -133,7 +119,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AttributesOutput {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" strategy: ").append(toIndentedString(strategy)).append("\n"); sb.append("}"); return sb.toString(); } @@ -198,7 +183,7 @@ public String toUrlQueryString(String prefix) { // add `strategy` to the URL query string if (getStrategy() != null) { - joiner.add(getStrategy().toUrlQueryString(prefix + "strategy" + suffix)); + joiner.add(String.format(java.util.Locale.ROOT, "%sstrategy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStrategy())))); } // add `type` to the URL query string diff --git a/pe/src/main/java/org/thingsboard/client/model/AuditLog.java b/pe/src/main/java/org/thingsboard/client/model/AuditLog.java index 1ff6864f..4bc53623 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AuditLog.java +++ b/pe/src/main/java/org/thingsboard/client/model/AuditLog.java @@ -113,7 +113,6 @@ public AuditLog( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_ENTITY_ID) EntityId entityId, @JsonProperty(JSON_PROPERTY_ENTITY_NAME) String entityName, @JsonProperty(JSON_PROPERTY_USER_ID) UserId userId, @JsonProperty(JSON_PROPERTY_USER_NAME) String userName, @@ -126,7 +125,6 @@ public AuditLog( this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; - this.entityId = entityId; this.entityName = entityName; this.userId = userId; this.userName = userName; @@ -202,6 +200,11 @@ public CustomerId getCustomerId() { + public AuditLog entityId(@javax.annotation.Nullable EntityId entityId) { + this.entityId = entityId; + return this; + } + /** * JSON object with Entity id * @return entityId @@ -214,6 +217,11 @@ public EntityId getEntityId() { } + @JsonProperty(value = JSON_PROPERTY_ENTITY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityId(@javax.annotation.Nullable EntityId entityId) { + this.entityId = entityId; + } /** diff --git a/pe/src/main/java/org/thingsboard/client/model/BlobEntityId.java b/pe/src/main/java/org/thingsboard/client/model/BlobEntityId.java index 615a94d5..698931b3 100644 --- a/pe/src/main/java/org/thingsboard/client/model/BlobEntityId.java +++ b/pe/src/main/java/org/thingsboard/client/model/BlobEntityId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * BlobEntityId */ @JsonPropertyOrder({ - BlobEntityId.JSON_PROPERTY_ID, - BlobEntityId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class BlobEntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class BlobEntityId extends EntityId { public BlobEntityId() { } + @Override public BlobEntityId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public BlobEntityId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this BlobEntityId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - BlobEntityId blobEntityId = (BlobEntityId) o; - return Objects.equals(this.id, blobEntityId.id) && - Objects.equals(this.entityType, blobEntityId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BlobEntityId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("BlobEntityId", BlobEntityId.class); + JSON.registerDiscriminator(BlobEntityId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/BlobEntityInfo.java b/pe/src/main/java/org/thingsboard/client/model/BlobEntityInfo.java index b6d12b5c..34ea1c41 100644 --- a/pe/src/main/java/org/thingsboard/client/model/BlobEntityInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/BlobEntityInfo.java @@ -134,8 +134,7 @@ public BlobEntityInfo( @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_NAME) String name, @JsonProperty(JSON_PROPERTY_TYPE) String type, - @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) ContentTypeEnum contentType, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) ContentTypeEnum contentType ) { this(); this.createdTime = createdTime; @@ -144,7 +143,6 @@ public BlobEntityInfo( this.name = name; this.type = type; this.contentType = contentType; - this.ownerId = ownerId; } public BlobEntityInfo id(@javax.annotation.Nullable BlobEntityId id) { @@ -255,6 +253,11 @@ public ContentTypeEnum getContentType() { + public BlobEntityInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -267,6 +270,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public BlobEntityInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/BlobEntityWithCustomerInfo.java b/pe/src/main/java/org/thingsboard/client/model/BlobEntityWithCustomerInfo.java index 9ea3b41f..e0f6dacd 100644 --- a/pe/src/main/java/org/thingsboard/client/model/BlobEntityWithCustomerInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/BlobEntityWithCustomerInfo.java @@ -145,8 +145,7 @@ public BlobEntityWithCustomerInfo( @JsonProperty(JSON_PROPERTY_NAME) String name, @JsonProperty(JSON_PROPERTY_TYPE) String type, @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) ContentTypeEnum contentType, - @JsonProperty(JSON_PROPERTY_CUSTOMER_IS_PUBLIC) Boolean customerIsPublic, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_IS_PUBLIC) Boolean customerIsPublic ) { this(); this.createdTime = createdTime; @@ -156,7 +155,6 @@ public BlobEntityWithCustomerInfo( this.type = type; this.contentType = contentType; this.customerIsPublic = customerIsPublic; - this.ownerId = ownerId; } public BlobEntityWithCustomerInfo id(@javax.annotation.Nullable BlobEntityId id) { @@ -305,6 +303,11 @@ public Boolean getCustomerIsPublic() { + public BlobEntityWithCustomerInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -317,6 +320,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public BlobEntityWithCustomerInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java b/pe/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java index 42c334eb..724a8af2 100644 --- a/pe/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java +++ b/pe/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * CalculatedFieldId */ @JsonPropertyOrder({ - CalculatedFieldId.JSON_PROPERTY_ID, - CalculatedFieldId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class CalculatedFieldId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class CalculatedFieldId extends EntityId { public CalculatedFieldId() { } + @Override public CalculatedFieldId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public CalculatedFieldId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this CalculatedFieldId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CalculatedFieldId calculatedFieldId = (CalculatedFieldId) o; - return Objects.equals(this.id, calculatedFieldId.id) && - Objects.equals(this.entityType, calculatedFieldId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CalculatedFieldId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CalculatedFieldId", CalculatedFieldId.class); + JSON.registerDiscriminator(CalculatedFieldId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/ConverterId.java b/pe/src/main/java/org/thingsboard/client/model/ConverterId.java index 2e7da28c..95edeb7b 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ConverterId.java +++ b/pe/src/main/java/org/thingsboard/client/model/ConverterId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * ConverterId */ @JsonPropertyOrder({ - ConverterId.JSON_PROPERTY_ID, - ConverterId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class ConverterId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class ConverterId extends EntityId { public ConverterId() { } + @Override public ConverterId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public ConverterId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this ConverterId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ConverterId converterId = (ConverterId) o; - return Objects.equals(this.id, converterId.id) && - Objects.equals(this.entityType, converterId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ConverterId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ConverterId", ConverterId.class); + JSON.registerDiscriminator(ConverterId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java b/pe/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java index c9723eef..024b6056 100644 --- a/pe/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java @@ -83,7 +83,7 @@ public CsvReportTemplateConfig namePattern(@javax.annotation.Nullable String nam } @Override - public CsvReportTemplateConfig components(@javax.annotation.Nonnull List components) { + public CsvReportTemplateConfig components(@javax.annotation.Nullable List components) { this.setComponents(components); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/CustomMenuItem.java b/pe/src/main/java/org/thingsboard/client/model/CustomMenuItem.java index 4162f057..9fd7092c 100644 --- a/pe/src/main/java/org/thingsboard/client/model/CustomMenuItem.java +++ b/pe/src/main/java/org/thingsboard/client/model/CustomMenuItem.java @@ -53,7 +53,6 @@ CustomMenuItem.JSON_PROPERTY_HIDE_DASHBOARD_TOOLBAR, CustomMenuItem.JSON_PROPERTY_URL, CustomMenuItem.JSON_PROPERTY_SET_ACCESS_TOKEN, - CustomMenuItem.JSON_PROPERTY_VISIBLE, CustomMenuItem.JSON_PROPERTY_PAGES }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @@ -96,10 +95,6 @@ public class CustomMenuItem extends MenuItem { @javax.annotation.Nullable private Boolean setAccessToken; - public static final String JSON_PROPERTY_VISIBLE = "visible"; - @javax.annotation.Nullable - private Boolean visible; - public static final String JSON_PROPERTY_PAGES = "pages"; @javax.annotation.Nullable private List pages = new ArrayList<>(); @@ -299,30 +294,6 @@ public void setSetAccessToken(@javax.annotation.Nullable Boolean setAccessToken) } - public CustomMenuItem visible(@javax.annotation.Nullable Boolean visible) { - this.visible = visible; - return this; - } - - /** - * Mark if menu item is visible for user - * @return visible - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getVisible() { - return visible; - } - - - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setVisible(@javax.annotation.Nullable Boolean visible) { - this.visible = visible; - } - - public CustomMenuItem pages(@javax.annotation.Nullable List pages) { this.pages = pages; return this; @@ -361,6 +332,12 @@ public CustomMenuItem type(@javax.annotation.Nonnull MenuItemType type) { return this; } + @Override + public CustomMenuItem visible(@javax.annotation.Nullable Boolean visible) { + this.setVisible(visible); + return this; + } + /** * Return true if this CustomMenuItem object is equal to o. */ @@ -381,14 +358,13 @@ public boolean equals(Object o) { Objects.equals(this.hideDashboardToolbar, customMenuItem.hideDashboardToolbar) && Objects.equals(this.url, customMenuItem.url) && Objects.equals(this.setAccessToken, customMenuItem.setAccessToken) && - Objects.equals(this.visible, customMenuItem.visible) && Objects.equals(this.pages, customMenuItem.pages) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(name, icon, menuItemType, linkType, dashboardId, hideDashboardToolbar, url, setAccessToken, visible, pages, super.hashCode()); + return Objects.hash(name, icon, menuItemType, linkType, dashboardId, hideDashboardToolbar, url, setAccessToken, pages, super.hashCode()); } @Override @@ -404,7 +380,6 @@ public String toString() { sb.append(" hideDashboardToolbar: ").append(toIndentedString(hideDashboardToolbar)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append(" setAccessToken: ").append(toIndentedString(setAccessToken)).append("\n"); - sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); sb.append(" pages: ").append(toIndentedString(pages)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/pe/src/main/java/org/thingsboard/client/model/CustomMobilePage.java b/pe/src/main/java/org/thingsboard/client/model/CustomMobilePage.java index 832857f3..c17663a6 100644 --- a/pe/src/main/java/org/thingsboard/client/model/CustomMobilePage.java +++ b/pe/src/main/java/org/thingsboard/client/model/CustomMobilePage.java @@ -42,7 +42,6 @@ */ @JsonPropertyOrder({ CustomMobilePage.JSON_PROPERTY_LABEL, - CustomMobilePage.JSON_PROPERTY_VISIBLE, CustomMobilePage.JSON_PROPERTY_ICON, CustomMobilePage.JSON_PROPERTY_PATH }) @@ -58,10 +57,6 @@ public class CustomMobilePage extends MobilePage { @javax.annotation.Nullable private String label; - public static final String JSON_PROPERTY_VISIBLE = "visible"; - @javax.annotation.Nonnull - private Boolean visible; - public static final String JSON_PROPERTY_ICON = "icon"; @javax.annotation.Nullable private String icon; @@ -97,30 +92,6 @@ public void setLabel(@javax.annotation.Nullable String label) { } - public CustomMobilePage visible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - return this; - } - - /** - * Indicates if page is visible - * @return visible - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getVisible() { - return visible; - } - - - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVisible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - } - - public CustomMobilePage icon(@javax.annotation.Nullable String icon) { this.icon = icon; return this; @@ -175,6 +146,12 @@ public CustomMobilePage type(@javax.annotation.Nonnull MobilePageType type) { return this; } + @Override + public CustomMobilePage visible(@javax.annotation.Nullable Boolean visible) { + this.setVisible(visible); + return this; + } + /** * Return true if this CustomMobilePage object is equal to o. */ @@ -188,7 +165,6 @@ public boolean equals(Object o) { } CustomMobilePage customMobilePage = (CustomMobilePage) o; return Objects.equals(this.label, customMobilePage.label) && - Objects.equals(this.visible, customMobilePage.visible) && Objects.equals(this.icon, customMobilePage.icon) && Objects.equals(this.path, customMobilePage.path) && super.equals(o); @@ -196,7 +172,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(label, visible, icon, path, super.hashCode()); + return Objects.hash(label, icon, path, super.hashCode()); } @Override @@ -205,7 +181,6 @@ public String toString() { sb.append("class CustomMobilePage {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); sb.append(" path: ").append(toIndentedString(path)).append("\n"); sb.append("}"); diff --git a/pe/src/main/java/org/thingsboard/client/model/Customer.java b/pe/src/main/java/org/thingsboard/client/model/Customer.java index 36113d1e..a3c1d6a7 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Customer.java +++ b/pe/src/main/java/org/thingsboard/client/model/Customer.java @@ -144,14 +144,12 @@ public Customer() { public Customer( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId ) { this(); this.createdTime = createdTime; this.name = name; this.customerId = customerId; - this.ownerId = ownerId; } public Customer id(@javax.annotation.Nullable CustomerId id) { @@ -532,6 +530,11 @@ public CustomerId getCustomerId() { + public Customer ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -544,6 +547,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public Customer additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/CustomerId.java b/pe/src/main/java/org/thingsboard/client/model/CustomerId.java index b2bd00cd..0111bf30 100644 --- a/pe/src/main/java/org/thingsboard/client/model/CustomerId.java +++ b/pe/src/main/java/org/thingsboard/client/model/CustomerId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * CustomerId */ @JsonPropertyOrder({ - CustomerId.JSON_PROPERTY_ID, - CustomerId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class CustomerId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class CustomerId extends EntityId { public CustomerId() { } + @Override public CustomerId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public CustomerId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this CustomerId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CustomerId customerId = (CustomerId) o; - return Objects.equals(this.id, customerId.id) && - Objects.equals(this.entityType, customerId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CustomerId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CustomerId", CustomerId.class); + JSON.registerDiscriminator(CustomerId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/CustomerInfo.java b/pe/src/main/java/org/thingsboard/client/model/CustomerInfo.java index 4c459058..6973243e 100644 --- a/pe/src/main/java/org/thingsboard/client/model/CustomerInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/CustomerInfo.java @@ -158,15 +158,13 @@ public CustomerInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId ) { this(); this.createdTime = createdTime; this.ownerName = ownerName; this.name = name; this.customerId = customerId; - this.ownerId = ownerId; } public CustomerInfo id(@javax.annotation.Nullable CustomerId id) { @@ -593,6 +591,11 @@ public CustomerId getCustomerId() { + public CustomerInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -605,6 +608,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public CustomerInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/Dashboard.java b/pe/src/main/java/org/thingsboard/client/model/Dashboard.java index 5680d23b..9e00843d 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Dashboard.java +++ b/pe/src/main/java/org/thingsboard/client/model/Dashboard.java @@ -129,8 +129,7 @@ public Dashboard( @JsonProperty(JSON_PROPERTY_IMAGE) String image, @JsonProperty(JSON_PROPERTY_MOBILE_HIDE) Boolean mobileHide, @JsonProperty(JSON_PROPERTY_MOBILE_ORDER) Integer mobileOrder, - @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_NAME) String name ) { this(); this.createdTime = createdTime; @@ -139,7 +138,6 @@ public Dashboard( this.mobileHide = mobileHide; this.mobileOrder = mobileOrder; this.name = name; - this.ownerId = ownerId; } public Dashboard id(@javax.annotation.Nullable DashboardId id) { @@ -411,6 +409,11 @@ public String getName() { + public Dashboard ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -423,6 +426,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } /** diff --git a/pe/src/main/java/org/thingsboard/client/model/DashboardId.java b/pe/src/main/java/org/thingsboard/client/model/DashboardId.java index 1ce6e6f6..56d8e5b5 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DashboardId.java +++ b/pe/src/main/java/org/thingsboard/client/model/DashboardId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * DashboardId */ @JsonPropertyOrder({ - DashboardId.JSON_PROPERTY_ID, - DashboardId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class DashboardId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class DashboardId extends EntityId { public DashboardId() { } + @Override public DashboardId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public DashboardId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this DashboardId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DashboardId dashboardId = (DashboardId) o; - return Objects.equals(this.id, dashboardId.id) && - Objects.equals(this.entityType, dashboardId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DashboardId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DashboardId", DashboardId.class); + JSON.registerDiscriminator(DashboardId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/DashboardInfo.java b/pe/src/main/java/org/thingsboard/client/model/DashboardInfo.java index fd250aca..5afd133e 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DashboardInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/DashboardInfo.java @@ -141,8 +141,7 @@ public DashboardInfo( @JsonProperty(JSON_PROPERTY_NAME) String name, @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName ) { this(); this.image = image; @@ -152,7 +151,6 @@ public DashboardInfo( this.createdTime = createdTime; this.tenantId = tenantId; this.ownerName = ownerName; - this.ownerId = ownerId; } public DashboardInfo title(@javax.annotation.Nullable String title) { @@ -470,6 +468,11 @@ public void setGroups(@javax.annotation.Nullable List groups) { } + public DashboardInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -482,6 +485,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } /** diff --git a/pe/src/main/java/org/thingsboard/client/model/DashboardPage.java b/pe/src/main/java/org/thingsboard/client/model/DashboardPage.java index f20ac3ac..0586ad5d 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DashboardPage.java +++ b/pe/src/main/java/org/thingsboard/client/model/DashboardPage.java @@ -42,7 +42,6 @@ */ @JsonPropertyOrder({ DashboardPage.JSON_PROPERTY_LABEL, - DashboardPage.JSON_PROPERTY_VISIBLE, DashboardPage.JSON_PROPERTY_ICON, DashboardPage.JSON_PROPERTY_DASHBOARD_ID }) @@ -58,10 +57,6 @@ public class DashboardPage extends MobilePage { @javax.annotation.Nullable private String label; - public static final String JSON_PROPERTY_VISIBLE = "visible"; - @javax.annotation.Nonnull - private Boolean visible; - public static final String JSON_PROPERTY_ICON = "icon"; @javax.annotation.Nullable private String icon; @@ -97,30 +92,6 @@ public void setLabel(@javax.annotation.Nullable String label) { } - public DashboardPage visible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - return this; - } - - /** - * Indicates if page is visible - * @return visible - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getVisible() { - return visible; - } - - - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVisible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - } - - public DashboardPage icon(@javax.annotation.Nullable String icon) { this.icon = icon; return this; @@ -175,6 +146,12 @@ public DashboardPage type(@javax.annotation.Nonnull MobilePageType type) { return this; } + @Override + public DashboardPage visible(@javax.annotation.Nullable Boolean visible) { + this.setVisible(visible); + return this; + } + /** * Return true if this DashboardPage object is equal to o. */ @@ -188,7 +165,6 @@ public boolean equals(Object o) { } DashboardPage dashboardPage = (DashboardPage) o; return Objects.equals(this.label, dashboardPage.label) && - Objects.equals(this.visible, dashboardPage.visible) && Objects.equals(this.icon, dashboardPage.icon) && Objects.equals(this.dashboardId, dashboardPage.dashboardId) && super.equals(o); @@ -196,7 +172,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(label, visible, icon, dashboardId, super.hashCode()); + return Objects.hash(label, icon, dashboardId, super.hashCode()); } @Override @@ -205,7 +181,6 @@ public String toString() { sb.append("class DashboardPage {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); sb.append(" dashboardId: ").append(toIndentedString(dashboardId)).append("\n"); sb.append("}"); diff --git a/pe/src/main/java/org/thingsboard/client/model/DefaultMenuItem.java b/pe/src/main/java/org/thingsboard/client/model/DefaultMenuItem.java index 7051ae92..9f8a7169 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DefaultMenuItem.java +++ b/pe/src/main/java/org/thingsboard/client/model/DefaultMenuItem.java @@ -46,7 +46,6 @@ DefaultMenuItem.JSON_PROPERTY_ID, DefaultMenuItem.JSON_PROPERTY_NAME, DefaultMenuItem.JSON_PROPERTY_ICON, - DefaultMenuItem.JSON_PROPERTY_VISIBLE, DefaultMenuItem.JSON_PROPERTY_PAGES }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @@ -69,10 +68,6 @@ public class DefaultMenuItem extends MenuItem { @javax.annotation.Nullable private String icon; - public static final String JSON_PROPERTY_VISIBLE = "visible"; - @javax.annotation.Nullable - private Boolean visible; - public static final String JSON_PROPERTY_PAGES = "pages"; @javax.annotation.Nullable private List pages = new ArrayList<>(); @@ -150,30 +145,6 @@ public void setIcon(@javax.annotation.Nullable String icon) { } - public DefaultMenuItem visible(@javax.annotation.Nullable Boolean visible) { - this.visible = visible; - return this; - } - - /** - * Mark if menu item is visible for user - * @return visible - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getVisible() { - return visible; - } - - - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setVisible(@javax.annotation.Nullable Boolean visible) { - this.visible = visible; - } - - public DefaultMenuItem pages(@javax.annotation.Nullable List pages) { this.pages = pages; return this; @@ -212,6 +183,12 @@ public DefaultMenuItem type(@javax.annotation.Nonnull MenuItemType type) { return this; } + @Override + public DefaultMenuItem visible(@javax.annotation.Nullable Boolean visible) { + this.setVisible(visible); + return this; + } + /** * Return true if this DefaultMenuItem object is equal to o. */ @@ -227,14 +204,13 @@ public boolean equals(Object o) { return Objects.equals(this.id, defaultMenuItem.id) && Objects.equals(this.name, defaultMenuItem.name) && Objects.equals(this.icon, defaultMenuItem.icon) && - Objects.equals(this.visible, defaultMenuItem.visible) && Objects.equals(this.pages, defaultMenuItem.pages) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, name, icon, visible, pages, super.hashCode()); + return Objects.hash(id, name, icon, pages, super.hashCode()); } @Override @@ -245,7 +221,6 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); - sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); sb.append(" pages: ").append(toIndentedString(pages)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/pe/src/main/java/org/thingsboard/client/model/DefaultMobilePage.java b/pe/src/main/java/org/thingsboard/client/model/DefaultMobilePage.java index 7a9fb2c7..6829d257 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DefaultMobilePage.java +++ b/pe/src/main/java/org/thingsboard/client/model/DefaultMobilePage.java @@ -43,7 +43,6 @@ */ @JsonPropertyOrder({ DefaultMobilePage.JSON_PROPERTY_LABEL, - DefaultMobilePage.JSON_PROPERTY_VISIBLE, DefaultMobilePage.JSON_PROPERTY_ICON, DefaultMobilePage.JSON_PROPERTY_ID }) @@ -59,10 +58,6 @@ public class DefaultMobilePage extends MobilePage { @javax.annotation.Nullable private String label; - public static final String JSON_PROPERTY_VISIBLE = "visible"; - @javax.annotation.Nonnull - private Boolean visible; - public static final String JSON_PROPERTY_ICON = "icon"; @javax.annotation.Nullable private String icon; @@ -98,30 +93,6 @@ public void setLabel(@javax.annotation.Nullable String label) { } - public DefaultMobilePage visible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - return this; - } - - /** - * Indicates if page is visible - * @return visible - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getVisible() { - return visible; - } - - - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVisible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - } - - public DefaultMobilePage icon(@javax.annotation.Nullable String icon) { this.icon = icon; return this; @@ -176,6 +147,12 @@ public DefaultMobilePage type(@javax.annotation.Nonnull MobilePageType type) { return this; } + @Override + public DefaultMobilePage visible(@javax.annotation.Nullable Boolean visible) { + this.setVisible(visible); + return this; + } + /** * Return true if this DefaultMobilePage object is equal to o. */ @@ -189,7 +166,6 @@ public boolean equals(Object o) { } DefaultMobilePage defaultMobilePage = (DefaultMobilePage) o; return Objects.equals(this.label, defaultMobilePage.label) && - Objects.equals(this.visible, defaultMobilePage.visible) && Objects.equals(this.icon, defaultMobilePage.icon) && Objects.equals(this.id, defaultMobilePage.id) && super.equals(o); @@ -197,7 +173,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(label, visible, icon, id, super.hashCode()); + return Objects.hash(label, icon, id, super.hashCode()); } @Override @@ -206,7 +182,6 @@ public String toString() { sb.append("class DefaultMobilePage {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append("}"); diff --git a/pe/src/main/java/org/thingsboard/client/model/Device.java b/pe/src/main/java/org/thingsboard/client/model/Device.java index 4d5c2625..26fe6d69 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Device.java +++ b/pe/src/main/java/org/thingsboard/client/model/Device.java @@ -53,9 +53,9 @@ Device.JSON_PROPERTY_FIRMWARE_ID, Device.JSON_PROPERTY_SOFTWARE_ID, Device.JSON_PROPERTY_VERSION, - Device.JSON_PROPERTY_DEVICE_DATA, Device.JSON_PROPERTY_OWNER_ID, - Device.JSON_PROPERTY_ADDITIONAL_INFO + Device.JSON_PROPERTY_ADDITIONAL_INFO, + Device.JSON_PROPERTY_DEVICE_DATA }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class Device { @@ -103,10 +103,6 @@ public class Device { @javax.annotation.Nullable private Long version; - public static final String JSON_PROPERTY_DEVICE_DATA = "deviceData"; - @javax.annotation.Nullable - private DeviceData deviceData; - public static final String JSON_PROPERTY_OWNER_ID = "ownerId"; @javax.annotation.Nullable private EntityId ownerId; @@ -115,6 +111,10 @@ public class Device { @javax.annotation.Nullable private com.fasterxml.jackson.databind.JsonNode additionalInfo; + public static final String JSON_PROPERTY_DEVICE_DATA = "deviceData"; + @javax.annotation.Nullable + private DeviceData deviceData; + public Device() { } @@ -122,14 +122,12 @@ public Device() { public Device( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; - this.ownerId = ownerId; } public Device id(@javax.annotation.Nullable DeviceId id) { @@ -366,30 +364,11 @@ public void setVersion(@javax.annotation.Nullable Long version) { } - public Device deviceData(@javax.annotation.Nullable DeviceData deviceData) { - this.deviceData = deviceData; + public Device ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; return this; } - /** - * JSON object with content specific to type of transport in the device profile. - * @return deviceData - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DEVICE_DATA, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DeviceData getDeviceData() { - return deviceData; - } - - - @JsonProperty(value = JSON_PROPERTY_DEVICE_DATA, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeviceData(@javax.annotation.Nullable DeviceData deviceData) { - this.deviceData = deviceData; - } - - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -402,6 +381,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public Device additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { @@ -428,6 +412,30 @@ public void setAdditionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.d } + public Device deviceData(@javax.annotation.Nullable DeviceData deviceData) { + this.deviceData = deviceData; + return this; + } + + /** + * JSON object with content specific to type of transport in the device profile. + * @return deviceData + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_DEVICE_DATA, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DeviceData getDeviceData() { + return deviceData; + } + + + @JsonProperty(value = JSON_PROPERTY_DEVICE_DATA, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeviceData(@javax.annotation.Nullable DeviceData deviceData) { + this.deviceData = deviceData; + } + + /** * Return true if this Device object is equal to o. */ @@ -451,14 +459,14 @@ public boolean equals(Object o) { Objects.equals(this.firmwareId, device.firmwareId) && Objects.equals(this.softwareId, device.softwareId) && Objects.equals(this.version, device.version) && - Objects.equals(this.deviceData, device.deviceData) && Objects.equals(this.ownerId, device.ownerId) && - Objects.equals(this.additionalInfo, device.additionalInfo); + Objects.equals(this.additionalInfo, device.additionalInfo) && + Objects.equals(this.deviceData, device.deviceData); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, customerId, name, type, label, deviceProfileId, firmwareId, softwareId, version, deviceData, ownerId, additionalInfo); + return Objects.hash(id, createdTime, tenantId, customerId, name, type, label, deviceProfileId, firmwareId, softwareId, version, ownerId, additionalInfo, deviceData); } @Override @@ -476,9 +484,9 @@ public String toString() { sb.append(" firmwareId: ").append(toIndentedString(firmwareId)).append("\n"); sb.append(" softwareId: ").append(toIndentedString(softwareId)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); - sb.append(" deviceData: ").append(toIndentedString(deviceData)).append("\n"); sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); + sb.append(" deviceData: ").append(toIndentedString(deviceData)).append("\n"); sb.append("}"); return sb.toString(); } @@ -581,11 +589,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); } - // add `deviceData` to the URL query string - if (getDeviceData() != null) { - joiner.add(getDeviceData().toUrlQueryString(prefix + "deviceData" + suffix)); - } - // add `ownerId` to the URL query string if (getOwnerId() != null) { joiner.add(getOwnerId().toUrlQueryString(prefix + "ownerId" + suffix)); @@ -596,6 +599,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sadditionalInfo%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInfo())))); } + // add `deviceData` to the URL query string + if (getDeviceData() != null) { + joiner.add(getDeviceData().toUrlQueryString(prefix + "deviceData" + suffix)); + } + return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java index 937ead2e..c9a48f24 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public DeviceActivityRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public DeviceActivityRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/DeviceId.java b/pe/src/main/java/org/thingsboard/client/model/DeviceId.java index 71906074..6088bccf 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DeviceId.java +++ b/pe/src/main/java/org/thingsboard/client/model/DeviceId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * DeviceId */ @JsonPropertyOrder({ - DeviceId.JSON_PROPERTY_ID, - DeviceId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class DeviceId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class DeviceId extends EntityId { public DeviceId() { } + @Override public DeviceId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public DeviceId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this DeviceId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DeviceId deviceId = (DeviceId) o; - return Objects.equals(this.id, deviceId.id) && - Objects.equals(this.entityType, deviceId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeviceId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DeviceId", DeviceId.class); + JSON.registerDiscriminator(DeviceId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/DeviceInfo.java b/pe/src/main/java/org/thingsboard/client/model/DeviceInfo.java index 854fcbbc..eb5f05c6 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DeviceInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/DeviceInfo.java @@ -59,9 +59,9 @@ DeviceInfo.JSON_PROPERTY_OWNER_NAME, DeviceInfo.JSON_PROPERTY_GROUPS, DeviceInfo.JSON_PROPERTY_ACTIVE, - DeviceInfo.JSON_PROPERTY_DEVICE_DATA, DeviceInfo.JSON_PROPERTY_OWNER_ID, - DeviceInfo.JSON_PROPERTY_ADDITIONAL_INFO + DeviceInfo.JSON_PROPERTY_ADDITIONAL_INFO, + DeviceInfo.JSON_PROPERTY_DEVICE_DATA }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class DeviceInfo { @@ -121,10 +121,6 @@ public class DeviceInfo { @javax.annotation.Nullable private Boolean active; - public static final String JSON_PROPERTY_DEVICE_DATA = "deviceData"; - @javax.annotation.Nullable - private DeviceData deviceData; - public static final String JSON_PROPERTY_OWNER_ID = "ownerId"; @javax.annotation.Nullable private EntityId ownerId; @@ -133,6 +129,10 @@ public class DeviceInfo { @javax.annotation.Nullable private com.fasterxml.jackson.databind.JsonNode additionalInfo; + public static final String JSON_PROPERTY_DEVICE_DATA = "deviceData"; + @javax.annotation.Nullable + private DeviceData deviceData; + public DeviceInfo() { } @@ -142,8 +142,7 @@ public DeviceInfo( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, - @JsonProperty(JSON_PROPERTY_ACTIVE) Boolean active, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_ACTIVE) Boolean active ) { this(); this.createdTime = createdTime; @@ -151,7 +150,6 @@ public DeviceInfo( this.customerId = customerId; this.ownerName = ownerName; this.active = active; - this.ownerId = ownerId; } public DeviceInfo id(@javax.annotation.Nullable DeviceId id) { @@ -448,30 +446,11 @@ public Boolean getActive() { - public DeviceInfo deviceData(@javax.annotation.Nullable DeviceData deviceData) { - this.deviceData = deviceData; + public DeviceInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; return this; } - /** - * JSON object with content specific to type of transport in the device profile. - * @return deviceData - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DEVICE_DATA, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DeviceData getDeviceData() { - return deviceData; - } - - - @JsonProperty(value = JSON_PROPERTY_DEVICE_DATA, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeviceData(@javax.annotation.Nullable DeviceData deviceData) { - this.deviceData = deviceData; - } - - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -484,6 +463,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public DeviceInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { @@ -510,6 +494,30 @@ public void setAdditionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.d } + public DeviceInfo deviceData(@javax.annotation.Nullable DeviceData deviceData) { + this.deviceData = deviceData; + return this; + } + + /** + * JSON object with content specific to type of transport in the device profile. + * @return deviceData + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_DEVICE_DATA, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DeviceData getDeviceData() { + return deviceData; + } + + + @JsonProperty(value = JSON_PROPERTY_DEVICE_DATA, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeviceData(@javax.annotation.Nullable DeviceData deviceData) { + this.deviceData = deviceData; + } + + /** * Return true if this DeviceInfo object is equal to o. */ @@ -536,14 +544,14 @@ public boolean equals(Object o) { Objects.equals(this.ownerName, deviceInfo.ownerName) && Objects.equals(this.groups, deviceInfo.groups) && Objects.equals(this.active, deviceInfo.active) && - Objects.equals(this.deviceData, deviceInfo.deviceData) && Objects.equals(this.ownerId, deviceInfo.ownerId) && - Objects.equals(this.additionalInfo, deviceInfo.additionalInfo); + Objects.equals(this.additionalInfo, deviceInfo.additionalInfo) && + Objects.equals(this.deviceData, deviceInfo.deviceData); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, customerId, name, type, label, deviceProfileId, firmwareId, softwareId, version, ownerName, groups, active, deviceData, ownerId, additionalInfo); + return Objects.hash(id, createdTime, tenantId, customerId, name, type, label, deviceProfileId, firmwareId, softwareId, version, ownerName, groups, active, ownerId, additionalInfo, deviceData); } @Override @@ -564,9 +572,9 @@ public String toString() { sb.append(" ownerName: ").append(toIndentedString(ownerName)).append("\n"); sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); sb.append(" active: ").append(toIndentedString(active)).append("\n"); - sb.append(" deviceData: ").append(toIndentedString(deviceData)).append("\n"); sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); + sb.append(" deviceData: ").append(toIndentedString(deviceData)).append("\n"); sb.append("}"); return sb.toString(); } @@ -689,11 +697,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sactive%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getActive())))); } - // add `deviceData` to the URL query string - if (getDeviceData() != null) { - joiner.add(getDeviceData().toUrlQueryString(prefix + "deviceData" + suffix)); - } - // add `ownerId` to the URL query string if (getOwnerId() != null) { joiner.add(getOwnerId().toUrlQueryString(prefix + "ownerId" + suffix)); @@ -704,6 +707,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sadditionalInfo%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInfo())))); } + // add `deviceData` to the URL query string + if (getDeviceData() != null) { + joiner.add(getDeviceData().toUrlQueryString(prefix + "deviceData" + suffix)); + } + return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/DeviceProfileId.java b/pe/src/main/java/org/thingsboard/client/model/DeviceProfileId.java index 3b7101a2..750f9962 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DeviceProfileId.java +++ b/pe/src/main/java/org/thingsboard/client/model/DeviceProfileId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * DeviceProfileId */ @JsonPropertyOrder({ - DeviceProfileId.JSON_PROPERTY_ID, - DeviceProfileId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class DeviceProfileId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class DeviceProfileId extends EntityId { public DeviceProfileId() { } + @Override public DeviceProfileId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public DeviceProfileId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this DeviceProfileId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DeviceProfileId deviceProfileId = (DeviceProfileId) o; - return Objects.equals(this.id, deviceProfileId.id) && - Objects.equals(this.entityType, deviceProfileId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeviceProfileId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DeviceProfileId", DeviceProfileId.class); + JSON.registerDiscriminator(DeviceProfileId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/Domain.java b/pe/src/main/java/org/thingsboard/client/model/Domain.java index 93d706e3..39f85c01 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Domain.java +++ b/pe/src/main/java/org/thingsboard/client/model/Domain.java @@ -87,12 +87,10 @@ public Domain() { @JsonCreator public Domain( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime ) { this(); this.createdTime = createdTime; - this.ownerId = ownerId; } public Domain id(@javax.annotation.Nullable DomainId id) { @@ -253,6 +251,11 @@ public void setPropagateToEdge(@javax.annotation.Nullable Boolean propagateToEdg } + public Domain ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -265,6 +268,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } /** diff --git a/pe/src/main/java/org/thingsboard/client/model/DomainId.java b/pe/src/main/java/org/thingsboard/client/model/DomainId.java index 1ad2f2c8..e89b114e 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DomainId.java +++ b/pe/src/main/java/org/thingsboard/client/model/DomainId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * DomainId */ @JsonPropertyOrder({ - DomainId.JSON_PROPERTY_ID, - DomainId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class DomainId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class DomainId extends EntityId { public DomainId() { } + @Override public DomainId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public DomainId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * Get entityType - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this DomainId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DomainId domainId = (DomainId) o; - return Objects.equals(this.id, domainId.id) && - Objects.equals(this.entityType, domainId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DomainId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DomainId", DomainId.class); + JSON.registerDiscriminator(DomainId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/DomainInfo.java b/pe/src/main/java/org/thingsboard/client/model/DomainInfo.java index dd138d2d..24bd87d1 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DomainInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/DomainInfo.java @@ -95,12 +95,10 @@ public DomainInfo() { @JsonCreator public DomainInfo( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime ) { this(); this.createdTime = createdTime; - this.ownerId = ownerId; } public DomainInfo id(@javax.annotation.Nullable DomainId id) { @@ -293,6 +291,11 @@ public void setOauth2ClientInfos(@javax.annotation.Nullable List targets) { @Override - public EdgeCommunicationFailureRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public EdgeCommunicationFailureRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java index e8a8443d..2da5cf25 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public EdgeConnectionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public EdgeConnectionRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/EdgeId.java b/pe/src/main/java/org/thingsboard/client/model/EdgeId.java index be01b1a0..e508e60c 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EdgeId.java +++ b/pe/src/main/java/org/thingsboard/client/model/EdgeId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * EdgeId */ @JsonPropertyOrder({ - EdgeId.JSON_PROPERTY_ID, - EdgeId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class EdgeId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class EdgeId extends EntityId { public EdgeId() { } + @Override public EdgeId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public EdgeId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this EdgeId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - EdgeId edgeId = (EdgeId) o; - return Objects.equals(this.id, edgeId.id) && - Objects.equals(this.entityType, edgeId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EdgeId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EdgeId", EdgeId.class); + JSON.registerDiscriminator(EdgeId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/EdgeInfo.java b/pe/src/main/java/org/thingsboard/client/model/EdgeInfo.java index e20c59a3..c06ff7d1 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EdgeInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/EdgeInfo.java @@ -140,8 +140,7 @@ public EdgeInfo( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_ROOT_RULE_CHAIN_ID) RuleChainId rootRuleChainId, - @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName ) { this(); this.createdTime = createdTime; @@ -149,7 +148,6 @@ public EdgeInfo( this.customerId = customerId; this.rootRuleChainId = rootRuleChainId; this.ownerName = ownerName; - this.ownerId = ownerId; } public EdgeInfo id(@javax.annotation.Nullable EdgeId id) { @@ -470,6 +468,11 @@ public void setGroups(@javax.annotation.Nullable List groups) { } + public EdgeInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * Get ownerId * @return ownerId @@ -482,6 +485,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public EdgeInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java index 0008b4fc..c849c32a 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public EntitiesLimitRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public EntitiesLimitRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java index 80c67578..384475ac 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public EntityActionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public EntityActionRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/EntityAggregationCalculatedFieldConfiguration.java b/pe/src/main/java/org/thingsboard/client/model/EntityAggregationCalculatedFieldConfiguration.java index 381b5497..e0548729 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EntityAggregationCalculatedFieldConfiguration.java +++ b/pe/src/main/java/org/thingsboard/client/model/EntityAggregationCalculatedFieldConfiguration.java @@ -221,7 +221,7 @@ public void setProduceIntermediateResult(@javax.annotation.Nullable Boolean prod @Override - public EntityAggregationCalculatedFieldConfiguration output(@javax.annotation.Nonnull Output output) { + public EntityAggregationCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { this.setOutput(output); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/EntityGroupId.java b/pe/src/main/java/org/thingsboard/client/model/EntityGroupId.java index 990db84c..fb56ae18 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EntityGroupId.java +++ b/pe/src/main/java/org/thingsboard/client/model/EntityGroupId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * EntityGroupId */ @JsonPropertyOrder({ - EntityGroupId.JSON_PROPERTY_ID, - EntityGroupId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class EntityGroupId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class EntityGroupId extends EntityId { public EntityGroupId() { } + @Override public EntityGroupId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public EntityGroupId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this EntityGroupId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - EntityGroupId entityGroupId = (EntityGroupId) o; - return Objects.equals(this.id, entityGroupId.id) && - Objects.equals(this.entityType, entityGroupId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EntityGroupId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EntityGroupId", EntityGroupId.class); + JSON.registerDiscriminator(EntityGroupId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/EntityGroupInfo.java b/pe/src/main/java/org/thingsboard/client/model/EntityGroupInfo.java index 5674e661..3b432a93 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EntityGroupInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/EntityGroupInfo.java @@ -31,6 +31,7 @@ import java.util.LinkedHashSet; import java.util.Set; import org.thingsboard.client.model.EntityGroupId; +import org.thingsboard.client.model.EntityGroupInfoOwnerIdsInner; import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import org.thingsboard.client.model.TenantId; @@ -214,7 +215,7 @@ public static TypeEnum fromValue(EntityType value) { public static final String JSON_PROPERTY_OWNER_IDS = "ownerIds"; @javax.annotation.Nonnull - private Set ownerIds = new LinkedHashSet<>(); + private Set ownerIds = new LinkedHashSet<>(); public static final String JSON_PROPERTY_GROUP_ALL = "groupAll"; @javax.annotation.Nullable @@ -423,12 +424,12 @@ public void setVersion(@javax.annotation.Nullable Long version) { } - public EntityGroupInfo ownerIds(@javax.annotation.Nonnull Set ownerIds) { + public EntityGroupInfo ownerIds(@javax.annotation.Nonnull Set ownerIds) { this.ownerIds = ownerIds; return this; } - public EntityGroupInfo addOwnerIdsItem(EntityId ownerIdsItem) { + public EntityGroupInfo addOwnerIdsItem(EntityGroupInfoOwnerIdsInner ownerIdsItem) { if (this.ownerIds == null) { this.ownerIds = new LinkedHashSet<>(); } @@ -443,7 +444,7 @@ public EntityGroupInfo addOwnerIdsItem(EntityId ownerIdsItem) { @javax.annotation.Nonnull @JsonProperty(value = JSON_PROPERTY_OWNER_IDS, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Set getOwnerIds() { + public Set getOwnerIds() { return ownerIds; } @@ -451,7 +452,7 @@ public Set getOwnerIds() { @JsonDeserialize(as = LinkedHashSet.class) @JsonProperty(value = JSON_PROPERTY_OWNER_IDS, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOwnerIds(@javax.annotation.Nonnull Set ownerIds) { + public void setOwnerIds(@javax.annotation.Nonnull Set ownerIds) { this.ownerIds = ownerIds; } @@ -655,7 +656,7 @@ public String toUrlQueryString(String prefix) { // add `ownerIds` to the URL query string if (getOwnerIds() != null) { int i = 0; - for (EntityId _item : getOwnerIds()) { + for (EntityGroupInfoOwnerIdsInner _item : getOwnerIds()) { if (_item != null) { joiner.add(_item.toUrlQueryString(String.format(java.util.Locale.ROOT, "%sownerIds%s%s", prefix, suffix, "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); diff --git a/pe/src/main/java/org/thingsboard/client/model/EntityGroupInfoOwnerIdsInner.java b/pe/src/main/java/org/thingsboard/client/model/EntityGroupInfoOwnerIdsInner.java new file mode 100644 index 00000000..49a5da68 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/EntityGroupInfoOwnerIdsInner.java @@ -0,0 +1,2721 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.thingsboard.client.model.AdminSettingsId; +import org.thingsboard.client.model.AiModelId; +import org.thingsboard.client.model.AlarmId; +import org.thingsboard.client.model.ApiKeyId; +import org.thingsboard.client.model.ApiUsageStateId; +import org.thingsboard.client.model.AssetId; +import org.thingsboard.client.model.AssetProfileId; +import org.thingsboard.client.model.BlobEntityId; +import org.thingsboard.client.model.CalculatedFieldId; +import org.thingsboard.client.model.ConverterId; +import org.thingsboard.client.model.CustomerId; +import org.thingsboard.client.model.DashboardId; +import org.thingsboard.client.model.DeviceId; +import org.thingsboard.client.model.DeviceProfileId; +import org.thingsboard.client.model.DomainId; +import org.thingsboard.client.model.EdgeId; +import org.thingsboard.client.model.EntityGroupId; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.EntityViewId; +import org.thingsboard.client.model.GroupPermissionId; +import org.thingsboard.client.model.IntegrationId; +import org.thingsboard.client.model.JobId; +import org.thingsboard.client.model.MobileAppBundleId; +import org.thingsboard.client.model.MobileAppId; +import org.thingsboard.client.model.NotificationId; +import org.thingsboard.client.model.NotificationRequestId; +import org.thingsboard.client.model.NotificationRuleId; +import org.thingsboard.client.model.NotificationTargetId; +import org.thingsboard.client.model.NotificationTemplateId; +import org.thingsboard.client.model.OAuth2ClientId; +import org.thingsboard.client.model.OtaPackageId; +import org.thingsboard.client.model.QueueId; +import org.thingsboard.client.model.QueueStatsId; +import org.thingsboard.client.model.ReportId; +import org.thingsboard.client.model.ReportTemplateId; +import org.thingsboard.client.model.RoleId; +import org.thingsboard.client.model.RpcId; +import org.thingsboard.client.model.RuleChainId; +import org.thingsboard.client.model.RuleNodeId; +import org.thingsboard.client.model.SchedulerEventId; +import org.thingsboard.client.model.SecretId; +import org.thingsboard.client.model.TbResourceId; +import org.thingsboard.client.model.TenantId; +import org.thingsboard.client.model.TenantProfileId; +import org.thingsboard.client.model.UserId; +import org.thingsboard.client.model.WidgetTypeId; +import org.thingsboard.client.model.WidgetsBundleId; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.thingsboard.client.ApiClient; +import org.thingsboard.client.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonDeserialize(using = EntityGroupInfoOwnerIdsInner.EntityGroupInfoOwnerIdsInnerDeserializer.class) +@JsonSerialize(using = EntityGroupInfoOwnerIdsInner.EntityGroupInfoOwnerIdsInnerSerializer.class) +public class EntityGroupInfoOwnerIdsInner extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(EntityGroupInfoOwnerIdsInner.class.getName()); + + public static class EntityGroupInfoOwnerIdsInnerSerializer extends StdSerializer { + public EntityGroupInfoOwnerIdsInnerSerializer(Class t) { + super(t); + } + + public EntityGroupInfoOwnerIdsInnerSerializer() { + this(null); + } + + @Override + public void serialize(EntityGroupInfoOwnerIdsInner value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class EntityGroupInfoOwnerIdsInnerDeserializer extends StdDeserializer { + public EntityGroupInfoOwnerIdsInnerDeserializer() { + this(EntityGroupInfoOwnerIdsInner.class); + } + + public EntityGroupInfoOwnerIdsInnerDeserializer(Class vc) { + super(vc); + } + + @Override + public EntityGroupInfoOwnerIdsInner deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize AdminSettingsId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AdminSettingsId.class.equals(Integer.class) || AdminSettingsId.class.equals(Long.class) || AdminSettingsId.class.equals(Float.class) || AdminSettingsId.class.equals(Double.class) || AdminSettingsId.class.equals(Boolean.class) || AdminSettingsId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((AdminSettingsId.class.equals(Integer.class) || AdminSettingsId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((AdminSettingsId.class.equals(Float.class) || AdminSettingsId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (AdminSettingsId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (AdminSettingsId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(AdminSettingsId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'AdminSettingsId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AdminSettingsId'", e); + } + + // deserialize AiModelId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AiModelId.class.equals(Integer.class) || AiModelId.class.equals(Long.class) || AiModelId.class.equals(Float.class) || AiModelId.class.equals(Double.class) || AiModelId.class.equals(Boolean.class) || AiModelId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((AiModelId.class.equals(Integer.class) || AiModelId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((AiModelId.class.equals(Float.class) || AiModelId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (AiModelId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (AiModelId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(AiModelId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'AiModelId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AiModelId'", e); + } + + // deserialize AlarmId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AlarmId.class.equals(Integer.class) || AlarmId.class.equals(Long.class) || AlarmId.class.equals(Float.class) || AlarmId.class.equals(Double.class) || AlarmId.class.equals(Boolean.class) || AlarmId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((AlarmId.class.equals(Integer.class) || AlarmId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((AlarmId.class.equals(Float.class) || AlarmId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (AlarmId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (AlarmId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(AlarmId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'AlarmId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AlarmId'", e); + } + + // deserialize ApiKeyId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ApiKeyId.class.equals(Integer.class) || ApiKeyId.class.equals(Long.class) || ApiKeyId.class.equals(Float.class) || ApiKeyId.class.equals(Double.class) || ApiKeyId.class.equals(Boolean.class) || ApiKeyId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ApiKeyId.class.equals(Integer.class) || ApiKeyId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ApiKeyId.class.equals(Float.class) || ApiKeyId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (ApiKeyId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ApiKeyId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ApiKeyId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'ApiKeyId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ApiKeyId'", e); + } + + // deserialize ApiUsageStateId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ApiUsageStateId.class.equals(Integer.class) || ApiUsageStateId.class.equals(Long.class) || ApiUsageStateId.class.equals(Float.class) || ApiUsageStateId.class.equals(Double.class) || ApiUsageStateId.class.equals(Boolean.class) || ApiUsageStateId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ApiUsageStateId.class.equals(Integer.class) || ApiUsageStateId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ApiUsageStateId.class.equals(Float.class) || ApiUsageStateId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (ApiUsageStateId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ApiUsageStateId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ApiUsageStateId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'ApiUsageStateId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ApiUsageStateId'", e); + } + + // deserialize AssetId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AssetId.class.equals(Integer.class) || AssetId.class.equals(Long.class) || AssetId.class.equals(Float.class) || AssetId.class.equals(Double.class) || AssetId.class.equals(Boolean.class) || AssetId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((AssetId.class.equals(Integer.class) || AssetId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((AssetId.class.equals(Float.class) || AssetId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (AssetId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (AssetId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(AssetId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'AssetId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AssetId'", e); + } + + // deserialize AssetProfileId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AssetProfileId.class.equals(Integer.class) || AssetProfileId.class.equals(Long.class) || AssetProfileId.class.equals(Float.class) || AssetProfileId.class.equals(Double.class) || AssetProfileId.class.equals(Boolean.class) || AssetProfileId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((AssetProfileId.class.equals(Integer.class) || AssetProfileId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((AssetProfileId.class.equals(Float.class) || AssetProfileId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (AssetProfileId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (AssetProfileId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(AssetProfileId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'AssetProfileId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AssetProfileId'", e); + } + + // deserialize BlobEntityId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (BlobEntityId.class.equals(Integer.class) || BlobEntityId.class.equals(Long.class) || BlobEntityId.class.equals(Float.class) || BlobEntityId.class.equals(Double.class) || BlobEntityId.class.equals(Boolean.class) || BlobEntityId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((BlobEntityId.class.equals(Integer.class) || BlobEntityId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((BlobEntityId.class.equals(Float.class) || BlobEntityId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (BlobEntityId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (BlobEntityId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(BlobEntityId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'BlobEntityId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'BlobEntityId'", e); + } + + // deserialize CalculatedFieldId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CalculatedFieldId.class.equals(Integer.class) || CalculatedFieldId.class.equals(Long.class) || CalculatedFieldId.class.equals(Float.class) || CalculatedFieldId.class.equals(Double.class) || CalculatedFieldId.class.equals(Boolean.class) || CalculatedFieldId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CalculatedFieldId.class.equals(Integer.class) || CalculatedFieldId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CalculatedFieldId.class.equals(Float.class) || CalculatedFieldId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CalculatedFieldId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CalculatedFieldId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CalculatedFieldId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CalculatedFieldId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CalculatedFieldId'", e); + } + + // deserialize ConverterId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ConverterId.class.equals(Integer.class) || ConverterId.class.equals(Long.class) || ConverterId.class.equals(Float.class) || ConverterId.class.equals(Double.class) || ConverterId.class.equals(Boolean.class) || ConverterId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ConverterId.class.equals(Integer.class) || ConverterId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ConverterId.class.equals(Float.class) || ConverterId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (ConverterId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ConverterId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ConverterId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'ConverterId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ConverterId'", e); + } + + // deserialize CustomerId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CustomerId.class.equals(Integer.class) || CustomerId.class.equals(Long.class) || CustomerId.class.equals(Float.class) || CustomerId.class.equals(Double.class) || CustomerId.class.equals(Boolean.class) || CustomerId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CustomerId.class.equals(Integer.class) || CustomerId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CustomerId.class.equals(Float.class) || CustomerId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CustomerId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CustomerId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CustomerId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CustomerId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CustomerId'", e); + } + + // deserialize DashboardId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DashboardId.class.equals(Integer.class) || DashboardId.class.equals(Long.class) || DashboardId.class.equals(Float.class) || DashboardId.class.equals(Double.class) || DashboardId.class.equals(Boolean.class) || DashboardId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((DashboardId.class.equals(Integer.class) || DashboardId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((DashboardId.class.equals(Float.class) || DashboardId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (DashboardId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (DashboardId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(DashboardId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'DashboardId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'DashboardId'", e); + } + + // deserialize DeviceId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DeviceId.class.equals(Integer.class) || DeviceId.class.equals(Long.class) || DeviceId.class.equals(Float.class) || DeviceId.class.equals(Double.class) || DeviceId.class.equals(Boolean.class) || DeviceId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((DeviceId.class.equals(Integer.class) || DeviceId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((DeviceId.class.equals(Float.class) || DeviceId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (DeviceId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (DeviceId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(DeviceId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'DeviceId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'DeviceId'", e); + } + + // deserialize DeviceProfileId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DeviceProfileId.class.equals(Integer.class) || DeviceProfileId.class.equals(Long.class) || DeviceProfileId.class.equals(Float.class) || DeviceProfileId.class.equals(Double.class) || DeviceProfileId.class.equals(Boolean.class) || DeviceProfileId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((DeviceProfileId.class.equals(Integer.class) || DeviceProfileId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((DeviceProfileId.class.equals(Float.class) || DeviceProfileId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (DeviceProfileId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (DeviceProfileId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(DeviceProfileId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'DeviceProfileId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'DeviceProfileId'", e); + } + + // deserialize DomainId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DomainId.class.equals(Integer.class) || DomainId.class.equals(Long.class) || DomainId.class.equals(Float.class) || DomainId.class.equals(Double.class) || DomainId.class.equals(Boolean.class) || DomainId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((DomainId.class.equals(Integer.class) || DomainId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((DomainId.class.equals(Float.class) || DomainId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (DomainId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (DomainId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(DomainId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'DomainId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'DomainId'", e); + } + + // deserialize EdgeId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (EdgeId.class.equals(Integer.class) || EdgeId.class.equals(Long.class) || EdgeId.class.equals(Float.class) || EdgeId.class.equals(Double.class) || EdgeId.class.equals(Boolean.class) || EdgeId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((EdgeId.class.equals(Integer.class) || EdgeId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((EdgeId.class.equals(Float.class) || EdgeId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (EdgeId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (EdgeId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(EdgeId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'EdgeId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'EdgeId'", e); + } + + // deserialize EntityGroupId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (EntityGroupId.class.equals(Integer.class) || EntityGroupId.class.equals(Long.class) || EntityGroupId.class.equals(Float.class) || EntityGroupId.class.equals(Double.class) || EntityGroupId.class.equals(Boolean.class) || EntityGroupId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((EntityGroupId.class.equals(Integer.class) || EntityGroupId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((EntityGroupId.class.equals(Float.class) || EntityGroupId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (EntityGroupId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (EntityGroupId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(EntityGroupId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'EntityGroupId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'EntityGroupId'", e); + } + + // deserialize EntityViewId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (EntityViewId.class.equals(Integer.class) || EntityViewId.class.equals(Long.class) || EntityViewId.class.equals(Float.class) || EntityViewId.class.equals(Double.class) || EntityViewId.class.equals(Boolean.class) || EntityViewId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((EntityViewId.class.equals(Integer.class) || EntityViewId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((EntityViewId.class.equals(Float.class) || EntityViewId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (EntityViewId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (EntityViewId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(EntityViewId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'EntityViewId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'EntityViewId'", e); + } + + // deserialize GroupPermissionId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (GroupPermissionId.class.equals(Integer.class) || GroupPermissionId.class.equals(Long.class) || GroupPermissionId.class.equals(Float.class) || GroupPermissionId.class.equals(Double.class) || GroupPermissionId.class.equals(Boolean.class) || GroupPermissionId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((GroupPermissionId.class.equals(Integer.class) || GroupPermissionId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((GroupPermissionId.class.equals(Float.class) || GroupPermissionId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (GroupPermissionId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (GroupPermissionId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(GroupPermissionId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'GroupPermissionId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'GroupPermissionId'", e); + } + + // deserialize IntegrationId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IntegrationId.class.equals(Integer.class) || IntegrationId.class.equals(Long.class) || IntegrationId.class.equals(Float.class) || IntegrationId.class.equals(Double.class) || IntegrationId.class.equals(Boolean.class) || IntegrationId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((IntegrationId.class.equals(Integer.class) || IntegrationId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((IntegrationId.class.equals(Float.class) || IntegrationId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (IntegrationId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (IntegrationId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(IntegrationId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'IntegrationId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IntegrationId'", e); + } + + // deserialize JobId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (JobId.class.equals(Integer.class) || JobId.class.equals(Long.class) || JobId.class.equals(Float.class) || JobId.class.equals(Double.class) || JobId.class.equals(Boolean.class) || JobId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((JobId.class.equals(Integer.class) || JobId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((JobId.class.equals(Float.class) || JobId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (JobId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (JobId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(JobId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'JobId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'JobId'", e); + } + + // deserialize MobileAppBundleId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MobileAppBundleId.class.equals(Integer.class) || MobileAppBundleId.class.equals(Long.class) || MobileAppBundleId.class.equals(Float.class) || MobileAppBundleId.class.equals(Double.class) || MobileAppBundleId.class.equals(Boolean.class) || MobileAppBundleId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((MobileAppBundleId.class.equals(Integer.class) || MobileAppBundleId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((MobileAppBundleId.class.equals(Float.class) || MobileAppBundleId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (MobileAppBundleId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (MobileAppBundleId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(MobileAppBundleId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'MobileAppBundleId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'MobileAppBundleId'", e); + } + + // deserialize MobileAppId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MobileAppId.class.equals(Integer.class) || MobileAppId.class.equals(Long.class) || MobileAppId.class.equals(Float.class) || MobileAppId.class.equals(Double.class) || MobileAppId.class.equals(Boolean.class) || MobileAppId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((MobileAppId.class.equals(Integer.class) || MobileAppId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((MobileAppId.class.equals(Float.class) || MobileAppId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (MobileAppId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (MobileAppId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(MobileAppId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'MobileAppId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'MobileAppId'", e); + } + + // deserialize NotificationId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotificationId.class.equals(Integer.class) || NotificationId.class.equals(Long.class) || NotificationId.class.equals(Float.class) || NotificationId.class.equals(Double.class) || NotificationId.class.equals(Boolean.class) || NotificationId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotificationId.class.equals(Integer.class) || NotificationId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotificationId.class.equals(Float.class) || NotificationId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (NotificationId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotificationId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(NotificationId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotificationId'", e); + } + + // deserialize NotificationRequestId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotificationRequestId.class.equals(Integer.class) || NotificationRequestId.class.equals(Long.class) || NotificationRequestId.class.equals(Float.class) || NotificationRequestId.class.equals(Double.class) || NotificationRequestId.class.equals(Boolean.class) || NotificationRequestId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotificationRequestId.class.equals(Integer.class) || NotificationRequestId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotificationRequestId.class.equals(Float.class) || NotificationRequestId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (NotificationRequestId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotificationRequestId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(NotificationRequestId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationRequestId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotificationRequestId'", e); + } + + // deserialize NotificationRuleId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotificationRuleId.class.equals(Integer.class) || NotificationRuleId.class.equals(Long.class) || NotificationRuleId.class.equals(Float.class) || NotificationRuleId.class.equals(Double.class) || NotificationRuleId.class.equals(Boolean.class) || NotificationRuleId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotificationRuleId.class.equals(Integer.class) || NotificationRuleId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotificationRuleId.class.equals(Float.class) || NotificationRuleId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (NotificationRuleId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotificationRuleId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(NotificationRuleId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationRuleId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotificationRuleId'", e); + } + + // deserialize NotificationTargetId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotificationTargetId.class.equals(Integer.class) || NotificationTargetId.class.equals(Long.class) || NotificationTargetId.class.equals(Float.class) || NotificationTargetId.class.equals(Double.class) || NotificationTargetId.class.equals(Boolean.class) || NotificationTargetId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotificationTargetId.class.equals(Integer.class) || NotificationTargetId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotificationTargetId.class.equals(Float.class) || NotificationTargetId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (NotificationTargetId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotificationTargetId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(NotificationTargetId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationTargetId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotificationTargetId'", e); + } + + // deserialize NotificationTemplateId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotificationTemplateId.class.equals(Integer.class) || NotificationTemplateId.class.equals(Long.class) || NotificationTemplateId.class.equals(Float.class) || NotificationTemplateId.class.equals(Double.class) || NotificationTemplateId.class.equals(Boolean.class) || NotificationTemplateId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotificationTemplateId.class.equals(Integer.class) || NotificationTemplateId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotificationTemplateId.class.equals(Float.class) || NotificationTemplateId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (NotificationTemplateId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotificationTemplateId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(NotificationTemplateId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationTemplateId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotificationTemplateId'", e); + } + + // deserialize OAuth2ClientId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (OAuth2ClientId.class.equals(Integer.class) || OAuth2ClientId.class.equals(Long.class) || OAuth2ClientId.class.equals(Float.class) || OAuth2ClientId.class.equals(Double.class) || OAuth2ClientId.class.equals(Boolean.class) || OAuth2ClientId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((OAuth2ClientId.class.equals(Integer.class) || OAuth2ClientId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((OAuth2ClientId.class.equals(Float.class) || OAuth2ClientId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (OAuth2ClientId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (OAuth2ClientId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(OAuth2ClientId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'OAuth2ClientId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'OAuth2ClientId'", e); + } + + // deserialize OtaPackageId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (OtaPackageId.class.equals(Integer.class) || OtaPackageId.class.equals(Long.class) || OtaPackageId.class.equals(Float.class) || OtaPackageId.class.equals(Double.class) || OtaPackageId.class.equals(Boolean.class) || OtaPackageId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((OtaPackageId.class.equals(Integer.class) || OtaPackageId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((OtaPackageId.class.equals(Float.class) || OtaPackageId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (OtaPackageId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (OtaPackageId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(OtaPackageId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'OtaPackageId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'OtaPackageId'", e); + } + + // deserialize QueueId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (QueueId.class.equals(Integer.class) || QueueId.class.equals(Long.class) || QueueId.class.equals(Float.class) || QueueId.class.equals(Double.class) || QueueId.class.equals(Boolean.class) || QueueId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((QueueId.class.equals(Integer.class) || QueueId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((QueueId.class.equals(Float.class) || QueueId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (QueueId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (QueueId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(QueueId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'QueueId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'QueueId'", e); + } + + // deserialize QueueStatsId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (QueueStatsId.class.equals(Integer.class) || QueueStatsId.class.equals(Long.class) || QueueStatsId.class.equals(Float.class) || QueueStatsId.class.equals(Double.class) || QueueStatsId.class.equals(Boolean.class) || QueueStatsId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((QueueStatsId.class.equals(Integer.class) || QueueStatsId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((QueueStatsId.class.equals(Float.class) || QueueStatsId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (QueueStatsId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (QueueStatsId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(QueueStatsId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'QueueStatsId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'QueueStatsId'", e); + } + + // deserialize ReportId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ReportId.class.equals(Integer.class) || ReportId.class.equals(Long.class) || ReportId.class.equals(Float.class) || ReportId.class.equals(Double.class) || ReportId.class.equals(Boolean.class) || ReportId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ReportId.class.equals(Integer.class) || ReportId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ReportId.class.equals(Float.class) || ReportId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (ReportId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ReportId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ReportId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'ReportId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ReportId'", e); + } + + // deserialize ReportTemplateId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ReportTemplateId.class.equals(Integer.class) || ReportTemplateId.class.equals(Long.class) || ReportTemplateId.class.equals(Float.class) || ReportTemplateId.class.equals(Double.class) || ReportTemplateId.class.equals(Boolean.class) || ReportTemplateId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ReportTemplateId.class.equals(Integer.class) || ReportTemplateId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ReportTemplateId.class.equals(Float.class) || ReportTemplateId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (ReportTemplateId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ReportTemplateId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ReportTemplateId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'ReportTemplateId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ReportTemplateId'", e); + } + + // deserialize RoleId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (RoleId.class.equals(Integer.class) || RoleId.class.equals(Long.class) || RoleId.class.equals(Float.class) || RoleId.class.equals(Double.class) || RoleId.class.equals(Boolean.class) || RoleId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((RoleId.class.equals(Integer.class) || RoleId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((RoleId.class.equals(Float.class) || RoleId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (RoleId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (RoleId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(RoleId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'RoleId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'RoleId'", e); + } + + // deserialize RpcId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (RpcId.class.equals(Integer.class) || RpcId.class.equals(Long.class) || RpcId.class.equals(Float.class) || RpcId.class.equals(Double.class) || RpcId.class.equals(Boolean.class) || RpcId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((RpcId.class.equals(Integer.class) || RpcId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((RpcId.class.equals(Float.class) || RpcId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (RpcId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (RpcId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(RpcId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'RpcId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'RpcId'", e); + } + + // deserialize RuleChainId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (RuleChainId.class.equals(Integer.class) || RuleChainId.class.equals(Long.class) || RuleChainId.class.equals(Float.class) || RuleChainId.class.equals(Double.class) || RuleChainId.class.equals(Boolean.class) || RuleChainId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((RuleChainId.class.equals(Integer.class) || RuleChainId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((RuleChainId.class.equals(Float.class) || RuleChainId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (RuleChainId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (RuleChainId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(RuleChainId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'RuleChainId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'RuleChainId'", e); + } + + // deserialize RuleNodeId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (RuleNodeId.class.equals(Integer.class) || RuleNodeId.class.equals(Long.class) || RuleNodeId.class.equals(Float.class) || RuleNodeId.class.equals(Double.class) || RuleNodeId.class.equals(Boolean.class) || RuleNodeId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((RuleNodeId.class.equals(Integer.class) || RuleNodeId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((RuleNodeId.class.equals(Float.class) || RuleNodeId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (RuleNodeId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (RuleNodeId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(RuleNodeId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'RuleNodeId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'RuleNodeId'", e); + } + + // deserialize SchedulerEventId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SchedulerEventId.class.equals(Integer.class) || SchedulerEventId.class.equals(Long.class) || SchedulerEventId.class.equals(Float.class) || SchedulerEventId.class.equals(Double.class) || SchedulerEventId.class.equals(Boolean.class) || SchedulerEventId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SchedulerEventId.class.equals(Integer.class) || SchedulerEventId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SchedulerEventId.class.equals(Float.class) || SchedulerEventId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (SchedulerEventId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SchedulerEventId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(SchedulerEventId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'SchedulerEventId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SchedulerEventId'", e); + } + + // deserialize SecretId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecretId.class.equals(Integer.class) || SecretId.class.equals(Long.class) || SecretId.class.equals(Float.class) || SecretId.class.equals(Double.class) || SecretId.class.equals(Boolean.class) || SecretId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SecretId.class.equals(Integer.class) || SecretId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SecretId.class.equals(Float.class) || SecretId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (SecretId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SecretId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(SecretId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'SecretId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SecretId'", e); + } + + // deserialize TbResourceId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (TbResourceId.class.equals(Integer.class) || TbResourceId.class.equals(Long.class) || TbResourceId.class.equals(Float.class) || TbResourceId.class.equals(Double.class) || TbResourceId.class.equals(Boolean.class) || TbResourceId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((TbResourceId.class.equals(Integer.class) || TbResourceId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((TbResourceId.class.equals(Float.class) || TbResourceId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (TbResourceId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (TbResourceId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(TbResourceId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'TbResourceId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'TbResourceId'", e); + } + + // deserialize TenantId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (TenantId.class.equals(Integer.class) || TenantId.class.equals(Long.class) || TenantId.class.equals(Float.class) || TenantId.class.equals(Double.class) || TenantId.class.equals(Boolean.class) || TenantId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((TenantId.class.equals(Integer.class) || TenantId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((TenantId.class.equals(Float.class) || TenantId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (TenantId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (TenantId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(TenantId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'TenantId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'TenantId'", e); + } + + // deserialize TenantProfileId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (TenantProfileId.class.equals(Integer.class) || TenantProfileId.class.equals(Long.class) || TenantProfileId.class.equals(Float.class) || TenantProfileId.class.equals(Double.class) || TenantProfileId.class.equals(Boolean.class) || TenantProfileId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((TenantProfileId.class.equals(Integer.class) || TenantProfileId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((TenantProfileId.class.equals(Float.class) || TenantProfileId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (TenantProfileId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (TenantProfileId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(TenantProfileId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'TenantProfileId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'TenantProfileId'", e); + } + + // deserialize UserId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (UserId.class.equals(Integer.class) || UserId.class.equals(Long.class) || UserId.class.equals(Float.class) || UserId.class.equals(Double.class) || UserId.class.equals(Boolean.class) || UserId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((UserId.class.equals(Integer.class) || UserId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((UserId.class.equals(Float.class) || UserId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (UserId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (UserId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(UserId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'UserId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'UserId'", e); + } + + // deserialize WidgetTypeId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (WidgetTypeId.class.equals(Integer.class) || WidgetTypeId.class.equals(Long.class) || WidgetTypeId.class.equals(Float.class) || WidgetTypeId.class.equals(Double.class) || WidgetTypeId.class.equals(Boolean.class) || WidgetTypeId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((WidgetTypeId.class.equals(Integer.class) || WidgetTypeId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((WidgetTypeId.class.equals(Float.class) || WidgetTypeId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (WidgetTypeId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (WidgetTypeId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(WidgetTypeId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'WidgetTypeId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'WidgetTypeId'", e); + } + + // deserialize WidgetsBundleId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (WidgetsBundleId.class.equals(Integer.class) || WidgetsBundleId.class.equals(Long.class) || WidgetsBundleId.class.equals(Float.class) || WidgetsBundleId.class.equals(Double.class) || WidgetsBundleId.class.equals(Boolean.class) || WidgetsBundleId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((WidgetsBundleId.class.equals(Integer.class) || WidgetsBundleId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((WidgetsBundleId.class.equals(Float.class) || WidgetsBundleId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (WidgetsBundleId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (WidgetsBundleId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(WidgetsBundleId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'WidgetsBundleId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'WidgetsBundleId'", e); + } + + if (match == 1) { + EntityGroupInfoOwnerIdsInner ret = new EntityGroupInfoOwnerIdsInner(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format(java.util.Locale.ROOT, "Failed deserialization for EntityGroupInfoOwnerIdsInner: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public EntityGroupInfoOwnerIdsInner getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "EntityGroupInfoOwnerIdsInner cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public EntityGroupInfoOwnerIdsInner() { + super("oneOf", Boolean.FALSE); + } + + public EntityGroupInfoOwnerIdsInner(AdminSettingsId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(AiModelId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(AlarmId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(ApiKeyId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(ApiUsageStateId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(AssetId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(AssetProfileId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(BlobEntityId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(CalculatedFieldId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(ConverterId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(CustomerId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(DashboardId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(DeviceId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(DeviceProfileId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(DomainId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(EdgeId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(EntityGroupId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(EntityViewId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(GroupPermissionId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(IntegrationId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(JobId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(MobileAppBundleId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(MobileAppId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(NotificationId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(NotificationRequestId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(NotificationRuleId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(NotificationTargetId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(NotificationTemplateId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(OAuth2ClientId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(OtaPackageId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(QueueId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(QueueStatsId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(ReportId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(ReportTemplateId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(RoleId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(RpcId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(RuleChainId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(RuleNodeId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(SchedulerEventId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(SecretId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(TbResourceId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(TenantId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(TenantProfileId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(UserId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(WidgetTypeId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(WidgetsBundleId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("AdminSettingsId", AdminSettingsId.class); + schemas.put("AiModelId", AiModelId.class); + schemas.put("AlarmId", AlarmId.class); + schemas.put("ApiKeyId", ApiKeyId.class); + schemas.put("ApiUsageStateId", ApiUsageStateId.class); + schemas.put("AssetId", AssetId.class); + schemas.put("AssetProfileId", AssetProfileId.class); + schemas.put("BlobEntityId", BlobEntityId.class); + schemas.put("CalculatedFieldId", CalculatedFieldId.class); + schemas.put("ConverterId", ConverterId.class); + schemas.put("CustomerId", CustomerId.class); + schemas.put("DashboardId", DashboardId.class); + schemas.put("DeviceId", DeviceId.class); + schemas.put("DeviceProfileId", DeviceProfileId.class); + schemas.put("DomainId", DomainId.class); + schemas.put("EdgeId", EdgeId.class); + schemas.put("EntityGroupId", EntityGroupId.class); + schemas.put("EntityViewId", EntityViewId.class); + schemas.put("GroupPermissionId", GroupPermissionId.class); + schemas.put("IntegrationId", IntegrationId.class); + schemas.put("JobId", JobId.class); + schemas.put("MobileAppBundleId", MobileAppBundleId.class); + schemas.put("MobileAppId", MobileAppId.class); + schemas.put("NotificationId", NotificationId.class); + schemas.put("NotificationRequestId", NotificationRequestId.class); + schemas.put("NotificationRuleId", NotificationRuleId.class); + schemas.put("NotificationTargetId", NotificationTargetId.class); + schemas.put("NotificationTemplateId", NotificationTemplateId.class); + schemas.put("OAuth2ClientId", OAuth2ClientId.class); + schemas.put("OtaPackageId", OtaPackageId.class); + schemas.put("QueueId", QueueId.class); + schemas.put("QueueStatsId", QueueStatsId.class); + schemas.put("ReportId", ReportId.class); + schemas.put("ReportTemplateId", ReportTemplateId.class); + schemas.put("RoleId", RoleId.class); + schemas.put("RpcId", RpcId.class); + schemas.put("RuleChainId", RuleChainId.class); + schemas.put("RuleNodeId", RuleNodeId.class); + schemas.put("SchedulerEventId", SchedulerEventId.class); + schemas.put("SecretId", SecretId.class); + schemas.put("TbResourceId", TbResourceId.class); + schemas.put("TenantId", TenantId.class); + schemas.put("TenantProfileId", TenantProfileId.class); + schemas.put("UserId", UserId.class); + schemas.put("WidgetTypeId", WidgetTypeId.class); + schemas.put("WidgetsBundleId", WidgetsBundleId.class); + JSON.registerDescendants(EntityGroupInfoOwnerIdsInner.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return EntityGroupInfoOwnerIdsInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BlobEntityId, CalculatedFieldId, ConverterId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(AdminSettingsId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(AiModelId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(AlarmId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(ApiKeyId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(ApiUsageStateId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(AssetId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(AssetProfileId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(BlobEntityId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CalculatedFieldId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(ConverterId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CustomerId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(DashboardId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(DeviceId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(DeviceProfileId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(DomainId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(EdgeId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(EntityGroupId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(EntityViewId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(GroupPermissionId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(IntegrationId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(JobId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(MobileAppBundleId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(MobileAppId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(NotificationId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(NotificationRequestId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(NotificationRuleId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(NotificationTargetId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(NotificationTemplateId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(OAuth2ClientId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(OtaPackageId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(QueueId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(QueueStatsId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(ReportId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(ReportTemplateId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(RoleId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(RpcId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(RuleChainId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(RuleNodeId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(SchedulerEventId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(SecretId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(TbResourceId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(TenantId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(TenantProfileId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UserId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(WidgetTypeId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(WidgetsBundleId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BlobEntityId, CalculatedFieldId, ConverterId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId"); + } + + /** + * Get the actual instance, which can be the following: + * AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BlobEntityId, CalculatedFieldId, ConverterId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId + * + * @return The actual instance (AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BlobEntityId, CalculatedFieldId, ConverterId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AdminSettingsId`. If the actual instance is not `AdminSettingsId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AdminSettingsId` + * @throws ClassCastException if the instance is not `AdminSettingsId` + */ + public AdminSettingsId getAdminSettingsId() throws ClassCastException { + return (AdminSettingsId)super.getActualInstance(); + } + + /** + * Get the actual instance of `AiModelId`. If the actual instance is not `AiModelId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AiModelId` + * @throws ClassCastException if the instance is not `AiModelId` + */ + public AiModelId getAiModelId() throws ClassCastException { + return (AiModelId)super.getActualInstance(); + } + + /** + * Get the actual instance of `AlarmId`. If the actual instance is not `AlarmId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AlarmId` + * @throws ClassCastException if the instance is not `AlarmId` + */ + public AlarmId getAlarmId() throws ClassCastException { + return (AlarmId)super.getActualInstance(); + } + + /** + * Get the actual instance of `ApiKeyId`. If the actual instance is not `ApiKeyId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ApiKeyId` + * @throws ClassCastException if the instance is not `ApiKeyId` + */ + public ApiKeyId getApiKeyId() throws ClassCastException { + return (ApiKeyId)super.getActualInstance(); + } + + /** + * Get the actual instance of `ApiUsageStateId`. If the actual instance is not `ApiUsageStateId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ApiUsageStateId` + * @throws ClassCastException if the instance is not `ApiUsageStateId` + */ + public ApiUsageStateId getApiUsageStateId() throws ClassCastException { + return (ApiUsageStateId)super.getActualInstance(); + } + + /** + * Get the actual instance of `AssetId`. If the actual instance is not `AssetId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AssetId` + * @throws ClassCastException if the instance is not `AssetId` + */ + public AssetId getAssetId() throws ClassCastException { + return (AssetId)super.getActualInstance(); + } + + /** + * Get the actual instance of `AssetProfileId`. If the actual instance is not `AssetProfileId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AssetProfileId` + * @throws ClassCastException if the instance is not `AssetProfileId` + */ + public AssetProfileId getAssetProfileId() throws ClassCastException { + return (AssetProfileId)super.getActualInstance(); + } + + /** + * Get the actual instance of `BlobEntityId`. If the actual instance is not `BlobEntityId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `BlobEntityId` + * @throws ClassCastException if the instance is not `BlobEntityId` + */ + public BlobEntityId getBlobEntityId() throws ClassCastException { + return (BlobEntityId)super.getActualInstance(); + } + + /** + * Get the actual instance of `CalculatedFieldId`. If the actual instance is not `CalculatedFieldId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CalculatedFieldId` + * @throws ClassCastException if the instance is not `CalculatedFieldId` + */ + public CalculatedFieldId getCalculatedFieldId() throws ClassCastException { + return (CalculatedFieldId)super.getActualInstance(); + } + + /** + * Get the actual instance of `ConverterId`. If the actual instance is not `ConverterId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ConverterId` + * @throws ClassCastException if the instance is not `ConverterId` + */ + public ConverterId getConverterId() throws ClassCastException { + return (ConverterId)super.getActualInstance(); + } + + /** + * Get the actual instance of `CustomerId`. If the actual instance is not `CustomerId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CustomerId` + * @throws ClassCastException if the instance is not `CustomerId` + */ + public CustomerId getCustomerId() throws ClassCastException { + return (CustomerId)super.getActualInstance(); + } + + /** + * Get the actual instance of `DashboardId`. If the actual instance is not `DashboardId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `DashboardId` + * @throws ClassCastException if the instance is not `DashboardId` + */ + public DashboardId getDashboardId() throws ClassCastException { + return (DashboardId)super.getActualInstance(); + } + + /** + * Get the actual instance of `DeviceId`. If the actual instance is not `DeviceId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `DeviceId` + * @throws ClassCastException if the instance is not `DeviceId` + */ + public DeviceId getDeviceId() throws ClassCastException { + return (DeviceId)super.getActualInstance(); + } + + /** + * Get the actual instance of `DeviceProfileId`. If the actual instance is not `DeviceProfileId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `DeviceProfileId` + * @throws ClassCastException if the instance is not `DeviceProfileId` + */ + public DeviceProfileId getDeviceProfileId() throws ClassCastException { + return (DeviceProfileId)super.getActualInstance(); + } + + /** + * Get the actual instance of `DomainId`. If the actual instance is not `DomainId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `DomainId` + * @throws ClassCastException if the instance is not `DomainId` + */ + public DomainId getDomainId() throws ClassCastException { + return (DomainId)super.getActualInstance(); + } + + /** + * Get the actual instance of `EdgeId`. If the actual instance is not `EdgeId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `EdgeId` + * @throws ClassCastException if the instance is not `EdgeId` + */ + public EdgeId getEdgeId() throws ClassCastException { + return (EdgeId)super.getActualInstance(); + } + + /** + * Get the actual instance of `EntityGroupId`. If the actual instance is not `EntityGroupId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `EntityGroupId` + * @throws ClassCastException if the instance is not `EntityGroupId` + */ + public EntityGroupId getEntityGroupId() throws ClassCastException { + return (EntityGroupId)super.getActualInstance(); + } + + /** + * Get the actual instance of `EntityViewId`. If the actual instance is not `EntityViewId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `EntityViewId` + * @throws ClassCastException if the instance is not `EntityViewId` + */ + public EntityViewId getEntityViewId() throws ClassCastException { + return (EntityViewId)super.getActualInstance(); + } + + /** + * Get the actual instance of `GroupPermissionId`. If the actual instance is not `GroupPermissionId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `GroupPermissionId` + * @throws ClassCastException if the instance is not `GroupPermissionId` + */ + public GroupPermissionId getGroupPermissionId() throws ClassCastException { + return (GroupPermissionId)super.getActualInstance(); + } + + /** + * Get the actual instance of `IntegrationId`. If the actual instance is not `IntegrationId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IntegrationId` + * @throws ClassCastException if the instance is not `IntegrationId` + */ + public IntegrationId getIntegrationId() throws ClassCastException { + return (IntegrationId)super.getActualInstance(); + } + + /** + * Get the actual instance of `JobId`. If the actual instance is not `JobId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `JobId` + * @throws ClassCastException if the instance is not `JobId` + */ + public JobId getJobId() throws ClassCastException { + return (JobId)super.getActualInstance(); + } + + /** + * Get the actual instance of `MobileAppBundleId`. If the actual instance is not `MobileAppBundleId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MobileAppBundleId` + * @throws ClassCastException if the instance is not `MobileAppBundleId` + */ + public MobileAppBundleId getMobileAppBundleId() throws ClassCastException { + return (MobileAppBundleId)super.getActualInstance(); + } + + /** + * Get the actual instance of `MobileAppId`. If the actual instance is not `MobileAppId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MobileAppId` + * @throws ClassCastException if the instance is not `MobileAppId` + */ + public MobileAppId getMobileAppId() throws ClassCastException { + return (MobileAppId)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationId`. If the actual instance is not `NotificationId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationId` + * @throws ClassCastException if the instance is not `NotificationId` + */ + public NotificationId getNotificationId() throws ClassCastException { + return (NotificationId)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationRequestId`. If the actual instance is not `NotificationRequestId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationRequestId` + * @throws ClassCastException if the instance is not `NotificationRequestId` + */ + public NotificationRequestId getNotificationRequestId() throws ClassCastException { + return (NotificationRequestId)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationRuleId`. If the actual instance is not `NotificationRuleId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationRuleId` + * @throws ClassCastException if the instance is not `NotificationRuleId` + */ + public NotificationRuleId getNotificationRuleId() throws ClassCastException { + return (NotificationRuleId)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationTargetId`. If the actual instance is not `NotificationTargetId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationTargetId` + * @throws ClassCastException if the instance is not `NotificationTargetId` + */ + public NotificationTargetId getNotificationTargetId() throws ClassCastException { + return (NotificationTargetId)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationTemplateId`. If the actual instance is not `NotificationTemplateId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationTemplateId` + * @throws ClassCastException if the instance is not `NotificationTemplateId` + */ + public NotificationTemplateId getNotificationTemplateId() throws ClassCastException { + return (NotificationTemplateId)super.getActualInstance(); + } + + /** + * Get the actual instance of `OAuth2ClientId`. If the actual instance is not `OAuth2ClientId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `OAuth2ClientId` + * @throws ClassCastException if the instance is not `OAuth2ClientId` + */ + public OAuth2ClientId getOAuth2ClientId() throws ClassCastException { + return (OAuth2ClientId)super.getActualInstance(); + } + + /** + * Get the actual instance of `OtaPackageId`. If the actual instance is not `OtaPackageId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `OtaPackageId` + * @throws ClassCastException if the instance is not `OtaPackageId` + */ + public OtaPackageId getOtaPackageId() throws ClassCastException { + return (OtaPackageId)super.getActualInstance(); + } + + /** + * Get the actual instance of `QueueId`. If the actual instance is not `QueueId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `QueueId` + * @throws ClassCastException if the instance is not `QueueId` + */ + public QueueId getQueueId() throws ClassCastException { + return (QueueId)super.getActualInstance(); + } + + /** + * Get the actual instance of `QueueStatsId`. If the actual instance is not `QueueStatsId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `QueueStatsId` + * @throws ClassCastException if the instance is not `QueueStatsId` + */ + public QueueStatsId getQueueStatsId() throws ClassCastException { + return (QueueStatsId)super.getActualInstance(); + } + + /** + * Get the actual instance of `ReportId`. If the actual instance is not `ReportId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ReportId` + * @throws ClassCastException if the instance is not `ReportId` + */ + public ReportId getReportId() throws ClassCastException { + return (ReportId)super.getActualInstance(); + } + + /** + * Get the actual instance of `ReportTemplateId`. If the actual instance is not `ReportTemplateId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ReportTemplateId` + * @throws ClassCastException if the instance is not `ReportTemplateId` + */ + public ReportTemplateId getReportTemplateId() throws ClassCastException { + return (ReportTemplateId)super.getActualInstance(); + } + + /** + * Get the actual instance of `RoleId`. If the actual instance is not `RoleId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `RoleId` + * @throws ClassCastException if the instance is not `RoleId` + */ + public RoleId getRoleId() throws ClassCastException { + return (RoleId)super.getActualInstance(); + } + + /** + * Get the actual instance of `RpcId`. If the actual instance is not `RpcId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `RpcId` + * @throws ClassCastException if the instance is not `RpcId` + */ + public RpcId getRpcId() throws ClassCastException { + return (RpcId)super.getActualInstance(); + } + + /** + * Get the actual instance of `RuleChainId`. If the actual instance is not `RuleChainId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `RuleChainId` + * @throws ClassCastException if the instance is not `RuleChainId` + */ + public RuleChainId getRuleChainId() throws ClassCastException { + return (RuleChainId)super.getActualInstance(); + } + + /** + * Get the actual instance of `RuleNodeId`. If the actual instance is not `RuleNodeId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `RuleNodeId` + * @throws ClassCastException if the instance is not `RuleNodeId` + */ + public RuleNodeId getRuleNodeId() throws ClassCastException { + return (RuleNodeId)super.getActualInstance(); + } + + /** + * Get the actual instance of `SchedulerEventId`. If the actual instance is not `SchedulerEventId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SchedulerEventId` + * @throws ClassCastException if the instance is not `SchedulerEventId` + */ + public SchedulerEventId getSchedulerEventId() throws ClassCastException { + return (SchedulerEventId)super.getActualInstance(); + } + + /** + * Get the actual instance of `SecretId`. If the actual instance is not `SecretId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SecretId` + * @throws ClassCastException if the instance is not `SecretId` + */ + public SecretId getSecretId() throws ClassCastException { + return (SecretId)super.getActualInstance(); + } + + /** + * Get the actual instance of `TbResourceId`. If the actual instance is not `TbResourceId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `TbResourceId` + * @throws ClassCastException if the instance is not `TbResourceId` + */ + public TbResourceId getTbResourceId() throws ClassCastException { + return (TbResourceId)super.getActualInstance(); + } + + /** + * Get the actual instance of `TenantId`. If the actual instance is not `TenantId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `TenantId` + * @throws ClassCastException if the instance is not `TenantId` + */ + public TenantId getTenantId() throws ClassCastException { + return (TenantId)super.getActualInstance(); + } + + /** + * Get the actual instance of `TenantProfileId`. If the actual instance is not `TenantProfileId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `TenantProfileId` + * @throws ClassCastException if the instance is not `TenantProfileId` + */ + public TenantProfileId getTenantProfileId() throws ClassCastException { + return (TenantProfileId)super.getActualInstance(); + } + + /** + * Get the actual instance of `UserId`. If the actual instance is not `UserId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `UserId` + * @throws ClassCastException if the instance is not `UserId` + */ + public UserId getUserId() throws ClassCastException { + return (UserId)super.getActualInstance(); + } + + /** + * Get the actual instance of `WidgetTypeId`. If the actual instance is not `WidgetTypeId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `WidgetTypeId` + * @throws ClassCastException if the instance is not `WidgetTypeId` + */ + public WidgetTypeId getWidgetTypeId() throws ClassCastException { + return (WidgetTypeId)super.getActualInstance(); + } + + /** + * Get the actual instance of `WidgetsBundleId`. If the actual instance is not `WidgetsBundleId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `WidgetsBundleId` + * @throws ClassCastException if the instance is not `WidgetsBundleId` + */ + public WidgetsBundleId getWidgetsBundleId() throws ClassCastException { + return (WidgetsBundleId)super.getActualInstance(); + } + + + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof AdminSettingsId) { + if (getActualInstance() != null) { + joiner.add(((AdminSettingsId)getActualInstance()).toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof AiModelId) { + if (getActualInstance() != null) { + joiner.add(((AiModelId)getActualInstance()).toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof AlarmId) { + if (getActualInstance() != null) { + joiner.add(((AlarmId)getActualInstance()).toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ApiKeyId) { + if (getActualInstance() != null) { + joiner.add(((ApiKeyId)getActualInstance()).toUrlQueryString(prefix + "one_of_3" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ApiUsageStateId) { + if (getActualInstance() != null) { + joiner.add(((ApiUsageStateId)getActualInstance()).toUrlQueryString(prefix + "one_of_4" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof AssetId) { + if (getActualInstance() != null) { + joiner.add(((AssetId)getActualInstance()).toUrlQueryString(prefix + "one_of_5" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof AssetProfileId) { + if (getActualInstance() != null) { + joiner.add(((AssetProfileId)getActualInstance()).toUrlQueryString(prefix + "one_of_6" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof BlobEntityId) { + if (getActualInstance() != null) { + joiner.add(((BlobEntityId)getActualInstance()).toUrlQueryString(prefix + "one_of_7" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CalculatedFieldId) { + if (getActualInstance() != null) { + joiner.add(((CalculatedFieldId)getActualInstance()).toUrlQueryString(prefix + "one_of_8" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ConverterId) { + if (getActualInstance() != null) { + joiner.add(((ConverterId)getActualInstance()).toUrlQueryString(prefix + "one_of_9" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CustomerId) { + if (getActualInstance() != null) { + joiner.add(((CustomerId)getActualInstance()).toUrlQueryString(prefix + "one_of_10" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof DashboardId) { + if (getActualInstance() != null) { + joiner.add(((DashboardId)getActualInstance()).toUrlQueryString(prefix + "one_of_11" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof DeviceId) { + if (getActualInstance() != null) { + joiner.add(((DeviceId)getActualInstance()).toUrlQueryString(prefix + "one_of_12" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof DeviceProfileId) { + if (getActualInstance() != null) { + joiner.add(((DeviceProfileId)getActualInstance()).toUrlQueryString(prefix + "one_of_13" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof DomainId) { + if (getActualInstance() != null) { + joiner.add(((DomainId)getActualInstance()).toUrlQueryString(prefix + "one_of_14" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof EdgeId) { + if (getActualInstance() != null) { + joiner.add(((EdgeId)getActualInstance()).toUrlQueryString(prefix + "one_of_15" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof EntityGroupId) { + if (getActualInstance() != null) { + joiner.add(((EntityGroupId)getActualInstance()).toUrlQueryString(prefix + "one_of_16" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof EntityViewId) { + if (getActualInstance() != null) { + joiner.add(((EntityViewId)getActualInstance()).toUrlQueryString(prefix + "one_of_17" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof GroupPermissionId) { + if (getActualInstance() != null) { + joiner.add(((GroupPermissionId)getActualInstance()).toUrlQueryString(prefix + "one_of_18" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof IntegrationId) { + if (getActualInstance() != null) { + joiner.add(((IntegrationId)getActualInstance()).toUrlQueryString(prefix + "one_of_19" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof JobId) { + if (getActualInstance() != null) { + joiner.add(((JobId)getActualInstance()).toUrlQueryString(prefix + "one_of_20" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof MobileAppBundleId) { + if (getActualInstance() != null) { + joiner.add(((MobileAppBundleId)getActualInstance()).toUrlQueryString(prefix + "one_of_21" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof MobileAppId) { + if (getActualInstance() != null) { + joiner.add(((MobileAppId)getActualInstance()).toUrlQueryString(prefix + "one_of_22" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof NotificationId) { + if (getActualInstance() != null) { + joiner.add(((NotificationId)getActualInstance()).toUrlQueryString(prefix + "one_of_23" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof NotificationRequestId) { + if (getActualInstance() != null) { + joiner.add(((NotificationRequestId)getActualInstance()).toUrlQueryString(prefix + "one_of_24" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof NotificationRuleId) { + if (getActualInstance() != null) { + joiner.add(((NotificationRuleId)getActualInstance()).toUrlQueryString(prefix + "one_of_25" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof NotificationTargetId) { + if (getActualInstance() != null) { + joiner.add(((NotificationTargetId)getActualInstance()).toUrlQueryString(prefix + "one_of_26" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof NotificationTemplateId) { + if (getActualInstance() != null) { + joiner.add(((NotificationTemplateId)getActualInstance()).toUrlQueryString(prefix + "one_of_27" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof OAuth2ClientId) { + if (getActualInstance() != null) { + joiner.add(((OAuth2ClientId)getActualInstance()).toUrlQueryString(prefix + "one_of_28" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof OtaPackageId) { + if (getActualInstance() != null) { + joiner.add(((OtaPackageId)getActualInstance()).toUrlQueryString(prefix + "one_of_29" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof QueueId) { + if (getActualInstance() != null) { + joiner.add(((QueueId)getActualInstance()).toUrlQueryString(prefix + "one_of_30" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof QueueStatsId) { + if (getActualInstance() != null) { + joiner.add(((QueueStatsId)getActualInstance()).toUrlQueryString(prefix + "one_of_31" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ReportId) { + if (getActualInstance() != null) { + joiner.add(((ReportId)getActualInstance()).toUrlQueryString(prefix + "one_of_32" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ReportTemplateId) { + if (getActualInstance() != null) { + joiner.add(((ReportTemplateId)getActualInstance()).toUrlQueryString(prefix + "one_of_33" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof RoleId) { + if (getActualInstance() != null) { + joiner.add(((RoleId)getActualInstance()).toUrlQueryString(prefix + "one_of_34" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof RpcId) { + if (getActualInstance() != null) { + joiner.add(((RpcId)getActualInstance()).toUrlQueryString(prefix + "one_of_35" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof RuleChainId) { + if (getActualInstance() != null) { + joiner.add(((RuleChainId)getActualInstance()).toUrlQueryString(prefix + "one_of_36" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof RuleNodeId) { + if (getActualInstance() != null) { + joiner.add(((RuleNodeId)getActualInstance()).toUrlQueryString(prefix + "one_of_37" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof SchedulerEventId) { + if (getActualInstance() != null) { + joiner.add(((SchedulerEventId)getActualInstance()).toUrlQueryString(prefix + "one_of_38" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof SecretId) { + if (getActualInstance() != null) { + joiner.add(((SecretId)getActualInstance()).toUrlQueryString(prefix + "one_of_39" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof TbResourceId) { + if (getActualInstance() != null) { + joiner.add(((TbResourceId)getActualInstance()).toUrlQueryString(prefix + "one_of_40" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof TenantId) { + if (getActualInstance() != null) { + joiner.add(((TenantId)getActualInstance()).toUrlQueryString(prefix + "one_of_41" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof TenantProfileId) { + if (getActualInstance() != null) { + joiner.add(((TenantProfileId)getActualInstance()).toUrlQueryString(prefix + "one_of_42" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof UserId) { + if (getActualInstance() != null) { + joiner.add(((UserId)getActualInstance()).toUrlQueryString(prefix + "one_of_43" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof WidgetTypeId) { + if (getActualInstance() != null) { + joiner.add(((WidgetTypeId)getActualInstance()).toUrlQueryString(prefix + "one_of_44" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof WidgetsBundleId) { + if (getActualInstance() != null) { + joiner.add(((WidgetsBundleId)getActualInstance()).toUrlQueryString(prefix + "one_of_45" + suffix)); + } + return joiner.toString(); + } + return null; + } + +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/EntityId.java b/pe/src/main/java/org/thingsboard/client/model/EntityId.java index e1008491..026d4143 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EntityId.java +++ b/pe/src/main/java/org/thingsboard/client/model/EntityId.java @@ -21,9 +21,12 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; @@ -32,6 +35,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * EntityId @@ -41,6 +45,60 @@ EntityId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = AdminSettingsId.class, name = "ADMIN_SETTINGS"), + @JsonSubTypes.Type(value = AiModelId.class, name = "AI_MODEL"), + @JsonSubTypes.Type(value = AlarmId.class, name = "ALARM"), + @JsonSubTypes.Type(value = ApiKeyId.class, name = "API_KEY"), + @JsonSubTypes.Type(value = ApiUsageStateId.class, name = "API_USAGE_STATE"), + @JsonSubTypes.Type(value = AssetId.class, name = "ASSET"), + @JsonSubTypes.Type(value = AssetProfileId.class, name = "ASSET_PROFILE"), + @JsonSubTypes.Type(value = BlobEntityId.class, name = "BLOB_ENTITY"), + @JsonSubTypes.Type(value = CalculatedFieldId.class, name = "CALCULATED_FIELD"), + @JsonSubTypes.Type(value = ConverterId.class, name = "CONVERTER"), + @JsonSubTypes.Type(value = CustomerId.class, name = "CUSTOMER"), + @JsonSubTypes.Type(value = DashboardId.class, name = "DASHBOARD"), + @JsonSubTypes.Type(value = DeviceId.class, name = "DEVICE"), + @JsonSubTypes.Type(value = DeviceProfileId.class, name = "DEVICE_PROFILE"), + @JsonSubTypes.Type(value = DomainId.class, name = "DOMAIN"), + @JsonSubTypes.Type(value = EdgeId.class, name = "EDGE"), + @JsonSubTypes.Type(value = EntityGroupId.class, name = "ENTITY_GROUP"), + @JsonSubTypes.Type(value = EntityViewId.class, name = "ENTITY_VIEW"), + @JsonSubTypes.Type(value = GroupPermissionId.class, name = "GROUP_PERMISSION"), + @JsonSubTypes.Type(value = IntegrationId.class, name = "INTEGRATION"), + @JsonSubTypes.Type(value = JobId.class, name = "JOB"), + @JsonSubTypes.Type(value = MobileAppId.class, name = "MOBILE_APP"), + @JsonSubTypes.Type(value = MobileAppBundleId.class, name = "MOBILE_APP_BUNDLE"), + @JsonSubTypes.Type(value = NotificationId.class, name = "NOTIFICATION"), + @JsonSubTypes.Type(value = NotificationRequestId.class, name = "NOTIFICATION_REQUEST"), + @JsonSubTypes.Type(value = NotificationRuleId.class, name = "NOTIFICATION_RULE"), + @JsonSubTypes.Type(value = NotificationTargetId.class, name = "NOTIFICATION_TARGET"), + @JsonSubTypes.Type(value = NotificationTemplateId.class, name = "NOTIFICATION_TEMPLATE"), + @JsonSubTypes.Type(value = OAuth2ClientId.class, name = "OAUTH2_CLIENT"), + @JsonSubTypes.Type(value = OtaPackageId.class, name = "OTA_PACKAGE"), + @JsonSubTypes.Type(value = QueueId.class, name = "QUEUE"), + @JsonSubTypes.Type(value = QueueStatsId.class, name = "QUEUE_STATS"), + @JsonSubTypes.Type(value = ReportId.class, name = "REPORT"), + @JsonSubTypes.Type(value = ReportTemplateId.class, name = "REPORT_TEMPLATE"), + @JsonSubTypes.Type(value = RoleId.class, name = "ROLE"), + @JsonSubTypes.Type(value = RpcId.class, name = "RPC"), + @JsonSubTypes.Type(value = RuleChainId.class, name = "RULE_CHAIN"), + @JsonSubTypes.Type(value = RuleNodeId.class, name = "RULE_NODE"), + @JsonSubTypes.Type(value = SchedulerEventId.class, name = "SCHEDULER_EVENT"), + @JsonSubTypes.Type(value = SecretId.class, name = "SECRET"), + @JsonSubTypes.Type(value = TbResourceId.class, name = "TB_RESOURCE"), + @JsonSubTypes.Type(value = TenantId.class, name = "TENANT"), + @JsonSubTypes.Type(value = TenantProfileId.class, name = "TENANT_PROFILE"), + @JsonSubTypes.Type(value = UserId.class, name = "USER"), + @JsonSubTypes.Type(value = WidgetsBundleId.class, name = "WIDGETS_BUNDLE"), + @JsonSubTypes.Type(value = WidgetTypeId.class, name = "WIDGET_TYPE"), +}) + public class EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull @@ -187,5 +245,57 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ADMIN_SETTINGS", AdminSettingsId.class); + mappings.put("AI_MODEL", AiModelId.class); + mappings.put("ALARM", AlarmId.class); + mappings.put("API_KEY", ApiKeyId.class); + mappings.put("API_USAGE_STATE", ApiUsageStateId.class); + mappings.put("ASSET", AssetId.class); + mappings.put("ASSET_PROFILE", AssetProfileId.class); + mappings.put("BLOB_ENTITY", BlobEntityId.class); + mappings.put("CALCULATED_FIELD", CalculatedFieldId.class); + mappings.put("CONVERTER", ConverterId.class); + mappings.put("CUSTOMER", CustomerId.class); + mappings.put("DASHBOARD", DashboardId.class); + mappings.put("DEVICE", DeviceId.class); + mappings.put("DEVICE_PROFILE", DeviceProfileId.class); + mappings.put("DOMAIN", DomainId.class); + mappings.put("EDGE", EdgeId.class); + mappings.put("ENTITY_GROUP", EntityGroupId.class); + mappings.put("ENTITY_VIEW", EntityViewId.class); + mappings.put("GROUP_PERMISSION", GroupPermissionId.class); + mappings.put("INTEGRATION", IntegrationId.class); + mappings.put("JOB", JobId.class); + mappings.put("MOBILE_APP", MobileAppId.class); + mappings.put("MOBILE_APP_BUNDLE", MobileAppBundleId.class); + mappings.put("NOTIFICATION", NotificationId.class); + mappings.put("NOTIFICATION_REQUEST", NotificationRequestId.class); + mappings.put("NOTIFICATION_RULE", NotificationRuleId.class); + mappings.put("NOTIFICATION_TARGET", NotificationTargetId.class); + mappings.put("NOTIFICATION_TEMPLATE", NotificationTemplateId.class); + mappings.put("OAUTH2_CLIENT", OAuth2ClientId.class); + mappings.put("OTA_PACKAGE", OtaPackageId.class); + mappings.put("QUEUE", QueueId.class); + mappings.put("QUEUE_STATS", QueueStatsId.class); + mappings.put("REPORT", ReportId.class); + mappings.put("REPORT_TEMPLATE", ReportTemplateId.class); + mappings.put("ROLE", RoleId.class); + mappings.put("RPC", RpcId.class); + mappings.put("RULE_CHAIN", RuleChainId.class); + mappings.put("RULE_NODE", RuleNodeId.class); + mappings.put("SCHEDULER_EVENT", SchedulerEventId.class); + mappings.put("SECRET", SecretId.class); + mappings.put("TB_RESOURCE", TbResourceId.class); + mappings.put("TENANT", TenantId.class); + mappings.put("TENANT_PROFILE", TenantProfileId.class); + mappings.put("USER", UserId.class); + mappings.put("WIDGETS_BUNDLE", WidgetsBundleId.class); + mappings.put("WIDGET_TYPE", WidgetTypeId.class); + mappings.put("EntityId", EntityId.class); + JSON.registerDiscriminator(EntityId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/EntityView.java b/pe/src/main/java/org/thingsboard/client/model/EntityView.java index 7f9479a2..bbed15c0 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EntityView.java +++ b/pe/src/main/java/org/thingsboard/client/model/EntityView.java @@ -115,14 +115,12 @@ public EntityView() { public EntityView( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime ) { this(); this.tenantId = tenantId; this.customerId = customerId; this.createdTime = createdTime; - this.ownerId = ownerId; } public EntityView entityId(@javax.annotation.Nonnull EntityId entityId) { @@ -359,6 +357,11 @@ public Long getCreatedTime() { + public EntityView ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -371,6 +374,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public EntityView additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/EntityViewId.java b/pe/src/main/java/org/thingsboard/client/model/EntityViewId.java index 275255ba..8f144abd 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EntityViewId.java +++ b/pe/src/main/java/org/thingsboard/client/model/EntityViewId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * EntityViewId */ @JsonPropertyOrder({ - EntityViewId.JSON_PROPERTY_ID, - EntityViewId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class EntityViewId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class EntityViewId extends EntityId { public EntityViewId() { } + @Override public EntityViewId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public EntityViewId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this EntityViewId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - EntityViewId entityViewId = (EntityViewId) o; - return Objects.equals(this.id, entityViewId.id) && - Objects.equals(this.entityType, entityViewId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EntityViewId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EntityViewId", EntityViewId.class); + JSON.registerDiscriminator(EntityViewId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/EntityViewInfo.java b/pe/src/main/java/org/thingsboard/client/model/EntityViewInfo.java index 74c8e402..75bd9bcd 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EntityViewInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/EntityViewInfo.java @@ -129,15 +129,13 @@ public EntityViewInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; this.ownerName = ownerName; - this.ownerId = ownerId; } public EntityViewInfo id(@javax.annotation.Nullable EntityViewId id) { @@ -420,6 +418,11 @@ public void setGroups(@javax.annotation.Nullable List groups) { } + public EntityViewInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -432,6 +435,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public EntityViewInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java index 6867a75b..7a077694 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java @@ -95,7 +95,7 @@ public void setEscalationTable(@javax.annotation.Nonnull Map> @Override - public EscalatedNotificationRuleRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public EscalatedNotificationRuleRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/EventInfo.java b/pe/src/main/java/org/thingsboard/client/model/EventInfo.java index e367fdbf..1cbe3f86 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EventInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/EventInfo.java @@ -82,13 +82,11 @@ public EventInfo() { @JsonCreator public EventInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_ENTITY_ID) EntityId entityId + @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; - this.entityId = entityId; } public EventInfo id(@javax.annotation.Nullable EventId id) { @@ -191,6 +189,11 @@ public void setUid(@javax.annotation.Nullable String uid) { } + public EventInfo entityId(@javax.annotation.Nullable EntityId entityId) { + this.entityId = entityId; + return this; + } + /** * JSON object with Entity Id for which event is created. * @return entityId @@ -203,6 +206,11 @@ public EntityId getEntityId() { } + @JsonProperty(value = JSON_PROPERTY_ENTITY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityId(@javax.annotation.Nullable EntityId entityId) { + this.entityId = entityId; + } public EventInfo body(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode body) { diff --git a/pe/src/main/java/org/thingsboard/client/model/Failure.java b/pe/src/main/java/org/thingsboard/client/model/Failure.java index ae611e38..4a671180 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Failure.java +++ b/pe/src/main/java/org/thingsboard/client/model/Failure.java @@ -40,8 +40,7 @@ * Failure */ @JsonPropertyOrder({ - Failure.JSON_PROPERTY_ERROR_DETAILS, - Failure.JSON_PROPERTY_STATUS + Failure.JSON_PROPERTY_ERROR_DETAILS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -55,10 +54,6 @@ public class Failure extends TbChatResponse { @javax.annotation.Nullable private String errorDetails; - public static final String JSON_PROPERTY_STATUS = "status"; - @javax.annotation.Nullable - private String status; - public Failure() { } @@ -86,30 +81,12 @@ public void setErrorDetails(@javax.annotation.Nullable String errorDetails) { } - public Failure status(@javax.annotation.Nullable String status) { - this.status = status; + @Override + public Failure status(@javax.annotation.Nonnull String status) { + this.setStatus(status); return this; } - /** - * Get status - * @return status - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_STATUS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } - - - @JsonProperty(value = JSON_PROPERTY_STATUS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatus(@javax.annotation.Nullable String status) { - this.status = status; - } - - /** * Return true if this Failure object is equal to o. */ @@ -123,13 +100,12 @@ public boolean equals(Object o) { } Failure failure = (Failure) o; return Objects.equals(this.errorDetails, failure.errorDetails) && - Objects.equals(this.status, failure.status) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(errorDetails, status, super.hashCode()); + return Objects.hash(errorDetails, super.hashCode()); } @Override @@ -138,7 +114,6 @@ public String toString() { sb.append("class Failure {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" errorDetails: ").append(toIndentedString(errorDetails)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/pe/src/main/java/org/thingsboard/client/model/FeaturesInfo.java b/pe/src/main/java/org/thingsboard/client/model/FeaturesInfo.java index e41b88ab..a514745c 100644 --- a/pe/src/main/java/org/thingsboard/client/model/FeaturesInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/FeaturesInfo.java @@ -35,19 +35,15 @@ * FeaturesInfo */ @JsonPropertyOrder({ - FeaturesInfo.JSON_PROPERTY_WHITE_LABELING_ENABLED, FeaturesInfo.JSON_PROPERTY_SMS_ENABLED, FeaturesInfo.JSON_PROPERTY_OAUTH_ENABLED, + FeaturesInfo.JSON_PROPERTY_WHITE_LABELING_ENABLED, + FeaturesInfo.JSON_PROPERTY_NOTIFICATION_ENABLED, FeaturesInfo.JSON_PROPERTY_TWO_FA_ENABLED, - FeaturesInfo.JSON_PROPERTY_EMAIL_ENABLED, - FeaturesInfo.JSON_PROPERTY_NOTIFICATION_ENABLED + FeaturesInfo.JSON_PROPERTY_EMAIL_ENABLED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class FeaturesInfo { - public static final String JSON_PROPERTY_WHITE_LABELING_ENABLED = "whiteLabelingEnabled"; - @javax.annotation.Nullable - private Boolean whiteLabelingEnabled; - public static final String JSON_PROPERTY_SMS_ENABLED = "smsEnabled"; @javax.annotation.Nullable private Boolean smsEnabled; @@ -56,45 +52,25 @@ public class FeaturesInfo { @javax.annotation.Nullable private Boolean oauthEnabled; - public static final String JSON_PROPERTY_TWO_FA_ENABLED = "twoFaEnabled"; - @javax.annotation.Nullable - private Boolean twoFaEnabled; - - public static final String JSON_PROPERTY_EMAIL_ENABLED = "emailEnabled"; + public static final String JSON_PROPERTY_WHITE_LABELING_ENABLED = "whiteLabelingEnabled"; @javax.annotation.Nullable - private Boolean emailEnabled; + private Boolean whiteLabelingEnabled; public static final String JSON_PROPERTY_NOTIFICATION_ENABLED = "notificationEnabled"; @javax.annotation.Nullable private Boolean notificationEnabled; - public FeaturesInfo() { - } - - public FeaturesInfo whiteLabelingEnabled(@javax.annotation.Nullable Boolean whiteLabelingEnabled) { - this.whiteLabelingEnabled = whiteLabelingEnabled; - return this; - } - - /** - * Get whiteLabelingEnabled - * @return whiteLabelingEnabled - */ + public static final String JSON_PROPERTY_TWO_FA_ENABLED = "twoFaEnabled"; @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_WHITE_LABELING_ENABLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getWhiteLabelingEnabled() { - return whiteLabelingEnabled; - } + private Boolean twoFaEnabled; + public static final String JSON_PROPERTY_EMAIL_ENABLED = "emailEnabled"; + @javax.annotation.Nullable + private Boolean emailEnabled; - @JsonProperty(value = JSON_PROPERTY_WHITE_LABELING_ENABLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWhiteLabelingEnabled(@javax.annotation.Nullable Boolean whiteLabelingEnabled) { - this.whiteLabelingEnabled = whiteLabelingEnabled; + public FeaturesInfo() { } - public FeaturesInfo smsEnabled(@javax.annotation.Nullable Boolean smsEnabled) { this.smsEnabled = smsEnabled; return this; @@ -143,6 +119,54 @@ public void setOauthEnabled(@javax.annotation.Nullable Boolean oauthEnabled) { } + public FeaturesInfo whiteLabelingEnabled(@javax.annotation.Nullable Boolean whiteLabelingEnabled) { + this.whiteLabelingEnabled = whiteLabelingEnabled; + return this; + } + + /** + * Get whiteLabelingEnabled + * @return whiteLabelingEnabled + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_WHITE_LABELING_ENABLED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getWhiteLabelingEnabled() { + return whiteLabelingEnabled; + } + + + @JsonProperty(value = JSON_PROPERTY_WHITE_LABELING_ENABLED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWhiteLabelingEnabled(@javax.annotation.Nullable Boolean whiteLabelingEnabled) { + this.whiteLabelingEnabled = whiteLabelingEnabled; + } + + + public FeaturesInfo notificationEnabled(@javax.annotation.Nullable Boolean notificationEnabled) { + this.notificationEnabled = notificationEnabled; + return this; + } + + /** + * Get notificationEnabled + * @return notificationEnabled + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_ENABLED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNotificationEnabled() { + return notificationEnabled; + } + + + @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_ENABLED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotificationEnabled(@javax.annotation.Nullable Boolean notificationEnabled) { + this.notificationEnabled = notificationEnabled; + } + + public FeaturesInfo twoFaEnabled(@javax.annotation.Nullable Boolean twoFaEnabled) { this.twoFaEnabled = twoFaEnabled; return this; @@ -191,30 +215,6 @@ public void setEmailEnabled(@javax.annotation.Nullable Boolean emailEnabled) { } - public FeaturesInfo notificationEnabled(@javax.annotation.Nullable Boolean notificationEnabled) { - this.notificationEnabled = notificationEnabled; - return this; - } - - /** - * Get notificationEnabled - * @return notificationEnabled - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_ENABLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getNotificationEnabled() { - return notificationEnabled; - } - - - @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_ENABLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNotificationEnabled(@javax.annotation.Nullable Boolean notificationEnabled) { - this.notificationEnabled = notificationEnabled; - } - - /** * Return true if this FeaturesInfo object is equal to o. */ @@ -227,29 +227,29 @@ public boolean equals(Object o) { return false; } FeaturesInfo featuresInfo = (FeaturesInfo) o; - return Objects.equals(this.whiteLabelingEnabled, featuresInfo.whiteLabelingEnabled) && - Objects.equals(this.smsEnabled, featuresInfo.smsEnabled) && + return Objects.equals(this.smsEnabled, featuresInfo.smsEnabled) && Objects.equals(this.oauthEnabled, featuresInfo.oauthEnabled) && + Objects.equals(this.whiteLabelingEnabled, featuresInfo.whiteLabelingEnabled) && + Objects.equals(this.notificationEnabled, featuresInfo.notificationEnabled) && Objects.equals(this.twoFaEnabled, featuresInfo.twoFaEnabled) && - Objects.equals(this.emailEnabled, featuresInfo.emailEnabled) && - Objects.equals(this.notificationEnabled, featuresInfo.notificationEnabled); + Objects.equals(this.emailEnabled, featuresInfo.emailEnabled); } @Override public int hashCode() { - return Objects.hash(whiteLabelingEnabled, smsEnabled, oauthEnabled, twoFaEnabled, emailEnabled, notificationEnabled); + return Objects.hash(smsEnabled, oauthEnabled, whiteLabelingEnabled, notificationEnabled, twoFaEnabled, emailEnabled); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FeaturesInfo {\n"); - sb.append(" whiteLabelingEnabled: ").append(toIndentedString(whiteLabelingEnabled)).append("\n"); sb.append(" smsEnabled: ").append(toIndentedString(smsEnabled)).append("\n"); sb.append(" oauthEnabled: ").append(toIndentedString(oauthEnabled)).append("\n"); + sb.append(" whiteLabelingEnabled: ").append(toIndentedString(whiteLabelingEnabled)).append("\n"); + sb.append(" notificationEnabled: ").append(toIndentedString(notificationEnabled)).append("\n"); sb.append(" twoFaEnabled: ").append(toIndentedString(twoFaEnabled)).append("\n"); sb.append(" emailEnabled: ").append(toIndentedString(emailEnabled)).append("\n"); - sb.append(" notificationEnabled: ").append(toIndentedString(notificationEnabled)).append("\n"); sb.append("}"); return sb.toString(); } @@ -297,11 +297,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `whiteLabelingEnabled` to the URL query string - if (getWhiteLabelingEnabled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%swhiteLabelingEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWhiteLabelingEnabled())))); - } - // add `smsEnabled` to the URL query string if (getSmsEnabled() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%ssmsEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSmsEnabled())))); @@ -312,6 +307,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%soauthEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOauthEnabled())))); } + // add `whiteLabelingEnabled` to the URL query string + if (getWhiteLabelingEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%swhiteLabelingEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWhiteLabelingEnabled())))); + } + + // add `notificationEnabled` to the URL query string + if (getNotificationEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%snotificationEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotificationEnabled())))); + } + // add `twoFaEnabled` to the URL query string if (getTwoFaEnabled() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stwoFaEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTwoFaEnabled())))); @@ -322,11 +327,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%semailEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmailEnabled())))); } - // add `notificationEnabled` to the URL query string - if (getNotificationEnabled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%snotificationEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotificationEnabled())))); - } - return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/GeofencingCalculatedFieldConfiguration.java b/pe/src/main/java/org/thingsboard/client/model/GeofencingCalculatedFieldConfiguration.java index dd8783e0..e8678ed8 100644 --- a/pe/src/main/java/org/thingsboard/client/model/GeofencingCalculatedFieldConfiguration.java +++ b/pe/src/main/java/org/thingsboard/client/model/GeofencingCalculatedFieldConfiguration.java @@ -182,7 +182,7 @@ public void setScheduledUpdateInterval(@javax.annotation.Nullable Integer schedu @Override - public GeofencingCalculatedFieldConfiguration output(@javax.annotation.Nonnull Output output) { + public GeofencingCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { this.setOutput(output); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/GroupPermissionId.java b/pe/src/main/java/org/thingsboard/client/model/GroupPermissionId.java index 8f16dcbc..6507f66f 100644 --- a/pe/src/main/java/org/thingsboard/client/model/GroupPermissionId.java +++ b/pe/src/main/java/org/thingsboard/client/model/GroupPermissionId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * GroupPermissionId */ @JsonPropertyOrder({ - GroupPermissionId.JSON_PROPERTY_ID, - GroupPermissionId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class GroupPermissionId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class GroupPermissionId extends EntityId { public GroupPermissionId() { } + @Override public GroupPermissionId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public GroupPermissionId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this GroupPermissionId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - GroupPermissionId groupPermissionId = (GroupPermissionId) o; - return Objects.equals(this.id, groupPermissionId.id) && - Objects.equals(this.entityType, groupPermissionId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GroupPermissionId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("GroupPermissionId", GroupPermissionId.class); + JSON.registerDiscriminator(GroupPermissionId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/HomeMenuItem.java b/pe/src/main/java/org/thingsboard/client/model/HomeMenuItem.java index d862e250..55c3feae 100644 --- a/pe/src/main/java/org/thingsboard/client/model/HomeMenuItem.java +++ b/pe/src/main/java/org/thingsboard/client/model/HomeMenuItem.java @@ -48,7 +48,6 @@ HomeMenuItem.JSON_PROPERTY_ID, HomeMenuItem.JSON_PROPERTY_NAME, HomeMenuItem.JSON_PROPERTY_ICON, - HomeMenuItem.JSON_PROPERTY_VISIBLE, HomeMenuItem.JSON_PROPERTY_PAGES, HomeMenuItem.JSON_PROPERTY_HOME_TYPE, HomeMenuItem.JSON_PROPERTY_DASHBOARD_ID, @@ -74,10 +73,6 @@ public class HomeMenuItem extends MenuItem { @javax.annotation.Nullable private String icon; - public static final String JSON_PROPERTY_VISIBLE = "visible"; - @javax.annotation.Nullable - private Boolean visible; - public static final String JSON_PROPERTY_PAGES = "pages"; @javax.annotation.Nullable private List pages = new ArrayList<>(); @@ -167,30 +162,6 @@ public void setIcon(@javax.annotation.Nullable String icon) { } - public HomeMenuItem visible(@javax.annotation.Nullable Boolean visible) { - this.visible = visible; - return this; - } - - /** - * Mark if menu item is visible for user - * @return visible - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getVisible() { - return visible; - } - - - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setVisible(@javax.annotation.Nullable Boolean visible) { - this.visible = visible; - } - - public HomeMenuItem pages(@javax.annotation.Nullable List pages) { this.pages = pages; return this; @@ -301,6 +272,12 @@ public HomeMenuItem type(@javax.annotation.Nonnull MenuItemType type) { return this; } + @Override + public HomeMenuItem visible(@javax.annotation.Nullable Boolean visible) { + this.setVisible(visible); + return this; + } + /** * Return true if this HomeMenuItem object is equal to o. */ @@ -316,7 +293,6 @@ public boolean equals(Object o) { return Objects.equals(this.id, homeMenuItem.id) && Objects.equals(this.name, homeMenuItem.name) && Objects.equals(this.icon, homeMenuItem.icon) && - Objects.equals(this.visible, homeMenuItem.visible) && Objects.equals(this.pages, homeMenuItem.pages) && Objects.equals(this.homeType, homeMenuItem.homeType) && Objects.equals(this.dashboardId, homeMenuItem.dashboardId) && @@ -326,7 +302,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, name, icon, visible, pages, homeType, dashboardId, hideDashboardToolbar, super.hashCode()); + return Objects.hash(id, name, icon, pages, homeType, dashboardId, hideDashboardToolbar, super.hashCode()); } @Override @@ -337,7 +313,6 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); - sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); sb.append(" pages: ").append(toIndentedString(pages)).append("\n"); sb.append(" homeType: ").append(toIndentedString(homeType)).append("\n"); sb.append(" dashboardId: ").append(toIndentedString(dashboardId)).append("\n"); diff --git a/pe/src/main/java/org/thingsboard/client/model/IntegrationId.java b/pe/src/main/java/org/thingsboard/client/model/IntegrationId.java index e5c79693..1a5fbc28 100644 --- a/pe/src/main/java/org/thingsboard/client/model/IntegrationId.java +++ b/pe/src/main/java/org/thingsboard/client/model/IntegrationId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * IntegrationId */ @JsonPropertyOrder({ - IntegrationId.JSON_PROPERTY_ID, - IntegrationId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class IntegrationId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class IntegrationId extends EntityId { public IntegrationId() { } + @Override public IntegrationId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public IntegrationId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this IntegrationId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IntegrationId integrationId = (IntegrationId) o; - return Objects.equals(this.id, integrationId.id) && - Objects.equals(this.entityType, integrationId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IntegrationId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("IntegrationId", IntegrationId.class); + JSON.registerDiscriminator(IntegrationId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventRecipientsConfig.java index b9c5d542..7a5c61f7 100644 --- a/pe/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventRecipientsConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public IntegrationLifecycleEventRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public IntegrationLifecycleEventRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/JobId.java b/pe/src/main/java/org/thingsboard/client/model/JobId.java index 323bed6e..93be4634 100644 --- a/pe/src/main/java/org/thingsboard/client/model/JobId.java +++ b/pe/src/main/java/org/thingsboard/client/model/JobId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * JobId */ @JsonPropertyOrder({ - JobId.JSON_PROPERTY_ID, - JobId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class JobId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class JobId extends EntityId { public JobId() { } + @Override public JobId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public JobId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this JobId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - JobId jobId = (JobId) o; - return Objects.equals(this.id, jobId.id) && - Objects.equals(this.entityType, jobId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class JobId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("JobId", JobId.class); + JSON.registerDiscriminator(JobId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java b/pe/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java index f3f8ed8d..9b4735e5 100644 --- a/pe/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java +++ b/pe/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * MobileAppBundleId */ @JsonPropertyOrder({ - MobileAppBundleId.JSON_PROPERTY_ID, - MobileAppBundleId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class MobileAppBundleId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class MobileAppBundleId extends EntityId { public MobileAppBundleId() { } + @Override public MobileAppBundleId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public MobileAppBundleId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * Get entityType - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this MobileAppBundleId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MobileAppBundleId mobileAppBundleId = (MobileAppBundleId) o; - return Objects.equals(this.id, mobileAppBundleId.id) && - Objects.equals(this.entityType, mobileAppBundleId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MobileAppBundleId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("MobileAppBundleId", MobileAppBundleId.class); + JSON.registerDiscriminator(MobileAppBundleId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/MobileAppId.java b/pe/src/main/java/org/thingsboard/client/model/MobileAppId.java index 1a70f01b..c4325164 100644 --- a/pe/src/main/java/org/thingsboard/client/model/MobileAppId.java +++ b/pe/src/main/java/org/thingsboard/client/model/MobileAppId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * MobileAppId */ @JsonPropertyOrder({ - MobileAppId.JSON_PROPERTY_ID, - MobileAppId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class MobileAppId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class MobileAppId extends EntityId { public MobileAppId() { } + @Override public MobileAppId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public MobileAppId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * Get entityType - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this MobileAppId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MobileAppId mobileAppId = (MobileAppId) o; - return Objects.equals(this.id, mobileAppId.id) && - Objects.equals(this.entityType, mobileAppId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MobileAppId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("MobileAppId", MobileAppId.class); + JSON.registerDiscriminator(MobileAppId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java b/pe/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java index 79df485c..88532726 100644 --- a/pe/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java +++ b/pe/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java @@ -52,19 +52,6 @@ * MobileSelfRegistrationParams */ @JsonPropertyOrder({ - MobileSelfRegistrationParams.JSON_PROPERTY_ENABLED, - MobileSelfRegistrationParams.JSON_PROPERTY_TITLE, - MobileSelfRegistrationParams.JSON_PROPERTY_CAPTCHA, - MobileSelfRegistrationParams.JSON_PROPERTY_SIGN_UP_FIELDS, - MobileSelfRegistrationParams.JSON_PROPERTY_SHOW_PRIVACY_POLICY, - MobileSelfRegistrationParams.JSON_PROPERTY_SHOW_TERMS_OF_USE, - MobileSelfRegistrationParams.JSON_PROPERTY_NOTIFICATION_RECIPIENT, - MobileSelfRegistrationParams.JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, - MobileSelfRegistrationParams.JSON_PROPERTY_CUSTOMER_GROUP_ID, - MobileSelfRegistrationParams.JSON_PROPERTY_PERMISSIONS, - MobileSelfRegistrationParams.JSON_PROPERTY_DEFAULT_DASHBOARD, - MobileSelfRegistrationParams.JSON_PROPERTY_HOME_DASHBOARD, - MobileSelfRegistrationParams.JSON_PROPERTY_CUSTOM_MENU_ID, MobileSelfRegistrationParams.JSON_PROPERTY_PRIVACY_POLICY, MobileSelfRegistrationParams.JSON_PROPERTY_TERMS_OF_USE, MobileSelfRegistrationParams.JSON_PROPERTY_REDIRECT @@ -77,58 +64,6 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) public class MobileSelfRegistrationParams extends SelfRegistrationParams { - public static final String JSON_PROPERTY_ENABLED = "enabled"; - @javax.annotation.Nullable - private Boolean enabled; - - public static final String JSON_PROPERTY_TITLE = "title"; - @javax.annotation.Nonnull - private String title; - - public static final String JSON_PROPERTY_CAPTCHA = "captcha"; - @javax.annotation.Nonnull - private CaptchaParams captcha; - - public static final String JSON_PROPERTY_SIGN_UP_FIELDS = "signUpFields"; - @javax.annotation.Nonnull - private List signUpFields = new ArrayList<>(); - - public static final String JSON_PROPERTY_SHOW_PRIVACY_POLICY = "showPrivacyPolicy"; - @javax.annotation.Nullable - private Boolean showPrivacyPolicy; - - public static final String JSON_PROPERTY_SHOW_TERMS_OF_USE = "showTermsOfUse"; - @javax.annotation.Nullable - private Boolean showTermsOfUse; - - public static final String JSON_PROPERTY_NOTIFICATION_RECIPIENT = "notificationRecipient"; - @javax.annotation.Nullable - private NotificationTargetId notificationRecipient; - - public static final String JSON_PROPERTY_CUSTOMER_TITLE_PREFIX = "customerTitlePrefix"; - @javax.annotation.Nullable - private String customerTitlePrefix; - - public static final String JSON_PROPERTY_CUSTOMER_GROUP_ID = "customerGroupId"; - @javax.annotation.Nullable - private EntityGroupId customerGroupId; - - public static final String JSON_PROPERTY_PERMISSIONS = "permissions"; - @javax.annotation.Nonnull - private List permissions = new ArrayList<>(); - - public static final String JSON_PROPERTY_DEFAULT_DASHBOARD = "defaultDashboard"; - @javax.annotation.Nullable - private DefaultDashboardParams defaultDashboard; - - public static final String JSON_PROPERTY_HOME_DASHBOARD = "homeDashboard"; - @javax.annotation.Nullable - private HomeDashboardParams homeDashboard; - - public static final String JSON_PROPERTY_CUSTOM_MENU_ID = "customMenuId"; - @javax.annotation.Nullable - private CustomMenuId customMenuId; - public static final String JSON_PROPERTY_PRIVACY_POLICY = "privacyPolicy"; @javax.annotation.Nullable private String privacyPolicy; @@ -144,409 +79,147 @@ public class MobileSelfRegistrationParams extends SelfRegistrationParams { public MobileSelfRegistrationParams() { } - public MobileSelfRegistrationParams enabled(@javax.annotation.Nullable Boolean enabled) { - this.enabled = enabled; + public MobileSelfRegistrationParams privacyPolicy(@javax.annotation.Nullable String privacyPolicy) { + this.privacyPolicy = privacyPolicy; return this; } /** - * Indicates if self-registration is allowed via sign-up form - * @return enabled + * Privacy policy text. Supports HTML. + * @return privacyPolicy */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_PRIVACY_POLICY, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEnabled() { - return enabled; + public String getPrivacyPolicy() { + return privacyPolicy; } - @JsonProperty(value = JSON_PROPERTY_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_PRIVACY_POLICY, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEnabled(@javax.annotation.Nullable Boolean enabled) { - this.enabled = enabled; + public void setPrivacyPolicy(@javax.annotation.Nullable String privacyPolicy) { + this.privacyPolicy = privacyPolicy; } - public MobileSelfRegistrationParams title(@javax.annotation.Nonnull String title) { - this.title = title; + public MobileSelfRegistrationParams termsOfUse(@javax.annotation.Nullable String termsOfUse) { + this.termsOfUse = termsOfUse; return this; } /** - * The text message to appear on login form - * @return title + * Terms of User text. Supports HTML. + * @return termsOfUse */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_TITLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTitle() { - return title; + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTermsOfUse() { + return termsOfUse; } - @JsonProperty(value = JSON_PROPERTY_TITLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTitle(@javax.annotation.Nonnull String title) { - this.title = title; + @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTermsOfUse(@javax.annotation.Nullable String termsOfUse) { + this.termsOfUse = termsOfUse; } - public MobileSelfRegistrationParams captcha(@javax.annotation.Nonnull CaptchaParams captcha) { - this.captcha = captcha; + public MobileSelfRegistrationParams redirect(@javax.annotation.Nonnull MobileRedirectParams redirect) { + this.redirect = redirect; return this; } /** - * Captcha site key for 'I'm not a robot' validation - * @return captcha + * Mobile redirect params. + * @return redirect */ @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = true) + @JsonProperty(value = JSON_PROPERTY_REDIRECT, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CaptchaParams getCaptcha() { - return captcha; + public MobileRedirectParams getRedirect() { + return redirect; } - @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = true) + @JsonProperty(value = JSON_PROPERTY_REDIRECT, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCaptcha(@javax.annotation.Nonnull CaptchaParams captcha) { - this.captcha = captcha; + public void setRedirect(@javax.annotation.Nonnull MobileRedirectParams redirect) { + this.redirect = redirect; } - public MobileSelfRegistrationParams signUpFields(@javax.annotation.Nonnull List signUpFields) { - this.signUpFields = signUpFields; - return this; - } - - public MobileSelfRegistrationParams addSignUpFieldsItem(SignUpField signUpFieldsItem) { - if (this.signUpFields == null) { - this.signUpFields = new ArrayList<>(); - } - this.signUpFields.add(signUpFieldsItem); + @Override + public MobileSelfRegistrationParams type(@javax.annotation.Nonnull SelfRegistrationType type) { + this.setType(type); return this; } - /** - * List of sign-up form fields - * @return signUpFields - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_SIGN_UP_FIELDS, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSignUpFields() { - return signUpFields; - } - - - @JsonProperty(value = JSON_PROPERTY_SIGN_UP_FIELDS, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignUpFields(@javax.annotation.Nonnull List signUpFields) { - this.signUpFields = signUpFields; - } - - + @Override public MobileSelfRegistrationParams showPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { - this.showPrivacyPolicy = showPrivacyPolicy; + this.setShowPrivacyPolicy(showPrivacyPolicy); return this; } - /** - * Show or hide 'Privacy Policy' - * @return showPrivacyPolicy - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SHOW_PRIVACY_POLICY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowPrivacyPolicy() { - return showPrivacyPolicy; - } - - - @JsonProperty(value = JSON_PROPERTY_SHOW_PRIVACY_POLICY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { - this.showPrivacyPolicy = showPrivacyPolicy; - } - - + @Override public MobileSelfRegistrationParams showTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { - this.showTermsOfUse = showTermsOfUse; + this.setShowTermsOfUse(showTermsOfUse); return this; } - /** - * Show or hide 'Terms of Use' - * @return showTermsOfUse - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SHOW_TERMS_OF_USE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowTermsOfUse() { - return showTermsOfUse; - } - - - @JsonProperty(value = JSON_PROPERTY_SHOW_TERMS_OF_USE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { - this.showTermsOfUse = showTermsOfUse; - } - - - public MobileSelfRegistrationParams notificationRecipient(@javax.annotation.Nullable NotificationTargetId notificationRecipient) { - this.notificationRecipient = notificationRecipient; - return this; - } - - /** - * Recipient to use for notifications when new user self-registered. - * @return notificationRecipient - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_RECIPIENT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotificationTargetId getNotificationRecipient() { - return notificationRecipient; - } - - - @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_RECIPIENT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNotificationRecipient(@javax.annotation.Nullable NotificationTargetId notificationRecipient) { - this.notificationRecipient = notificationRecipient; - } - - - public MobileSelfRegistrationParams customerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { - this.customerTitlePrefix = customerTitlePrefix; + @Override + public MobileSelfRegistrationParams enabled(@javax.annotation.Nullable Boolean enabled) { + this.setEnabled(enabled); return this; } - /** - * Prefix to add to created customer - * @return customerTitlePrefix - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCustomerTitlePrefix() { - return customerTitlePrefix; - } - - - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { - this.customerTitlePrefix = customerTitlePrefix; - } - - - public MobileSelfRegistrationParams customerGroupId(@javax.annotation.Nullable EntityGroupId customerGroupId) { - this.customerGroupId = customerGroupId; + @Override + public MobileSelfRegistrationParams homeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { + this.setHomeDashboard(homeDashboard); return this; } - /** - * Id of the customer group customer wil be added to. - * @return customerGroupId - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_GROUP_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EntityGroupId getCustomerGroupId() { - return customerGroupId; - } - - - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_GROUP_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerGroupId(@javax.annotation.Nullable EntityGroupId customerGroupId) { - this.customerGroupId = customerGroupId; - } - - - public MobileSelfRegistrationParams permissions(@javax.annotation.Nonnull List permissions) { - this.permissions = permissions; + @Override + public MobileSelfRegistrationParams notificationRecipient(@javax.annotation.Nullable NotificationTargetId notificationRecipient) { + this.setNotificationRecipient(notificationRecipient); return this; } - public MobileSelfRegistrationParams addPermissionsItem(GroupPermission permissionsItem) { - if (this.permissions == null) { - this.permissions = new ArrayList<>(); - } - this.permissions.add(permissionsItem); + @Override + public MobileSelfRegistrationParams signUpFields(@javax.annotation.Nullable List signUpFields) { + this.setSignUpFields(signUpFields); return this; } - /** - * Group Permissions to assign for the new customer user. - * @return permissions - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_PERMISSIONS, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getPermissions() { - return permissions; - } - - - @JsonProperty(value = JSON_PROPERTY_PERMISSIONS, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setPermissions(@javax.annotation.Nonnull List permissions) { - this.permissions = permissions; - } - - + @Override public MobileSelfRegistrationParams defaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { - this.defaultDashboard = defaultDashboard; + this.setDefaultDashboard(defaultDashboard); return this; } - /** - * Default dashboard params - * @return defaultDashboard - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DEFAULT_DASHBOARD, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DefaultDashboardParams getDefaultDashboard() { - return defaultDashboard; - } - - - @JsonProperty(value = JSON_PROPERTY_DEFAULT_DASHBOARD, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDefaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { - this.defaultDashboard = defaultDashboard; - } - - - public MobileSelfRegistrationParams homeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { - this.homeDashboard = homeDashboard; + @Override + public MobileSelfRegistrationParams customerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { + this.setCustomerTitlePrefix(customerTitlePrefix); return this; } - /** - * Home dashboard params - * @return homeDashboard - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_HOME_DASHBOARD, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HomeDashboardParams getHomeDashboard() { - return homeDashboard; - } - - - @JsonProperty(value = JSON_PROPERTY_HOME_DASHBOARD, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHomeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { - this.homeDashboard = homeDashboard; - } - - + @Override public MobileSelfRegistrationParams customMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { - this.customMenuId = customMenuId; - return this; - } - - /** - * Custom menu id - * @return customMenuId - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOM_MENU_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CustomMenuId getCustomMenuId() { - return customMenuId; - } - - - @JsonProperty(value = JSON_PROPERTY_CUSTOM_MENU_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { - this.customMenuId = customMenuId; - } - - - public MobileSelfRegistrationParams privacyPolicy(@javax.annotation.Nullable String privacyPolicy) { - this.privacyPolicy = privacyPolicy; - return this; - } - - /** - * Privacy policy text. Supports HTML. - * @return privacyPolicy - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PRIVACY_POLICY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrivacyPolicy() { - return privacyPolicy; - } - - - @JsonProperty(value = JSON_PROPERTY_PRIVACY_POLICY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrivacyPolicy(@javax.annotation.Nullable String privacyPolicy) { - this.privacyPolicy = privacyPolicy; - } - - - public MobileSelfRegistrationParams termsOfUse(@javax.annotation.Nullable String termsOfUse) { - this.termsOfUse = termsOfUse; + this.setCustomMenuId(customMenuId); return this; } - /** - * Terms of User text. Supports HTML. - * @return termsOfUse - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTermsOfUse() { - return termsOfUse; - } - - - @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTermsOfUse(@javax.annotation.Nullable String termsOfUse) { - this.termsOfUse = termsOfUse; - } - - - public MobileSelfRegistrationParams redirect(@javax.annotation.Nonnull MobileRedirectParams redirect) { - this.redirect = redirect; + @Override + public MobileSelfRegistrationParams customerGroupId(@javax.annotation.Nullable EntityGroupId customerGroupId) { + this.setCustomerGroupId(customerGroupId); return this; } - /** - * Mobile redirect params. - * @return redirect - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_REDIRECT, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MobileRedirectParams getRedirect() { - return redirect; - } - - - @JsonProperty(value = JSON_PROPERTY_REDIRECT, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRedirect(@javax.annotation.Nonnull MobileRedirectParams redirect) { - this.redirect = redirect; - } - - @Override - public MobileSelfRegistrationParams type(@javax.annotation.Nonnull SelfRegistrationType type) { - this.setType(type); + public MobileSelfRegistrationParams captcha(@javax.annotation.Nullable CaptchaParams captcha) { + this.setCaptcha(captcha); return this; } @@ -562,20 +235,7 @@ public boolean equals(Object o) { return false; } MobileSelfRegistrationParams mobileSelfRegistrationParams = (MobileSelfRegistrationParams) o; - return Objects.equals(this.enabled, mobileSelfRegistrationParams.enabled) && - Objects.equals(this.title, mobileSelfRegistrationParams.title) && - Objects.equals(this.captcha, mobileSelfRegistrationParams.captcha) && - Objects.equals(this.signUpFields, mobileSelfRegistrationParams.signUpFields) && - Objects.equals(this.showPrivacyPolicy, mobileSelfRegistrationParams.showPrivacyPolicy) && - Objects.equals(this.showTermsOfUse, mobileSelfRegistrationParams.showTermsOfUse) && - Objects.equals(this.notificationRecipient, mobileSelfRegistrationParams.notificationRecipient) && - Objects.equals(this.customerTitlePrefix, mobileSelfRegistrationParams.customerTitlePrefix) && - Objects.equals(this.customerGroupId, mobileSelfRegistrationParams.customerGroupId) && - Objects.equals(this.permissions, mobileSelfRegistrationParams.permissions) && - Objects.equals(this.defaultDashboard, mobileSelfRegistrationParams.defaultDashboard) && - Objects.equals(this.homeDashboard, mobileSelfRegistrationParams.homeDashboard) && - Objects.equals(this.customMenuId, mobileSelfRegistrationParams.customMenuId) && - Objects.equals(this.privacyPolicy, mobileSelfRegistrationParams.privacyPolicy) && + return Objects.equals(this.privacyPolicy, mobileSelfRegistrationParams.privacyPolicy) && Objects.equals(this.termsOfUse, mobileSelfRegistrationParams.termsOfUse) && Objects.equals(this.redirect, mobileSelfRegistrationParams.redirect) && super.equals(o); @@ -583,7 +243,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(enabled, title, captcha, signUpFields, showPrivacyPolicy, showTermsOfUse, notificationRecipient, customerTitlePrefix, customerGroupId, permissions, defaultDashboard, homeDashboard, customMenuId, privacyPolicy, termsOfUse, redirect, super.hashCode()); + return Objects.hash(privacyPolicy, termsOfUse, redirect, super.hashCode()); } @Override @@ -591,19 +251,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MobileSelfRegistrationParams {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" captcha: ").append(toIndentedString(captcha)).append("\n"); - sb.append(" signUpFields: ").append(toIndentedString(signUpFields)).append("\n"); - sb.append(" showPrivacyPolicy: ").append(toIndentedString(showPrivacyPolicy)).append("\n"); - sb.append(" showTermsOfUse: ").append(toIndentedString(showTermsOfUse)).append("\n"); - sb.append(" notificationRecipient: ").append(toIndentedString(notificationRecipient)).append("\n"); - sb.append(" customerTitlePrefix: ").append(toIndentedString(customerTitlePrefix)).append("\n"); - sb.append(" customerGroupId: ").append(toIndentedString(customerGroupId)).append("\n"); - sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); - sb.append(" defaultDashboard: ").append(toIndentedString(defaultDashboard)).append("\n"); - sb.append(" homeDashboard: ").append(toIndentedString(homeDashboard)).append("\n"); - sb.append(" customMenuId: ").append(toIndentedString(customMenuId)).append("\n"); sb.append(" privacyPolicy: ").append(toIndentedString(privacyPolicy)).append("\n"); sb.append(" termsOfUse: ").append(toIndentedString(termsOfUse)).append("\n"); sb.append(" redirect: ").append(toIndentedString(redirect)).append("\n"); @@ -699,11 +346,6 @@ public String toUrlQueryString(String prefix) { joiner.add(getNotificationRecipient().toUrlQueryString(prefix + "notificationRecipient" + suffix)); } - // add `captcha` to the URL query string - if (getCaptcha() != null) { - joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); - } - // add `signUpFields` to the URL query string if (getSignUpFields() != null) { for (int i = 0; i < getSignUpFields().size(); i++) { @@ -734,6 +376,11 @@ public String toUrlQueryString(String prefix) { joiner.add(getCustomerGroupId().toUrlQueryString(prefix + "customerGroupId" + suffix)); } + // add `captcha` to the URL query string + if (getCaptcha() != null) { + joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); + } + // add `privacyPolicy` to the URL query string if (getPrivacyPolicy() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sprivacyPolicy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrivacyPolicy())))); diff --git a/pe/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java index 97cc594a..9268f516 100644 --- a/pe/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public NewPlatformVersionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public NewPlatformVersionRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/NotificationId.java b/pe/src/main/java/org/thingsboard/client/model/NotificationId.java index 21266446..453f31fb 100644 --- a/pe/src/main/java/org/thingsboard/client/model/NotificationId.java +++ b/pe/src/main/java/org/thingsboard/client/model/NotificationId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * NotificationId */ @JsonPropertyOrder({ - NotificationId.JSON_PROPERTY_ID, - NotificationId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class NotificationId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class NotificationId extends EntityId { public NotificationId() { } + @Override public NotificationId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public NotificationId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this NotificationId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotificationId notificationId = (NotificationId) o; - return Objects.equals(this.id, notificationId.id) && - Objects.equals(this.entityType, notificationId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationId", NotificationId.class); + JSON.registerDiscriminator(NotificationId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/NotificationRequestId.java b/pe/src/main/java/org/thingsboard/client/model/NotificationRequestId.java index 353f62f2..e2706589 100644 --- a/pe/src/main/java/org/thingsboard/client/model/NotificationRequestId.java +++ b/pe/src/main/java/org/thingsboard/client/model/NotificationRequestId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * NotificationRequestId */ @JsonPropertyOrder({ - NotificationRequestId.JSON_PROPERTY_ID, - NotificationRequestId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class NotificationRequestId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class NotificationRequestId extends EntityId { public NotificationRequestId() { } + @Override public NotificationRequestId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public NotificationRequestId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this NotificationRequestId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotificationRequestId notificationRequestId = (NotificationRequestId) o; - return Objects.equals(this.id, notificationRequestId.id) && - Objects.equals(this.entityType, notificationRequestId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationRequestId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationRequestId", NotificationRequestId.class); + JSON.registerDiscriminator(NotificationRequestId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/NotificationRuleId.java b/pe/src/main/java/org/thingsboard/client/model/NotificationRuleId.java index 04c7333e..c9f1bb8e 100644 --- a/pe/src/main/java/org/thingsboard/client/model/NotificationRuleId.java +++ b/pe/src/main/java/org/thingsboard/client/model/NotificationRuleId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * NotificationRuleId */ @JsonPropertyOrder({ - NotificationRuleId.JSON_PROPERTY_ID, - NotificationRuleId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class NotificationRuleId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class NotificationRuleId extends EntityId { public NotificationRuleId() { } + @Override public NotificationRuleId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public NotificationRuleId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this NotificationRuleId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotificationRuleId notificationRuleId = (NotificationRuleId) o; - return Objects.equals(this.id, notificationRuleId.id) && - Objects.equals(this.entityType, notificationRuleId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationRuleId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationRuleId", NotificationRuleId.class); + JSON.registerDiscriminator(NotificationRuleId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java index cff3b700..d0d30ecf 100644 --- a/pe/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java @@ -68,13 +68,13 @@ public class NotificationRuleRecipientsConfig { public static final String JSON_PROPERTY_TRIGGER_TYPE = "triggerType"; - @javax.annotation.Nonnull + @javax.annotation.Nullable private NotificationRuleTriggerType triggerType; public NotificationRuleRecipientsConfig() { } - public NotificationRuleRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public NotificationRuleRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.triggerType = triggerType; return this; } @@ -83,17 +83,17 @@ public NotificationRuleRecipientsConfig triggerType(@javax.annotation.Nonnull No * Get triggerType * @return triggerType */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public NotificationRuleTriggerType getTriggerType() { return triggerType; } - @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTriggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTriggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.triggerType = triggerType; } diff --git a/pe/src/main/java/org/thingsboard/client/model/NotificationTargetId.java b/pe/src/main/java/org/thingsboard/client/model/NotificationTargetId.java index ffa24e3c..3a6d606a 100644 --- a/pe/src/main/java/org/thingsboard/client/model/NotificationTargetId.java +++ b/pe/src/main/java/org/thingsboard/client/model/NotificationTargetId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * NotificationTargetId */ @JsonPropertyOrder({ - NotificationTargetId.JSON_PROPERTY_ID, - NotificationTargetId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class NotificationTargetId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class NotificationTargetId extends EntityId { public NotificationTargetId() { } + @Override public NotificationTargetId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public NotificationTargetId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this NotificationTargetId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotificationTargetId notificationTargetId = (NotificationTargetId) o; - return Objects.equals(this.id, notificationTargetId.id) && - Objects.equals(this.entityType, notificationTargetId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationTargetId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationTargetId", NotificationTargetId.class); + JSON.registerDiscriminator(NotificationTargetId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java b/pe/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java index 1e637658..7e564198 100644 --- a/pe/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java +++ b/pe/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * NotificationTemplateId */ @JsonPropertyOrder({ - NotificationTemplateId.JSON_PROPERTY_ID, - NotificationTemplateId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class NotificationTemplateId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class NotificationTemplateId extends EntityId { public NotificationTemplateId() { } + @Override public NotificationTemplateId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public NotificationTemplateId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this NotificationTemplateId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotificationTemplateId notificationTemplateId = (NotificationTemplateId) o; - return Objects.equals(this.id, notificationTemplateId.id) && - Objects.equals(this.entityType, notificationTemplateId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationTemplateId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationTemplateId", NotificationTemplateId.class); + JSON.registerDiscriminator(NotificationTemplateId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/OAuth2Client.java b/pe/src/main/java/org/thingsboard/client/model/OAuth2Client.java index f67c506a..75bf88b9 100644 --- a/pe/src/main/java/org/thingsboard/client/model/OAuth2Client.java +++ b/pe/src/main/java/org/thingsboard/client/model/OAuth2Client.java @@ -157,13 +157,11 @@ public OAuth2Client() { @JsonCreator public OAuth2Client( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_NAME) String name ) { this(); this.createdTime = createdTime; this.name = name; - this.ownerId = ownerId; } public OAuth2Client id(@javax.annotation.Nullable OAuth2ClientId id) { @@ -642,6 +640,11 @@ public String getName() { + public OAuth2Client ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * Get ownerId * @return ownerId @@ -654,6 +657,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } /** diff --git a/pe/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java b/pe/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java index 13d9d4af..cea44821 100644 --- a/pe/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java +++ b/pe/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * OAuth2ClientId */ @JsonPropertyOrder({ - OAuth2ClientId.JSON_PROPERTY_ID, - OAuth2ClientId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class OAuth2ClientId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class OAuth2ClientId extends EntityId { public OAuth2ClientId() { } + @Override public OAuth2ClientId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public OAuth2ClientId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * Get entityType - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this OAuth2ClientId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OAuth2ClientId oauth2ClientId = (OAuth2ClientId) o; - return Objects.equals(this.id, oauth2ClientId.id) && - Objects.equals(this.entityType, oauth2ClientId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OAuth2ClientId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("OAuth2ClientId", OAuth2ClientId.class); + JSON.registerDiscriminator(OAuth2ClientId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/OtaPackageId.java b/pe/src/main/java/org/thingsboard/client/model/OtaPackageId.java index 1630b3c7..73f2ce14 100644 --- a/pe/src/main/java/org/thingsboard/client/model/OtaPackageId.java +++ b/pe/src/main/java/org/thingsboard/client/model/OtaPackageId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * OtaPackageId */ @JsonPropertyOrder({ - OtaPackageId.JSON_PROPERTY_ID, - OtaPackageId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class OtaPackageId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class OtaPackageId extends EntityId { public OtaPackageId() { } + @Override public OtaPackageId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public OtaPackageId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this OtaPackageId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OtaPackageId otaPackageId = (OtaPackageId) o; - return Objects.equals(this.id, otaPackageId.id) && - Objects.equals(this.entityType, otaPackageId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OtaPackageId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("OtaPackageId", OtaPackageId.class); + JSON.registerDiscriminator(OtaPackageId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java b/pe/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java index 83edb1a9..a3898973 100644 --- a/pe/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java @@ -261,7 +261,7 @@ public PdfReportTemplateConfig namePattern(@javax.annotation.Nullable String nam } @Override - public PdfReportTemplateConfig components(@javax.annotation.Nonnull List components) { + public PdfReportTemplateConfig components(@javax.annotation.Nullable List components) { this.setComponents(components); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/PropagationCalculatedFieldConfiguration.java b/pe/src/main/java/org/thingsboard/client/model/PropagationCalculatedFieldConfiguration.java index f533942a..9ede4169 100644 --- a/pe/src/main/java/org/thingsboard/client/model/PropagationCalculatedFieldConfiguration.java +++ b/pe/src/main/java/org/thingsboard/client/model/PropagationCalculatedFieldConfiguration.java @@ -182,7 +182,7 @@ public void setApplyExpressionToResolvedArguments(@javax.annotation.Nullable Boo @Override - public PropagationCalculatedFieldConfiguration output(@javax.annotation.Nonnull Output output) { + public PropagationCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { this.setOutput(output); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/QueueId.java b/pe/src/main/java/org/thingsboard/client/model/QueueId.java index 07f86fc6..c1c979b3 100644 --- a/pe/src/main/java/org/thingsboard/client/model/QueueId.java +++ b/pe/src/main/java/org/thingsboard/client/model/QueueId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * QueueId */ @JsonPropertyOrder({ - QueueId.JSON_PROPERTY_ID, - QueueId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class QueueId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class QueueId extends EntityId { public QueueId() { } + @Override public QueueId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public QueueId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this QueueId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - QueueId queueId = (QueueId) o; - return Objects.equals(this.id, queueId.id) && - Objects.equals(this.entityType, queueId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class QueueId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("QueueId", QueueId.class); + JSON.registerDiscriminator(QueueId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/QueueStatsId.java b/pe/src/main/java/org/thingsboard/client/model/QueueStatsId.java index b11bdee7..1aceba74 100644 --- a/pe/src/main/java/org/thingsboard/client/model/QueueStatsId.java +++ b/pe/src/main/java/org/thingsboard/client/model/QueueStatsId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * QueueStatsId */ @JsonPropertyOrder({ - QueueStatsId.JSON_PROPERTY_ID, - QueueStatsId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class QueueStatsId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class QueueStatsId extends EntityId { public QueueStatsId() { } + @Override public QueueStatsId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public QueueStatsId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this QueueStatsId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - QueueStatsId queueStatsId = (QueueStatsId) o; - return Objects.equals(this.id, queueStatsId.id) && - Objects.equals(this.entityType, queueStatsId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class QueueStatsId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("QueueStatsId", QueueStatsId.class); + JSON.registerDiscriminator(QueueStatsId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java index ddd4e212..d31ea72e 100644 --- a/pe/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public RateLimitsRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public RateLimitsRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/RelatedEntitiesAggregationCalculatedFieldConfiguration.java b/pe/src/main/java/org/thingsboard/client/model/RelatedEntitiesAggregationCalculatedFieldConfiguration.java index 50d41c5d..a1350357 100644 --- a/pe/src/main/java/org/thingsboard/client/model/RelatedEntitiesAggregationCalculatedFieldConfiguration.java +++ b/pe/src/main/java/org/thingsboard/client/model/RelatedEntitiesAggregationCalculatedFieldConfiguration.java @@ -278,7 +278,7 @@ public void setScheduledUpdateEnabled(@javax.annotation.Nullable Boolean schedul @Override - public RelatedEntitiesAggregationCalculatedFieldConfiguration output(@javax.annotation.Nonnull Output output) { + public RelatedEntitiesAggregationCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { this.setOutput(output); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/Report.java b/pe/src/main/java/org/thingsboard/client/model/Report.java index 47d09acf..1a647e51 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Report.java +++ b/pe/src/main/java/org/thingsboard/client/model/Report.java @@ -95,12 +95,10 @@ public Report() { @JsonCreator public Report( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime ) { this(); this.createdTime = createdTime; - this.ownerId = ownerId; } public Report id(@javax.annotation.Nullable ReportId id) { @@ -285,6 +283,11 @@ public void setUserId(@javax.annotation.Nonnull UserId userId) { } + public Report ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -297,6 +300,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } /** diff --git a/pe/src/main/java/org/thingsboard/client/model/ReportBarChartWithLabelsSettings.java b/pe/src/main/java/org/thingsboard/client/model/ReportBarChartWithLabelsSettings.java index 8c6f6170..1b6bebc1 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ReportBarChartWithLabelsSettings.java +++ b/pe/src/main/java/org/thingsboard/client/model/ReportBarChartWithLabelsSettings.java @@ -507,14 +507,14 @@ public ReportBarChartWithLabelsSettings legendValueColor(@javax.annotation.Nulla } @Override - public ReportBarChartWithLabelsSettings xaxis(@javax.annotation.Nullable TimeSeriesChartXAxisSettings xaxis) { - this.setXaxis(xaxis); + public ReportBarChartWithLabelsSettings yaxes(@javax.annotation.Nullable Map yaxes) { + this.setYaxes(yaxes); return this; } @Override - public ReportBarChartWithLabelsSettings yaxes(@javax.annotation.Nullable Map yaxes) { - this.setYaxes(yaxes); + public ReportBarChartWithLabelsSettings xaxis(@javax.annotation.Nullable TimeSeriesChartXAxisSettings xaxis) { + this.setXaxis(xaxis); return this; } @@ -748,11 +748,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%slegendValueColor%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLegendValueColor())))); } - // add `xaxis` to the URL query string - if (getXaxis() != null) { - joiner.add(getXaxis().toUrlQueryString(prefix + "xaxis" + suffix)); - } - // add `yaxes` to the URL query string if (getYaxes() != null) { for (String _key : getYaxes().keySet()) { @@ -763,6 +758,11 @@ public String toUrlQueryString(String prefix) { } } + // add `xaxis` to the URL query string + if (getXaxis() != null) { + joiner.add(getXaxis().toUrlQueryString(prefix + "xaxis" + suffix)); + } + // add `thresholds` to the URL query string if (getThresholds() != null) { for (int i = 0; i < getThresholds().size(); i++) { diff --git a/pe/src/main/java/org/thingsboard/client/model/ReportId.java b/pe/src/main/java/org/thingsboard/client/model/ReportId.java index f8f01438..1f4fb588 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ReportId.java +++ b/pe/src/main/java/org/thingsboard/client/model/ReportId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * ReportId */ @JsonPropertyOrder({ - ReportId.JSON_PROPERTY_ID, - ReportId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class ReportId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class ReportId extends EntityId { public ReportId() { } + @Override public ReportId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public ReportId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this ReportId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ReportId reportId = (ReportId) o; - return Objects.equals(this.id, reportId.id) && - Objects.equals(this.entityType, reportId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReportId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ReportId", ReportId.class); + JSON.registerDiscriminator(ReportId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/ReportInfo.java b/pe/src/main/java/org/thingsboard/client/model/ReportInfo.java index 14ddbd9c..4cde66d9 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ReportInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/ReportInfo.java @@ -111,12 +111,10 @@ public ReportInfo() { @JsonCreator public ReportInfo( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime ) { this(); this.createdTime = createdTime; - this.ownerId = ownerId; } public ReportInfo id(@javax.annotation.Nullable ReportId id) { @@ -373,6 +371,11 @@ public void setUserName(@javax.annotation.Nullable String userName) { } + public ReportInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -385,6 +388,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } /** diff --git a/pe/src/main/java/org/thingsboard/client/model/ReportRangeChartSettings.java b/pe/src/main/java/org/thingsboard/client/model/ReportRangeChartSettings.java index f0a3cb85..62693622 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ReportRangeChartSettings.java +++ b/pe/src/main/java/org/thingsboard/client/model/ReportRangeChartSettings.java @@ -429,14 +429,14 @@ public ReportRangeChartSettings legendValueColor(@javax.annotation.Nullable Stri } @Override - public ReportRangeChartSettings xaxis(@javax.annotation.Nullable TimeSeriesChartXAxisSettings xaxis) { - this.setXaxis(xaxis); + public ReportRangeChartSettings yaxes(@javax.annotation.Nullable Map yaxes) { + this.setYaxes(yaxes); return this; } @Override - public ReportRangeChartSettings yaxes(@javax.annotation.Nullable Map yaxes) { - this.setYaxes(yaxes); + public ReportRangeChartSettings xaxis(@javax.annotation.Nullable TimeSeriesChartXAxisSettings xaxis) { + this.setXaxis(xaxis); return this; } @@ -664,11 +664,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%slegendValueColor%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLegendValueColor())))); } - // add `xaxis` to the URL query string - if (getXaxis() != null) { - joiner.add(getXaxis().toUrlQueryString(prefix + "xaxis" + suffix)); - } - // add `yaxes` to the URL query string if (getYaxes() != null) { for (String _key : getYaxes().keySet()) { @@ -679,6 +674,11 @@ public String toUrlQueryString(String prefix) { } } + // add `xaxis` to the URL query string + if (getXaxis() != null) { + joiner.add(getXaxis().toUrlQueryString(prefix + "xaxis" + suffix)); + } + // add `thresholds` to the URL query string if (getThresholds() != null) { for (int i = 0; i < getThresholds().size(); i++) { diff --git a/pe/src/main/java/org/thingsboard/client/model/ReportTemplate.java b/pe/src/main/java/org/thingsboard/client/model/ReportTemplate.java index bdb4dbda..a654ceae 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ReportTemplate.java +++ b/pe/src/main/java/org/thingsboard/client/model/ReportTemplate.java @@ -107,14 +107,12 @@ public ReportTemplate() { public ReportTemplate( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; - this.ownerId = ownerId; } public ReportTemplate id(@javax.annotation.Nullable ReportTemplateId id) { @@ -327,6 +325,11 @@ public void setConfiguration(@javax.annotation.Nonnull ReportTemplateConfig _con } + public ReportTemplate ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -339,6 +342,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } /** diff --git a/pe/src/main/java/org/thingsboard/client/model/ReportTemplateId.java b/pe/src/main/java/org/thingsboard/client/model/ReportTemplateId.java index f0ca8458..b26a5154 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ReportTemplateId.java +++ b/pe/src/main/java/org/thingsboard/client/model/ReportTemplateId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * ReportTemplateId */ @JsonPropertyOrder({ - ReportTemplateId.JSON_PROPERTY_ID, - ReportTemplateId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class ReportTemplateId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class ReportTemplateId extends EntityId { public ReportTemplateId() { } + @Override public ReportTemplateId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public ReportTemplateId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this ReportTemplateId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ReportTemplateId reportTemplateId = (ReportTemplateId) o; - return Objects.equals(this.id, reportTemplateId.id) && - Objects.equals(this.entityType, reportTemplateId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReportTemplateId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ReportTemplateId", ReportTemplateId.class); + JSON.registerDiscriminator(ReportTemplateId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java b/pe/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java index a2501762..e5507ea6 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java @@ -107,15 +107,13 @@ public ReportTemplateInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; this.ownerName = ownerName; - this.ownerId = ownerId; } public ReportTemplateInfo id(@javax.annotation.Nullable ReportTemplateId id) { @@ -318,6 +316,11 @@ public String getOwnerName() { + public ReportTemplateInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -330,6 +333,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } /** diff --git a/pe/src/main/java/org/thingsboard/client/model/ReportTimeSeriesChartSettings.java b/pe/src/main/java/org/thingsboard/client/model/ReportTimeSeriesChartSettings.java index f145248a..d6966038 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ReportTimeSeriesChartSettings.java +++ b/pe/src/main/java/org/thingsboard/client/model/ReportTimeSeriesChartSettings.java @@ -70,8 +70,8 @@ ReportTimeSeriesChartSettings.JSON_PROPERTY_LEGEND_LABEL_COLOR, ReportTimeSeriesChartSettings.JSON_PROPERTY_LEGEND_VALUE_FONT, ReportTimeSeriesChartSettings.JSON_PROPERTY_LEGEND_VALUE_COLOR, - ReportTimeSeriesChartSettings.JSON_PROPERTY_XAXIS, ReportTimeSeriesChartSettings.JSON_PROPERTY_YAXES, + ReportTimeSeriesChartSettings.JSON_PROPERTY_XAXIS, ReportTimeSeriesChartSettings.JSON_PROPERTY_THRESHOLDS, ReportTimeSeriesChartSettings.JSON_PROPERTY_GRID, ReportTimeSeriesChartSettings.JSON_PROPERTY_Y_AXES, @@ -158,14 +158,14 @@ public class ReportTimeSeriesChartSettings { @javax.annotation.Nullable private String legendValueColor; - public static final String JSON_PROPERTY_XAXIS = "xaxis"; - @javax.annotation.Nullable - private TimeSeriesChartXAxisSettings xaxis; - public static final String JSON_PROPERTY_YAXES = "yaxes"; @javax.annotation.Nullable private Map yaxes = new HashMap<>(); + public static final String JSON_PROPERTY_XAXIS = "xaxis"; + @javax.annotation.Nullable + private TimeSeriesChartXAxisSettings xaxis; + public static final String JSON_PROPERTY_THRESHOLDS = "thresholds"; @javax.annotation.Nullable private List thresholds = new ArrayList<>(); @@ -589,30 +589,6 @@ public void setLegendValueColor(@javax.annotation.Nullable String legendValueCol } - public ReportTimeSeriesChartSettings xaxis(@javax.annotation.Nullable TimeSeriesChartXAxisSettings xaxis) { - this.xaxis = xaxis; - return this; - } - - /** - * Get xaxis - * @return xaxis - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_XAXIS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TimeSeriesChartXAxisSettings getXaxis() { - return xaxis; - } - - - @JsonProperty(value = JSON_PROPERTY_XAXIS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setXaxis(@javax.annotation.Nullable TimeSeriesChartXAxisSettings xaxis) { - this.xaxis = xaxis; - } - - public ReportTimeSeriesChartSettings yaxes(@javax.annotation.Nullable Map yaxes) { this.yaxes = yaxes; return this; @@ -645,6 +621,30 @@ public void setYaxes(@javax.annotation.Nullable Map thresholds) { this.thresholds = thresholds; return this; @@ -913,8 +913,8 @@ public boolean equals(Object o) { Objects.equals(this.legendLabelColor, reportTimeSeriesChartSettings.legendLabelColor) && Objects.equals(this.legendValueFont, reportTimeSeriesChartSettings.legendValueFont) && Objects.equals(this.legendValueColor, reportTimeSeriesChartSettings.legendValueColor) && - Objects.equals(this.xaxis, reportTimeSeriesChartSettings.xaxis) && Objects.equals(this.yaxes, reportTimeSeriesChartSettings.yaxes) && + Objects.equals(this.xaxis, reportTimeSeriesChartSettings.xaxis) && Objects.equals(this.thresholds, reportTimeSeriesChartSettings.thresholds) && Objects.equals(this.grid, reportTimeSeriesChartSettings.grid) && Objects.equals(this.yAxes, reportTimeSeriesChartSettings.yAxes) && @@ -928,7 +928,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(showTitle, title, titleFont, titleColor, titleAlignment, stack, comparisonEnabled, timeForComparison, comparisonCustomIntervalValue, showLegend, legendColumnTitleFont, legendColumnTitleColor, legendLabelFont, legendLabelColor, legendValueFont, legendValueColor, xaxis, yaxes, thresholds, grid, yAxes, xAxis, barWidthSettings, noAggregationBarWidthSettings, states, comparisonXAxis, legendConfig); + return Objects.hash(showTitle, title, titleFont, titleColor, titleAlignment, stack, comparisonEnabled, timeForComparison, comparisonCustomIntervalValue, showLegend, legendColumnTitleFont, legendColumnTitleColor, legendLabelFont, legendLabelColor, legendValueFont, legendValueColor, yaxes, xaxis, thresholds, grid, yAxes, xAxis, barWidthSettings, noAggregationBarWidthSettings, states, comparisonXAxis, legendConfig); } @Override @@ -951,8 +951,8 @@ public String toString() { sb.append(" legendLabelColor: ").append(toIndentedString(legendLabelColor)).append("\n"); sb.append(" legendValueFont: ").append(toIndentedString(legendValueFont)).append("\n"); sb.append(" legendValueColor: ").append(toIndentedString(legendValueColor)).append("\n"); - sb.append(" xaxis: ").append(toIndentedString(xaxis)).append("\n"); sb.append(" yaxes: ").append(toIndentedString(yaxes)).append("\n"); + sb.append(" xaxis: ").append(toIndentedString(xaxis)).append("\n"); sb.append(" thresholds: ").append(toIndentedString(thresholds)).append("\n"); sb.append(" grid: ").append(toIndentedString(grid)).append("\n"); sb.append(" yAxes: ").append(toIndentedString(yAxes)).append("\n"); @@ -1089,11 +1089,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%slegendValueColor%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLegendValueColor())))); } - // add `xaxis` to the URL query string - if (getXaxis() != null) { - joiner.add(getXaxis().toUrlQueryString(prefix + "xaxis" + suffix)); - } - // add `yaxes` to the URL query string if (getYaxes() != null) { for (String _key : getYaxes().keySet()) { @@ -1104,6 +1099,11 @@ public String toUrlQueryString(String prefix) { } } + // add `xaxis` to the URL query string + if (getXaxis() != null) { + joiner.add(getXaxis().toUrlQueryString(prefix + "xaxis" + suffix)); + } + // add `thresholds` to the URL query string if (getThresholds() != null) { for (int i = 0; i < getThresholds().size(); i++) { diff --git a/pe/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java index fec24a83..2648f043 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public ResourceShortageRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public ResourceShortageRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/Role.java b/pe/src/main/java/org/thingsboard/client/model/Role.java index 83d7b32e..fa769846 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Role.java +++ b/pe/src/main/java/org/thingsboard/client/model/Role.java @@ -100,14 +100,12 @@ public Role() { public Role( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime ) { this(); this.tenantId = tenantId; this.customerId = customerId; this.createdTime = createdTime; - this.ownerId = ownerId; } /** @@ -272,6 +270,11 @@ public Long getCreatedTime() { + public Role ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -284,6 +287,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public Role additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/RoleId.java b/pe/src/main/java/org/thingsboard/client/model/RoleId.java index 11ce9b7f..dcda95f8 100644 --- a/pe/src/main/java/org/thingsboard/client/model/RoleId.java +++ b/pe/src/main/java/org/thingsboard/client/model/RoleId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * RoleId */ @JsonPropertyOrder({ - RoleId.JSON_PROPERTY_ID, - RoleId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class RoleId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class RoleId extends EntityId { public RoleId() { } + @Override public RoleId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public RoleId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this RoleId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RoleId roleId = (RoleId) o; - return Objects.equals(this.id, roleId.id) && - Objects.equals(this.entityType, roleId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RoleId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RoleId", RoleId.class); + JSON.registerDiscriminator(RoleId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/RpcId.java b/pe/src/main/java/org/thingsboard/client/model/RpcId.java index 1239c609..fd1aeb41 100644 --- a/pe/src/main/java/org/thingsboard/client/model/RpcId.java +++ b/pe/src/main/java/org/thingsboard/client/model/RpcId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * RpcId */ @JsonPropertyOrder({ - RpcId.JSON_PROPERTY_ID, - RpcId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class RpcId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class RpcId extends EntityId { public RpcId() { } + @Override public RpcId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public RpcId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this RpcId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RpcId rpcId = (RpcId) o; - return Objects.equals(this.id, rpcId.id) && - Objects.equals(this.entityType, rpcId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RpcId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RpcId", RpcId.class); + JSON.registerDiscriminator(RpcId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/RuleChainId.java b/pe/src/main/java/org/thingsboard/client/model/RuleChainId.java index 2eb75b35..7299e140 100644 --- a/pe/src/main/java/org/thingsboard/client/model/RuleChainId.java +++ b/pe/src/main/java/org/thingsboard/client/model/RuleChainId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * RuleChainId */ @JsonPropertyOrder({ - RuleChainId.JSON_PROPERTY_ID, - RuleChainId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class RuleChainId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class RuleChainId extends EntityId { public RuleChainId() { } + @Override public RuleChainId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public RuleChainId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this RuleChainId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RuleChainId ruleChainId = (RuleChainId) o; - return Objects.equals(this.id, ruleChainId.id) && - Objects.equals(this.entityType, ruleChainId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RuleChainId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RuleChainId", RuleChainId.class); + JSON.registerDiscriminator(RuleChainId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java index ba2ded17..ecb3241e 100644 --- a/pe/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public RuleEngineComponentLifecycleEventRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public RuleEngineComponentLifecycleEventRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/RuleNodeId.java b/pe/src/main/java/org/thingsboard/client/model/RuleNodeId.java index 958781cb..4f370578 100644 --- a/pe/src/main/java/org/thingsboard/client/model/RuleNodeId.java +++ b/pe/src/main/java/org/thingsboard/client/model/RuleNodeId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * RuleNodeId */ @JsonPropertyOrder({ - RuleNodeId.JSON_PROPERTY_ID, - RuleNodeId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class RuleNodeId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class RuleNodeId extends EntityId { public RuleNodeId() { } + @Override public RuleNodeId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public RuleNodeId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this RuleNodeId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RuleNodeId ruleNodeId = (RuleNodeId) o; - return Objects.equals(this.id, ruleNodeId.id) && - Objects.equals(this.entityType, ruleNodeId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RuleNodeId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RuleNodeId", RuleNodeId.class); + JSON.registerDiscriminator(RuleNodeId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java b/pe/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java index c8a0ede2..666f0815 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java @@ -126,21 +126,17 @@ public ScheduledReportInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, @JsonProperty(JSON_PROPERTY_TEMPLATE_INFO) EntityInfo templateInfo, @JsonProperty(JSON_PROPERTY_CUSTOMER_TITLE) String customerTitle, - @JsonProperty(JSON_PROPERTY_USER_NAME) String userName, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_USER_NAME) String userName ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; - this.originatorId = originatorId; this.templateInfo = templateInfo; this.customerTitle = customerTitle; this.userName = userName; - this.ownerId = ownerId; } public ScheduledReportInfo id(@javax.annotation.Nullable SchedulerEventId id) { @@ -209,6 +205,11 @@ public CustomerId getCustomerId() { + public ScheduledReportInfo originatorId(@javax.annotation.Nullable EntityId originatorId) { + this.originatorId = originatorId; + return this; + } + /** * JSON object with Originator Id * @return originatorId @@ -221,6 +222,11 @@ public EntityId getOriginatorId() { } + @JsonProperty(value = JSON_PROPERTY_ORIGINATOR_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOriginatorId(@javax.annotation.Nullable EntityId originatorId) { + this.originatorId = originatorId; + } public ScheduledReportInfo name(@javax.annotation.Nullable String name) { @@ -385,6 +391,11 @@ public String getUserName() { + public ScheduledReportInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -397,6 +408,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public ScheduledReportInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/SchedulerEvent.java b/pe/src/main/java/org/thingsboard/client/model/SchedulerEvent.java index 4ba83359..320fd250 100644 --- a/pe/src/main/java/org/thingsboard/client/model/SchedulerEvent.java +++ b/pe/src/main/java/org/thingsboard/client/model/SchedulerEvent.java @@ -114,16 +114,12 @@ public SchedulerEvent() { public SchedulerEvent( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; - this.originatorId = originatorId; - this.ownerId = ownerId; } public SchedulerEvent id(@javax.annotation.Nullable SchedulerEventId id) { @@ -192,6 +188,11 @@ public CustomerId getCustomerId() { + public SchedulerEvent originatorId(@javax.annotation.Nullable EntityId originatorId) { + this.originatorId = originatorId; + return this; + } + /** * JSON object with Originator Id * @return originatorId @@ -204,6 +205,11 @@ public EntityId getOriginatorId() { } + @JsonProperty(value = JSON_PROPERTY_ORIGINATOR_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOriginatorId(@javax.annotation.Nullable EntityId originatorId) { + this.originatorId = originatorId; + } public SchedulerEvent name(@javax.annotation.Nullable String name) { @@ -350,6 +356,11 @@ public void setConfiguration(@javax.annotation.Nullable com.fasterxml.jackson.da } + public SchedulerEvent ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -362,6 +373,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public SchedulerEvent additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/SchedulerEventId.java b/pe/src/main/java/org/thingsboard/client/model/SchedulerEventId.java index f2e94e09..3f7afdd4 100644 --- a/pe/src/main/java/org/thingsboard/client/model/SchedulerEventId.java +++ b/pe/src/main/java/org/thingsboard/client/model/SchedulerEventId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * SchedulerEventId */ @JsonPropertyOrder({ - SchedulerEventId.JSON_PROPERTY_ID, - SchedulerEventId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class SchedulerEventId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class SchedulerEventId extends EntityId { public SchedulerEventId() { } + @Override public SchedulerEventId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public SchedulerEventId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this SchedulerEventId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SchedulerEventId schedulerEventId = (SchedulerEventId) o; - return Objects.equals(this.id, schedulerEventId.id) && - Objects.equals(this.entityType, schedulerEventId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SchedulerEventId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("SchedulerEventId", SchedulerEventId.class); + JSON.registerDiscriminator(SchedulerEventId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java b/pe/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java index 376887d7..cfcd9048 100644 --- a/pe/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java @@ -109,16 +109,12 @@ public SchedulerEventInfo() { public SchedulerEventInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; - this.originatorId = originatorId; - this.ownerId = ownerId; } public SchedulerEventInfo id(@javax.annotation.Nullable SchedulerEventId id) { @@ -187,6 +183,11 @@ public CustomerId getCustomerId() { + public SchedulerEventInfo originatorId(@javax.annotation.Nullable EntityId originatorId) { + this.originatorId = originatorId; + return this; + } + /** * JSON object with Originator Id * @return originatorId @@ -199,6 +200,11 @@ public EntityId getOriginatorId() { } + @JsonProperty(value = JSON_PROPERTY_ORIGINATOR_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOriginatorId(@javax.annotation.Nullable EntityId originatorId) { + this.originatorId = originatorId; + } public SchedulerEventInfo name(@javax.annotation.Nullable String name) { @@ -321,6 +327,11 @@ public void setVersion(@javax.annotation.Nullable Long version) { } + public SchedulerEventInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -333,6 +344,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public SchedulerEventInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java b/pe/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java index 82d5bc53..01c75b25 100644 --- a/pe/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java @@ -127,17 +127,13 @@ public SchedulerEventWithCustomerInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_IS_PUBLIC) Boolean customerIsPublic, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_IS_PUBLIC) Boolean customerIsPublic ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; - this.originatorId = originatorId; this.customerIsPublic = customerIsPublic; - this.ownerId = ownerId; } public SchedulerEventWithCustomerInfo id(@javax.annotation.Nullable SchedulerEventId id) { @@ -206,6 +202,11 @@ public CustomerId getCustomerId() { + public SchedulerEventWithCustomerInfo originatorId(@javax.annotation.Nullable EntityId originatorId) { + this.originatorId = originatorId; + return this; + } + /** * JSON object with Originator Id * @return originatorId @@ -218,6 +219,11 @@ public EntityId getOriginatorId() { } + @JsonProperty(value = JSON_PROPERTY_ORIGINATOR_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOriginatorId(@javax.annotation.Nullable EntityId originatorId) { + this.originatorId = originatorId; + } public SchedulerEventWithCustomerInfo name(@javax.annotation.Nullable String name) { @@ -410,6 +416,11 @@ public void setTimestamps(@javax.annotation.Nullable List timestamps) { } + public SchedulerEventWithCustomerInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -422,6 +433,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public SchedulerEventWithCustomerInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/ScriptCalculatedFieldConfiguration.java b/pe/src/main/java/org/thingsboard/client/model/ScriptCalculatedFieldConfiguration.java index 2d1c1413..4619b490 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ScriptCalculatedFieldConfiguration.java +++ b/pe/src/main/java/org/thingsboard/client/model/ScriptCalculatedFieldConfiguration.java @@ -123,7 +123,7 @@ public void setExpression(@javax.annotation.Nullable String expression) { @Override - public ScriptCalculatedFieldConfiguration output(@javax.annotation.Nonnull Output output) { + public ScriptCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { this.setOutput(output); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/SecretId.java b/pe/src/main/java/org/thingsboard/client/model/SecretId.java index cb4fd334..2871141a 100644 --- a/pe/src/main/java/org/thingsboard/client/model/SecretId.java +++ b/pe/src/main/java/org/thingsboard/client/model/SecretId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * SecretId */ @JsonPropertyOrder({ - SecretId.JSON_PROPERTY_ID, - SecretId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class SecretId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class SecretId extends EntityId { public SecretId() { } + @Override public SecretId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public SecretId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this SecretId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecretId secretId = (SecretId) o; - return Objects.equals(this.id, secretId.id) && - Objects.equals(this.entityType, secretId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SecretId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("SecretId", SecretId.class); + JSON.registerDiscriminator(SecretId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/SelfRegistrationParams.java b/pe/src/main/java/org/thingsboard/client/model/SelfRegistrationParams.java index b81fc8a4..1fdbb427 100644 --- a/pe/src/main/java/org/thingsboard/client/model/SelfRegistrationParams.java +++ b/pe/src/main/java/org/thingsboard/client/model/SelfRegistrationParams.java @@ -58,12 +58,12 @@ SelfRegistrationParams.JSON_PROPERTY_ENABLED, SelfRegistrationParams.JSON_PROPERTY_HOME_DASHBOARD, SelfRegistrationParams.JSON_PROPERTY_NOTIFICATION_RECIPIENT, - SelfRegistrationParams.JSON_PROPERTY_CAPTCHA, SelfRegistrationParams.JSON_PROPERTY_SIGN_UP_FIELDS, SelfRegistrationParams.JSON_PROPERTY_DEFAULT_DASHBOARD, SelfRegistrationParams.JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, SelfRegistrationParams.JSON_PROPERTY_CUSTOM_MENU_ID, - SelfRegistrationParams.JSON_PROPERTY_CUSTOMER_GROUP_ID + SelfRegistrationParams.JSON_PROPERTY_CUSTOMER_GROUP_ID, + SelfRegistrationParams.JSON_PROPERTY_CAPTCHA }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -109,10 +109,6 @@ public class SelfRegistrationParams { @javax.annotation.Nullable private NotificationTargetId notificationRecipient; - public static final String JSON_PROPERTY_CAPTCHA = "captcha"; - @javax.annotation.Nullable - private CaptchaParams captcha; - public static final String JSON_PROPERTY_SIGN_UP_FIELDS = "signUpFields"; @javax.annotation.Nullable private List signUpFields = new ArrayList<>(); @@ -133,6 +129,10 @@ public class SelfRegistrationParams { @javax.annotation.Nullable private EntityGroupId customerGroupId; + public static final String JSON_PROPERTY_CAPTCHA = "captcha"; + @javax.annotation.Nullable + private CaptchaParams captcha; + public SelfRegistrationParams() { } @@ -336,30 +336,6 @@ public void setNotificationRecipient(@javax.annotation.Nullable NotificationTarg } - public SelfRegistrationParams captcha(@javax.annotation.Nullable CaptchaParams captcha) { - this.captcha = captcha; - return this; - } - - /** - * Get captcha - * @return captcha - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CaptchaParams getCaptcha() { - return captcha; - } - - - @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCaptcha(@javax.annotation.Nullable CaptchaParams captcha) { - this.captcha = captcha; - } - - public SelfRegistrationParams signUpFields(@javax.annotation.Nullable List signUpFields) { this.signUpFields = signUpFields; return this; @@ -488,6 +464,30 @@ public void setCustomerGroupId(@javax.annotation.Nullable EntityGroupId customer } + public SelfRegistrationParams captcha(@javax.annotation.Nullable CaptchaParams captcha) { + this.captcha = captcha; + return this; + } + + /** + * Get captcha + * @return captcha + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CaptchaParams getCaptcha() { + return captcha; + } + + + @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCaptcha(@javax.annotation.Nullable CaptchaParams captcha) { + this.captcha = captcha; + } + + /** * Return true if this SelfRegistrationParams object is equal to o. */ @@ -508,17 +508,17 @@ public boolean equals(Object o) { Objects.equals(this.enabled, selfRegistrationParams.enabled) && Objects.equals(this.homeDashboard, selfRegistrationParams.homeDashboard) && Objects.equals(this.notificationRecipient, selfRegistrationParams.notificationRecipient) && - Objects.equals(this.captcha, selfRegistrationParams.captcha) && Objects.equals(this.signUpFields, selfRegistrationParams.signUpFields) && Objects.equals(this.defaultDashboard, selfRegistrationParams.defaultDashboard) && Objects.equals(this.customerTitlePrefix, selfRegistrationParams.customerTitlePrefix) && Objects.equals(this.customMenuId, selfRegistrationParams.customMenuId) && - Objects.equals(this.customerGroupId, selfRegistrationParams.customerGroupId); + Objects.equals(this.customerGroupId, selfRegistrationParams.customerGroupId) && + Objects.equals(this.captcha, selfRegistrationParams.captcha); } @Override public int hashCode() { - return Objects.hash(permissions, type, showPrivacyPolicy, showTermsOfUse, title, enabled, homeDashboard, notificationRecipient, captcha, signUpFields, defaultDashboard, customerTitlePrefix, customMenuId, customerGroupId); + return Objects.hash(permissions, type, showPrivacyPolicy, showTermsOfUse, title, enabled, homeDashboard, notificationRecipient, signUpFields, defaultDashboard, customerTitlePrefix, customMenuId, customerGroupId, captcha); } @Override @@ -533,12 +533,12 @@ public String toString() { sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); sb.append(" homeDashboard: ").append(toIndentedString(homeDashboard)).append("\n"); sb.append(" notificationRecipient: ").append(toIndentedString(notificationRecipient)).append("\n"); - sb.append(" captcha: ").append(toIndentedString(captcha)).append("\n"); sb.append(" signUpFields: ").append(toIndentedString(signUpFields)).append("\n"); sb.append(" defaultDashboard: ").append(toIndentedString(defaultDashboard)).append("\n"); sb.append(" customerTitlePrefix: ").append(toIndentedString(customerTitlePrefix)).append("\n"); sb.append(" customMenuId: ").append(toIndentedString(customMenuId)).append("\n"); sb.append(" customerGroupId: ").append(toIndentedString(customerGroupId)).append("\n"); + sb.append(" captcha: ").append(toIndentedString(captcha)).append("\n"); sb.append("}"); return sb.toString(); } @@ -631,11 +631,6 @@ public String toUrlQueryString(String prefix) { joiner.add(getNotificationRecipient().toUrlQueryString(prefix + "notificationRecipient" + suffix)); } - // add `captcha` to the URL query string - if (getCaptcha() != null) { - joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); - } - // add `signUpFields` to the URL query string if (getSignUpFields() != null) { for (int i = 0; i < getSignUpFields().size(); i++) { @@ -666,6 +661,11 @@ public String toUrlQueryString(String prefix) { joiner.add(getCustomerGroupId().toUrlQueryString(prefix + "customerGroupId" + suffix)); } + // add `captcha` to the URL query string + if (getCaptcha() != null) { + joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/ShortEntityView.java b/pe/src/main/java/org/thingsboard/client/model/ShortEntityView.java index 71ce6bed..7c1087a8 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ShortEntityView.java +++ b/pe/src/main/java/org/thingsboard/client/model/ShortEntityView.java @@ -54,14 +54,17 @@ public ShortEntityView() { @JsonCreator public ShortEntityView( - @JsonProperty(JSON_PROPERTY_ID) EntityId id, @JsonProperty(JSON_PROPERTY_NAME) String name ) { this(); - this.id = id; this.name = name; } + public ShortEntityView id(@javax.annotation.Nonnull EntityId id) { + this.id = id; + return this; + } + /** * Entity Id object * @return id @@ -74,6 +77,11 @@ public EntityId getId() { } + @JsonProperty(value = JSON_PROPERTY_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull EntityId id) { + this.id = id; + } /** diff --git a/pe/src/main/java/org/thingsboard/client/model/SimpleCalculatedFieldConfiguration.java b/pe/src/main/java/org/thingsboard/client/model/SimpleCalculatedFieldConfiguration.java index a792bc35..80b77f65 100644 --- a/pe/src/main/java/org/thingsboard/client/model/SimpleCalculatedFieldConfiguration.java +++ b/pe/src/main/java/org/thingsboard/client/model/SimpleCalculatedFieldConfiguration.java @@ -152,7 +152,7 @@ public void setUseLatestTs(@javax.annotation.Nullable Boolean useLatestTs) { @Override - public SimpleCalculatedFieldConfiguration output(@javax.annotation.Nonnull Output output) { + public SimpleCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { this.setOutput(output); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/Success.java b/pe/src/main/java/org/thingsboard/client/model/Success.java index 9dc09116..9a796e60 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Success.java +++ b/pe/src/main/java/org/thingsboard/client/model/Success.java @@ -40,8 +40,7 @@ * Success */ @JsonPropertyOrder({ - Success.JSON_PROPERTY_GENERATED_CONTENT, - Success.JSON_PROPERTY_STATUS + Success.JSON_PROPERTY_GENERATED_CONTENT }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -55,10 +54,6 @@ public class Success extends TbChatResponse { @javax.annotation.Nullable private String generatedContent; - public static final String JSON_PROPERTY_STATUS = "status"; - @javax.annotation.Nullable - private String status; - public Success() { } @@ -86,30 +81,12 @@ public void setGeneratedContent(@javax.annotation.Nullable String generatedConte } - public Success status(@javax.annotation.Nullable String status) { - this.status = status; + @Override + public Success status(@javax.annotation.Nonnull String status) { + this.setStatus(status); return this; } - /** - * Get status - * @return status - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_STATUS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } - - - @JsonProperty(value = JSON_PROPERTY_STATUS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatus(@javax.annotation.Nullable String status) { - this.status = status; - } - - /** * Return true if this Success object is equal to o. */ @@ -123,13 +100,12 @@ public boolean equals(Object o) { } Success success = (Success) o; return Objects.equals(this.generatedContent, success.generatedContent) && - Objects.equals(this.status, success.status) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(generatedContent, status, super.hashCode()); + return Objects.hash(generatedContent, super.hashCode()); } @Override @@ -138,7 +114,6 @@ public String toString() { sb.append("class Success {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" generatedContent: ").append(toIndentedString(generatedContent)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/pe/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java index b6f7856b..befe1f1e 100644 --- a/pe/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public TaskProcessingFailureRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public TaskProcessingFailureRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/pe/src/main/java/org/thingsboard/client/model/TbResource.java b/pe/src/main/java/org/thingsboard/client/model/TbResource.java index 9ee6146d..d7a71331 100644 --- a/pe/src/main/java/org/thingsboard/client/model/TbResource.java +++ b/pe/src/main/java/org/thingsboard/client/model/TbResource.java @@ -56,8 +56,8 @@ TbResource.JSON_PROPERTY_PREVIEW, TbResource.JSON_PROPERTY_NAME, TbResource.JSON_PROPERTY_PUBLIC, - TbResource.JSON_PROPERTY_LINK, - TbResource.JSON_PROPERTY_PUBLIC_LINK + TbResource.JSON_PROPERTY_PUBLIC_LINK, + TbResource.JSON_PROPERTY_LINK }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class TbResource { @@ -125,14 +125,14 @@ public class TbResource { @javax.annotation.Nullable private Boolean _public; - public static final String JSON_PROPERTY_LINK = "link"; - @javax.annotation.Nullable - private String link; - public static final String JSON_PROPERTY_PUBLIC_LINK = "publicLink"; @javax.annotation.Nullable private String publicLink; + public static final String JSON_PROPERTY_LINK = "link"; + @javax.annotation.Nullable + private String link; + public TbResource() { } @@ -143,8 +143,8 @@ public TbResource( @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_ETAG) String etag, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_LINK) String link, - @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink + @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink, + @JsonProperty(JSON_PROPERTY_LINK) String link ) { this(); this.createdTime = createdTime; @@ -152,8 +152,8 @@ public TbResource( this.customerId = customerId; this.etag = etag; this.name = name; - this.link = link; this.publicLink = publicLink; + this.link = link; } public TbResource id(@javax.annotation.Nullable TbResourceId id) { @@ -491,28 +491,28 @@ public void setPublic(@javax.annotation.Nullable Boolean _public) { /** - * Get link - * @return link + * Get publicLink + * @return publicLink */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLink() { - return link; + public String getPublicLink() { + return publicLink; } /** - * Get publicLink - * @return publicLink + * Get link + * @return link */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicLink() { - return publicLink; + public String getLink() { + return link; } @@ -546,13 +546,13 @@ public boolean equals(Object o) { Objects.equals(this.preview, tbResource.preview) && Objects.equals(this.name, tbResource.name) && Objects.equals(this._public, tbResource._public) && - Objects.equals(this.link, tbResource.link) && - Objects.equals(this.publicLink, tbResource.publicLink); + Objects.equals(this.publicLink, tbResource.publicLink) && + Objects.equals(this.link, tbResource.link); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, customerId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, data, preview, name, _public, link, publicLink); + return Objects.hash(id, createdTime, tenantId, customerId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, data, preview, name, _public, publicLink, link); } @Override @@ -575,8 +575,8 @@ public String toString() { sb.append(" preview: ").append(toIndentedString(preview)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); - sb.append(" link: ").append(toIndentedString(link)).append("\n"); sb.append(" publicLink: ").append(toIndentedString(publicLink)).append("\n"); + sb.append(" link: ").append(toIndentedString(link)).append("\n"); sb.append("}"); return sb.toString(); } @@ -704,16 +704,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%spublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublic())))); } - // add `link` to the URL query string - if (getLink() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%slink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLink())))); - } - // add `publicLink` to the URL query string if (getPublicLink() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%spublicLink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublicLink())))); } + // add `link` to the URL query string + if (getLink() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%slink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLink())))); + } + return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/TbResourceId.java b/pe/src/main/java/org/thingsboard/client/model/TbResourceId.java index 76518ea8..a7e675f0 100644 --- a/pe/src/main/java/org/thingsboard/client/model/TbResourceId.java +++ b/pe/src/main/java/org/thingsboard/client/model/TbResourceId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * TbResourceId */ @JsonPropertyOrder({ - TbResourceId.JSON_PROPERTY_ID, - TbResourceId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class TbResourceId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class TbResourceId extends EntityId { public TbResourceId() { } + @Override public TbResourceId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public TbResourceId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this TbResourceId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TbResourceId tbResourceId = (TbResourceId) o; - return Objects.equals(this.id, tbResourceId.id) && - Objects.equals(this.entityType, tbResourceId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TbResourceId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TbResourceId", TbResourceId.class); + JSON.registerDiscriminator(TbResourceId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/TbResourceInfo.java b/pe/src/main/java/org/thingsboard/client/model/TbResourceInfo.java index 23929092..52a73373 100644 --- a/pe/src/main/java/org/thingsboard/client/model/TbResourceInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/TbResourceInfo.java @@ -54,8 +54,8 @@ TbResourceInfo.JSON_PROPERTY_DESCRIPTOR, TbResourceInfo.JSON_PROPERTY_NAME, TbResourceInfo.JSON_PROPERTY_PUBLIC, - TbResourceInfo.JSON_PROPERTY_LINK, - TbResourceInfo.JSON_PROPERTY_PUBLIC_LINK + TbResourceInfo.JSON_PROPERTY_PUBLIC_LINK, + TbResourceInfo.JSON_PROPERTY_LINK }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class TbResourceInfo { @@ -115,14 +115,14 @@ public class TbResourceInfo { @javax.annotation.Nullable private Boolean _public; - public static final String JSON_PROPERTY_LINK = "link"; - @javax.annotation.Nullable - private String link; - public static final String JSON_PROPERTY_PUBLIC_LINK = "publicLink"; @javax.annotation.Nullable private String publicLink; + public static final String JSON_PROPERTY_LINK = "link"; + @javax.annotation.Nullable + private String link; + public TbResourceInfo() { } @@ -133,8 +133,8 @@ public TbResourceInfo( @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_ETAG) String etag, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_LINK) String link, - @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink + @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink, + @JsonProperty(JSON_PROPERTY_LINK) String link ) { this(); this.createdTime = createdTime; @@ -142,8 +142,8 @@ public TbResourceInfo( this.customerId = customerId; this.etag = etag; this.name = name; - this.link = link; this.publicLink = publicLink; + this.link = link; } public TbResourceInfo id(@javax.annotation.Nullable TbResourceId id) { @@ -433,28 +433,28 @@ public void setPublic(@javax.annotation.Nullable Boolean _public) { /** - * Get link - * @return link + * Get publicLink + * @return publicLink */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLink() { - return link; + public String getPublicLink() { + return publicLink; } /** - * Get publicLink - * @return publicLink + * Get link + * @return link */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicLink() { - return publicLink; + public String getLink() { + return link; } @@ -486,13 +486,13 @@ public boolean equals(Object o) { Objects.equals(this.descriptor, tbResourceInfo.descriptor) && Objects.equals(this.name, tbResourceInfo.name) && Objects.equals(this._public, tbResourceInfo._public) && - Objects.equals(this.link, tbResourceInfo.link) && - Objects.equals(this.publicLink, tbResourceInfo.publicLink); + Objects.equals(this.publicLink, tbResourceInfo.publicLink) && + Objects.equals(this.link, tbResourceInfo.link); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, customerId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, name, _public, link, publicLink); + return Objects.hash(id, createdTime, tenantId, customerId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, name, _public, publicLink, link); } @Override @@ -513,8 +513,8 @@ public String toString() { sb.append(" descriptor: ").append(toIndentedString(descriptor)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); - sb.append(" link: ").append(toIndentedString(link)).append("\n"); sb.append(" publicLink: ").append(toIndentedString(publicLink)).append("\n"); + sb.append(" link: ").append(toIndentedString(link)).append("\n"); sb.append("}"); return sb.toString(); } @@ -632,16 +632,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%spublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublic())))); } - // add `link` to the URL query string - if (getLink() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%slink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLink())))); - } - // add `publicLink` to the URL query string if (getPublicLink() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%spublicLink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublicLink())))); } + // add `link` to the URL query string + if (getLink() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%slink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLink())))); + } + return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/TenantId.java b/pe/src/main/java/org/thingsboard/client/model/TenantId.java index 70448feb..ef7de97d 100644 --- a/pe/src/main/java/org/thingsboard/client/model/TenantId.java +++ b/pe/src/main/java/org/thingsboard/client/model/TenantId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * TenantId */ @JsonPropertyOrder({ - TenantId.JSON_PROPERTY_ID, - TenantId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class TenantId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class TenantId extends EntityId { public TenantId() { } + @Override public TenantId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public TenantId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this TenantId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TenantId tenantId = (TenantId) o; - return Objects.equals(this.id, tenantId.id) && - Objects.equals(this.entityType, tenantId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TenantId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TenantId", TenantId.class); + JSON.registerDiscriminator(TenantId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/TenantProfileId.java b/pe/src/main/java/org/thingsboard/client/model/TenantProfileId.java index 0576c6ec..55e6ec28 100644 --- a/pe/src/main/java/org/thingsboard/client/model/TenantProfileId.java +++ b/pe/src/main/java/org/thingsboard/client/model/TenantProfileId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * TenantProfileId */ @JsonPropertyOrder({ - TenantProfileId.JSON_PROPERTY_ID, - TenantProfileId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class TenantProfileId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class TenantProfileId extends EntityId { public TenantProfileId() { } + @Override public TenantProfileId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public TenantProfileId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this TenantProfileId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TenantProfileId tenantProfileId = (TenantProfileId) o; - return Objects.equals(this.id, tenantProfileId.id) && - Objects.equals(this.entityType, tenantProfileId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TenantProfileId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TenantProfileId", TenantProfileId.class); + JSON.registerDiscriminator(TenantProfileId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/TimeSeriesOutput.java b/pe/src/main/java/org/thingsboard/client/model/TimeSeriesOutput.java index 38f4f0aa..2d6b122f 100644 --- a/pe/src/main/java/org/thingsboard/client/model/TimeSeriesOutput.java +++ b/pe/src/main/java/org/thingsboard/client/model/TimeSeriesOutput.java @@ -30,9 +30,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; import org.thingsboard.client.model.AttributeScope; import org.thingsboard.client.model.Output; -import org.thingsboard.client.model.TimeSeriesOutputStrategy; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -42,7 +42,6 @@ * TimeSeriesOutput */ @JsonPropertyOrder({ - TimeSeriesOutput.JSON_PROPERTY_STRATEGY }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -52,37 +51,9 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) public class TimeSeriesOutput extends Output { - public static final String JSON_PROPERTY_STRATEGY = "strategy"; - @javax.annotation.Nullable - private TimeSeriesOutputStrategy strategy; - public TimeSeriesOutput() { } - public TimeSeriesOutput strategy(@javax.annotation.Nullable TimeSeriesOutputStrategy strategy) { - this.strategy = strategy; - return this; - } - - /** - * Get strategy - * @return strategy - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_STRATEGY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TimeSeriesOutputStrategy getStrategy() { - return strategy; - } - - - @JsonProperty(value = JSON_PROPERTY_STRATEGY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStrategy(@javax.annotation.Nullable TimeSeriesOutputStrategy strategy) { - this.strategy = strategy; - } - - @Override public TimeSeriesOutput name(@javax.annotation.Nullable String name) { this.setName(name); @@ -101,6 +72,12 @@ public TimeSeriesOutput decimalsByDefault(@javax.annotation.Nullable Integer dec return this; } + @Override + public TimeSeriesOutput strategy(@javax.annotation.Nullable Object strategy) { + this.setStrategy(strategy); + return this; + } + @Override public TimeSeriesOutput type(@javax.annotation.Nonnull String type) { this.setType(type); @@ -118,14 +95,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TimeSeriesOutput timeSeriesOutput = (TimeSeriesOutput) o; - return Objects.equals(this.strategy, timeSeriesOutput.strategy) && - super.equals(o); + return super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { - return Objects.hash(strategy, super.hashCode()); + return Objects.hash(super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -133,7 +119,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TimeSeriesOutput {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" strategy: ").append(toIndentedString(strategy)).append("\n"); sb.append("}"); return sb.toString(); } @@ -198,7 +183,7 @@ public String toUrlQueryString(String prefix) { // add `strategy` to the URL query string if (getStrategy() != null) { - joiner.add(getStrategy().toUrlQueryString(prefix + "strategy" + suffix)); + joiner.add(String.format(java.util.Locale.ROOT, "%sstrategy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStrategy())))); } // add `type` to the URL query string diff --git a/pe/src/main/java/org/thingsboard/client/model/TsKvEntry.java b/pe/src/main/java/org/thingsboard/client/model/TsKvEntry.java index 4c9de9ca..033de962 100644 --- a/pe/src/main/java/org/thingsboard/client/model/TsKvEntry.java +++ b/pe/src/main/java/org/thingsboard/client/model/TsKvEntry.java @@ -43,13 +43,13 @@ TsKvEntry.JSON_PROPERTY_TS, TsKvEntry.JSON_PROPERTY_VALUE, TsKvEntry.JSON_PROPERTY_KEY, + TsKvEntry.JSON_PROPERTY_DOUBLE_VALUE, + TsKvEntry.JSON_PROPERTY_LONG_VALUE, TsKvEntry.JSON_PROPERTY_BOOLEAN_VALUE, - TsKvEntry.JSON_PROPERTY_VALUE_AS_STRING, TsKvEntry.JSON_PROPERTY_DATA_TYPE, TsKvEntry.JSON_PROPERTY_JSON_VALUE, TsKvEntry.JSON_PROPERTY_STR_VALUE, - TsKvEntry.JSON_PROPERTY_LONG_VALUE, - TsKvEntry.JSON_PROPERTY_DOUBLE_VALUE, + TsKvEntry.JSON_PROPERTY_VALUE_AS_STRING, TsKvEntry.JSON_PROPERTY_VERSION }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @@ -65,13 +65,17 @@ public class TsKvEntry { @javax.annotation.Nullable private String key; - public static final String JSON_PROPERTY_BOOLEAN_VALUE = "booleanValue"; + public static final String JSON_PROPERTY_DOUBLE_VALUE = "doubleValue"; @javax.annotation.Nullable - private Boolean booleanValue; + private Double doubleValue; - public static final String JSON_PROPERTY_VALUE_AS_STRING = "valueAsString"; + public static final String JSON_PROPERTY_LONG_VALUE = "longValue"; @javax.annotation.Nullable - private String valueAsString; + private Long longValue; + + public static final String JSON_PROPERTY_BOOLEAN_VALUE = "booleanValue"; + @javax.annotation.Nullable + private Boolean booleanValue; public static final String JSON_PROPERTY_DATA_TYPE = "dataType"; @javax.annotation.Nullable @@ -85,13 +89,9 @@ public class TsKvEntry { @javax.annotation.Nullable private String strValue; - public static final String JSON_PROPERTY_LONG_VALUE = "longValue"; - @javax.annotation.Nullable - private Long longValue; - - public static final String JSON_PROPERTY_DOUBLE_VALUE = "doubleValue"; + public static final String JSON_PROPERTY_VALUE_AS_STRING = "valueAsString"; @javax.annotation.Nullable - private Double doubleValue; + private String valueAsString; public static final String JSON_PROPERTY_VERSION = "version"; @javax.annotation.Nullable @@ -180,51 +180,75 @@ public void setKey(@javax.annotation.Nullable String key) { } - public TsKvEntry booleanValue(@javax.annotation.Nullable Boolean booleanValue) { - this.booleanValue = booleanValue; + public TsKvEntry doubleValue(@javax.annotation.Nullable Double doubleValue) { + this.doubleValue = doubleValue; return this; } /** - * Get booleanValue - * @return booleanValue + * Get doubleValue + * @return doubleValue */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_BOOLEAN_VALUE, required = false) + @JsonProperty(value = JSON_PROPERTY_DOUBLE_VALUE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getBooleanValue() { - return booleanValue; + public Double getDoubleValue() { + return doubleValue; } - @JsonProperty(value = JSON_PROPERTY_BOOLEAN_VALUE, required = false) + @JsonProperty(value = JSON_PROPERTY_DOUBLE_VALUE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBooleanValue(@javax.annotation.Nullable Boolean booleanValue) { - this.booleanValue = booleanValue; + public void setDoubleValue(@javax.annotation.Nullable Double doubleValue) { + this.doubleValue = doubleValue; } - public TsKvEntry valueAsString(@javax.annotation.Nullable String valueAsString) { - this.valueAsString = valueAsString; + public TsKvEntry longValue(@javax.annotation.Nullable Long longValue) { + this.longValue = longValue; return this; } /** - * Get valueAsString - * @return valueAsString + * Get longValue + * @return longValue */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VALUE_AS_STRING, required = false) + @JsonProperty(value = JSON_PROPERTY_LONG_VALUE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValueAsString() { - return valueAsString; + public Long getLongValue() { + return longValue; } - @JsonProperty(value = JSON_PROPERTY_VALUE_AS_STRING, required = false) + @JsonProperty(value = JSON_PROPERTY_LONG_VALUE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValueAsString(@javax.annotation.Nullable String valueAsString) { - this.valueAsString = valueAsString; + public void setLongValue(@javax.annotation.Nullable Long longValue) { + this.longValue = longValue; + } + + + public TsKvEntry booleanValue(@javax.annotation.Nullable Boolean booleanValue) { + this.booleanValue = booleanValue; + return this; + } + + /** + * Get booleanValue + * @return booleanValue + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_BOOLEAN_VALUE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getBooleanValue() { + return booleanValue; + } + + + @JsonProperty(value = JSON_PROPERTY_BOOLEAN_VALUE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBooleanValue(@javax.annotation.Nullable Boolean booleanValue) { + this.booleanValue = booleanValue; } @@ -300,51 +324,27 @@ public void setStrValue(@javax.annotation.Nullable String strValue) { } - public TsKvEntry longValue(@javax.annotation.Nullable Long longValue) { - this.longValue = longValue; - return this; - } - - /** - * Get longValue - * @return longValue - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LONG_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLongValue() { - return longValue; - } - - - @JsonProperty(value = JSON_PROPERTY_LONG_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLongValue(@javax.annotation.Nullable Long longValue) { - this.longValue = longValue; - } - - - public TsKvEntry doubleValue(@javax.annotation.Nullable Double doubleValue) { - this.doubleValue = doubleValue; + public TsKvEntry valueAsString(@javax.annotation.Nullable String valueAsString) { + this.valueAsString = valueAsString; return this; } /** - * Get doubleValue - * @return doubleValue + * Get valueAsString + * @return valueAsString */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DOUBLE_VALUE, required = false) + @JsonProperty(value = JSON_PROPERTY_VALUE_AS_STRING, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDoubleValue() { - return doubleValue; + public String getValueAsString() { + return valueAsString; } - @JsonProperty(value = JSON_PROPERTY_DOUBLE_VALUE, required = false) + @JsonProperty(value = JSON_PROPERTY_VALUE_AS_STRING, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDoubleValue(@javax.annotation.Nullable Double doubleValue) { - this.doubleValue = doubleValue; + public void setValueAsString(@javax.annotation.Nullable String valueAsString) { + this.valueAsString = valueAsString; } @@ -387,13 +387,13 @@ public boolean equals(Object o) { return Objects.equals(this.ts, tsKvEntry.ts) && equalsNullable(this.value, tsKvEntry.value) && Objects.equals(this.key, tsKvEntry.key) && + Objects.equals(this.doubleValue, tsKvEntry.doubleValue) && + Objects.equals(this.longValue, tsKvEntry.longValue) && Objects.equals(this.booleanValue, tsKvEntry.booleanValue) && - Objects.equals(this.valueAsString, tsKvEntry.valueAsString) && Objects.equals(this.dataType, tsKvEntry.dataType) && Objects.equals(this.jsonValue, tsKvEntry.jsonValue) && Objects.equals(this.strValue, tsKvEntry.strValue) && - Objects.equals(this.longValue, tsKvEntry.longValue) && - Objects.equals(this.doubleValue, tsKvEntry.doubleValue) && + Objects.equals(this.valueAsString, tsKvEntry.valueAsString) && Objects.equals(this.version, tsKvEntry.version); } @@ -403,7 +403,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(ts, hashCodeNullable(value), key, booleanValue, valueAsString, dataType, jsonValue, strValue, longValue, doubleValue, version); + return Objects.hash(ts, hashCodeNullable(value), key, doubleValue, longValue, booleanValue, dataType, jsonValue, strValue, valueAsString, version); } private static int hashCodeNullable(JsonNullable a) { @@ -420,13 +420,13 @@ public String toString() { sb.append(" ts: ").append(toIndentedString(ts)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" doubleValue: ").append(toIndentedString(doubleValue)).append("\n"); + sb.append(" longValue: ").append(toIndentedString(longValue)).append("\n"); sb.append(" booleanValue: ").append(toIndentedString(booleanValue)).append("\n"); - sb.append(" valueAsString: ").append(toIndentedString(valueAsString)).append("\n"); sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); sb.append(" jsonValue: ").append(toIndentedString(jsonValue)).append("\n"); sb.append(" strValue: ").append(toIndentedString(strValue)).append("\n"); - sb.append(" longValue: ").append(toIndentedString(longValue)).append("\n"); - sb.append(" doubleValue: ").append(toIndentedString(doubleValue)).append("\n"); + sb.append(" valueAsString: ").append(toIndentedString(valueAsString)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append("}"); return sb.toString(); @@ -490,16 +490,21 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%skey%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKey())))); } + // add `doubleValue` to the URL query string + if (getDoubleValue() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sdoubleValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDoubleValue())))); + } + + // add `longValue` to the URL query string + if (getLongValue() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%slongValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLongValue())))); + } + // add `booleanValue` to the URL query string if (getBooleanValue() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sbooleanValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBooleanValue())))); } - // add `valueAsString` to the URL query string - if (getValueAsString() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%svalueAsString%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValueAsString())))); - } - // add `dataType` to the URL query string if (getDataType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sdataType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDataType())))); @@ -515,14 +520,9 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstrValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStrValue())))); } - // add `longValue` to the URL query string - if (getLongValue() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%slongValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLongValue())))); - } - - // add `doubleValue` to the URL query string - if (getDoubleValue() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdoubleValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDoubleValue())))); + // add `valueAsString` to the URL query string + if (getValueAsString() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%svalueAsString%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValueAsString())))); } // add `version` to the URL query string diff --git a/pe/src/main/java/org/thingsboard/client/model/User.java b/pe/src/main/java/org/thingsboard/client/model/User.java index fa443977..01332cdd 100644 --- a/pe/src/main/java/org/thingsboard/client/model/User.java +++ b/pe/src/main/java/org/thingsboard/client/model/User.java @@ -120,13 +120,11 @@ public User() { @JsonCreator public User( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_NAME) String name ) { this(); this.createdTime = createdTime; this.name = name; - this.ownerId = ownerId; } public User id(@javax.annotation.Nullable UserId id) { @@ -397,6 +395,11 @@ public String getName() { + public User ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -409,6 +412,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public User additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/UserId.java b/pe/src/main/java/org/thingsboard/client/model/UserId.java index faa2d819..fc9a13b4 100644 --- a/pe/src/main/java/org/thingsboard/client/model/UserId.java +++ b/pe/src/main/java/org/thingsboard/client/model/UserId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * UserId */ @JsonPropertyOrder({ - UserId.JSON_PROPERTY_ID, - UserId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class UserId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class UserId extends EntityId { public UserId() { } + @Override public UserId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public UserId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this UserId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UserId userId = (UserId) o; - return Objects.equals(this.id, userId.id) && - Objects.equals(this.entityType, userId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UserId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("UserId", UserId.class); + JSON.registerDiscriminator(UserId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/UserInfo.java b/pe/src/main/java/org/thingsboard/client/model/UserInfo.java index 7e950212..5788f6dc 100644 --- a/pe/src/main/java/org/thingsboard/client/model/UserInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/UserInfo.java @@ -134,14 +134,12 @@ public UserInfo() { public UserInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, - @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_NAME) String name ) { this(); this.createdTime = createdTime; this.ownerName = ownerName; this.name = name; - this.ownerId = ownerId; } public UserInfo id(@javax.annotation.Nullable UserId id) { @@ -458,6 +456,11 @@ public String getName() { + public UserInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -470,6 +473,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public UserInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java b/pe/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java index 97ac72bb..3cf75ddd 100644 --- a/pe/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java +++ b/pe/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java @@ -52,19 +52,6 @@ * WebSelfRegistrationParams */ @JsonPropertyOrder({ - WebSelfRegistrationParams.JSON_PROPERTY_ENABLED, - WebSelfRegistrationParams.JSON_PROPERTY_TITLE, - WebSelfRegistrationParams.JSON_PROPERTY_CAPTCHA, - WebSelfRegistrationParams.JSON_PROPERTY_SIGN_UP_FIELDS, - WebSelfRegistrationParams.JSON_PROPERTY_SHOW_PRIVACY_POLICY, - WebSelfRegistrationParams.JSON_PROPERTY_SHOW_TERMS_OF_USE, - WebSelfRegistrationParams.JSON_PROPERTY_NOTIFICATION_RECIPIENT, - WebSelfRegistrationParams.JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, - WebSelfRegistrationParams.JSON_PROPERTY_CUSTOMER_GROUP_ID, - WebSelfRegistrationParams.JSON_PROPERTY_PERMISSIONS, - WebSelfRegistrationParams.JSON_PROPERTY_DEFAULT_DASHBOARD, - WebSelfRegistrationParams.JSON_PROPERTY_HOME_DASHBOARD, - WebSelfRegistrationParams.JSON_PROPERTY_CUSTOM_MENU_ID, WebSelfRegistrationParams.JSON_PROPERTY_PRIVACY_POLICY, WebSelfRegistrationParams.JSON_PROPERTY_TERMS_OF_USE, WebSelfRegistrationParams.JSON_PROPERTY_DOMAIN_ID @@ -77,58 +64,6 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) public class WebSelfRegistrationParams extends SelfRegistrationParams { - public static final String JSON_PROPERTY_ENABLED = "enabled"; - @javax.annotation.Nullable - private Boolean enabled; - - public static final String JSON_PROPERTY_TITLE = "title"; - @javax.annotation.Nonnull - private String title; - - public static final String JSON_PROPERTY_CAPTCHA = "captcha"; - @javax.annotation.Nonnull - private CaptchaParams captcha; - - public static final String JSON_PROPERTY_SIGN_UP_FIELDS = "signUpFields"; - @javax.annotation.Nonnull - private List signUpFields = new ArrayList<>(); - - public static final String JSON_PROPERTY_SHOW_PRIVACY_POLICY = "showPrivacyPolicy"; - @javax.annotation.Nullable - private Boolean showPrivacyPolicy; - - public static final String JSON_PROPERTY_SHOW_TERMS_OF_USE = "showTermsOfUse"; - @javax.annotation.Nullable - private Boolean showTermsOfUse; - - public static final String JSON_PROPERTY_NOTIFICATION_RECIPIENT = "notificationRecipient"; - @javax.annotation.Nullable - private NotificationTargetId notificationRecipient; - - public static final String JSON_PROPERTY_CUSTOMER_TITLE_PREFIX = "customerTitlePrefix"; - @javax.annotation.Nullable - private String customerTitlePrefix; - - public static final String JSON_PROPERTY_CUSTOMER_GROUP_ID = "customerGroupId"; - @javax.annotation.Nullable - private EntityGroupId customerGroupId; - - public static final String JSON_PROPERTY_PERMISSIONS = "permissions"; - @javax.annotation.Nonnull - private List permissions = new ArrayList<>(); - - public static final String JSON_PROPERTY_DEFAULT_DASHBOARD = "defaultDashboard"; - @javax.annotation.Nullable - private DefaultDashboardParams defaultDashboard; - - public static final String JSON_PROPERTY_HOME_DASHBOARD = "homeDashboard"; - @javax.annotation.Nullable - private HomeDashboardParams homeDashboard; - - public static final String JSON_PROPERTY_CUSTOM_MENU_ID = "customMenuId"; - @javax.annotation.Nullable - private CustomMenuId customMenuId; - public static final String JSON_PROPERTY_PRIVACY_POLICY = "privacyPolicy"; @javax.annotation.Nullable private String privacyPolicy; @@ -144,409 +79,147 @@ public class WebSelfRegistrationParams extends SelfRegistrationParams { public WebSelfRegistrationParams() { } - public WebSelfRegistrationParams enabled(@javax.annotation.Nullable Boolean enabled) { - this.enabled = enabled; + public WebSelfRegistrationParams privacyPolicy(@javax.annotation.Nullable String privacyPolicy) { + this.privacyPolicy = privacyPolicy; return this; } /** - * Indicates if self-registration is allowed via sign-up form - * @return enabled + * Privacy policy text. Supports HTML. + * @return privacyPolicy */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_PRIVACY_POLICY, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEnabled() { - return enabled; + public String getPrivacyPolicy() { + return privacyPolicy; } - @JsonProperty(value = JSON_PROPERTY_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_PRIVACY_POLICY, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEnabled(@javax.annotation.Nullable Boolean enabled) { - this.enabled = enabled; + public void setPrivacyPolicy(@javax.annotation.Nullable String privacyPolicy) { + this.privacyPolicy = privacyPolicy; } - public WebSelfRegistrationParams title(@javax.annotation.Nonnull String title) { - this.title = title; + public WebSelfRegistrationParams termsOfUse(@javax.annotation.Nullable String termsOfUse) { + this.termsOfUse = termsOfUse; return this; } /** - * The text message to appear on login form - * @return title + * Terms of User text. Supports HTML. + * @return termsOfUse */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_TITLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTitle() { - return title; + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTermsOfUse() { + return termsOfUse; } - @JsonProperty(value = JSON_PROPERTY_TITLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTitle(@javax.annotation.Nonnull String title) { - this.title = title; + @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTermsOfUse(@javax.annotation.Nullable String termsOfUse) { + this.termsOfUse = termsOfUse; } - public WebSelfRegistrationParams captcha(@javax.annotation.Nonnull CaptchaParams captcha) { - this.captcha = captcha; + public WebSelfRegistrationParams domainId(@javax.annotation.Nonnull DomainId domainId) { + this.domainId = domainId; return this; } /** - * Captcha site key for 'I'm not a robot' validation - * @return captcha + * Domain name for self registration URL. Typically this matches the domain name from the Login White Labeling page. + * @return domainId */ @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = true) + @JsonProperty(value = JSON_PROPERTY_DOMAIN_ID, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CaptchaParams getCaptcha() { - return captcha; + public DomainId getDomainId() { + return domainId; } - @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = true) + @JsonProperty(value = JSON_PROPERTY_DOMAIN_ID, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCaptcha(@javax.annotation.Nonnull CaptchaParams captcha) { - this.captcha = captcha; + public void setDomainId(@javax.annotation.Nonnull DomainId domainId) { + this.domainId = domainId; } - public WebSelfRegistrationParams signUpFields(@javax.annotation.Nonnull List signUpFields) { - this.signUpFields = signUpFields; - return this; - } - - public WebSelfRegistrationParams addSignUpFieldsItem(SignUpField signUpFieldsItem) { - if (this.signUpFields == null) { - this.signUpFields = new ArrayList<>(); - } - this.signUpFields.add(signUpFieldsItem); + @Override + public WebSelfRegistrationParams type(@javax.annotation.Nonnull SelfRegistrationType type) { + this.setType(type); return this; } - /** - * List of sign-up form fields - * @return signUpFields - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_SIGN_UP_FIELDS, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSignUpFields() { - return signUpFields; - } - - - @JsonProperty(value = JSON_PROPERTY_SIGN_UP_FIELDS, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignUpFields(@javax.annotation.Nonnull List signUpFields) { - this.signUpFields = signUpFields; - } - - + @Override public WebSelfRegistrationParams showPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { - this.showPrivacyPolicy = showPrivacyPolicy; + this.setShowPrivacyPolicy(showPrivacyPolicy); return this; } - /** - * Show or hide 'Privacy Policy' - * @return showPrivacyPolicy - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SHOW_PRIVACY_POLICY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowPrivacyPolicy() { - return showPrivacyPolicy; - } - - - @JsonProperty(value = JSON_PROPERTY_SHOW_PRIVACY_POLICY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { - this.showPrivacyPolicy = showPrivacyPolicy; - } - - + @Override public WebSelfRegistrationParams showTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { - this.showTermsOfUse = showTermsOfUse; + this.setShowTermsOfUse(showTermsOfUse); return this; } - /** - * Show or hide 'Terms of Use' - * @return showTermsOfUse - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SHOW_TERMS_OF_USE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowTermsOfUse() { - return showTermsOfUse; - } - - - @JsonProperty(value = JSON_PROPERTY_SHOW_TERMS_OF_USE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { - this.showTermsOfUse = showTermsOfUse; - } - - - public WebSelfRegistrationParams notificationRecipient(@javax.annotation.Nullable NotificationTargetId notificationRecipient) { - this.notificationRecipient = notificationRecipient; - return this; - } - - /** - * Recipient to use for notifications when new user self-registered. - * @return notificationRecipient - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_RECIPIENT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotificationTargetId getNotificationRecipient() { - return notificationRecipient; - } - - - @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_RECIPIENT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNotificationRecipient(@javax.annotation.Nullable NotificationTargetId notificationRecipient) { - this.notificationRecipient = notificationRecipient; - } - - - public WebSelfRegistrationParams customerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { - this.customerTitlePrefix = customerTitlePrefix; + @Override + public WebSelfRegistrationParams enabled(@javax.annotation.Nullable Boolean enabled) { + this.setEnabled(enabled); return this; } - /** - * Prefix to add to created customer - * @return customerTitlePrefix - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCustomerTitlePrefix() { - return customerTitlePrefix; - } - - - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { - this.customerTitlePrefix = customerTitlePrefix; - } - - - public WebSelfRegistrationParams customerGroupId(@javax.annotation.Nullable EntityGroupId customerGroupId) { - this.customerGroupId = customerGroupId; + @Override + public WebSelfRegistrationParams homeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { + this.setHomeDashboard(homeDashboard); return this; } - /** - * Id of the customer group customer wil be added to. - * @return customerGroupId - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_GROUP_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EntityGroupId getCustomerGroupId() { - return customerGroupId; - } - - - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_GROUP_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerGroupId(@javax.annotation.Nullable EntityGroupId customerGroupId) { - this.customerGroupId = customerGroupId; - } - - - public WebSelfRegistrationParams permissions(@javax.annotation.Nonnull List permissions) { - this.permissions = permissions; + @Override + public WebSelfRegistrationParams notificationRecipient(@javax.annotation.Nullable NotificationTargetId notificationRecipient) { + this.setNotificationRecipient(notificationRecipient); return this; } - public WebSelfRegistrationParams addPermissionsItem(GroupPermission permissionsItem) { - if (this.permissions == null) { - this.permissions = new ArrayList<>(); - } - this.permissions.add(permissionsItem); + @Override + public WebSelfRegistrationParams signUpFields(@javax.annotation.Nullable List signUpFields) { + this.setSignUpFields(signUpFields); return this; } - /** - * Group Permissions to assign for the new customer user. - * @return permissions - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_PERMISSIONS, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getPermissions() { - return permissions; - } - - - @JsonProperty(value = JSON_PROPERTY_PERMISSIONS, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setPermissions(@javax.annotation.Nonnull List permissions) { - this.permissions = permissions; - } - - + @Override public WebSelfRegistrationParams defaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { - this.defaultDashboard = defaultDashboard; + this.setDefaultDashboard(defaultDashboard); return this; } - /** - * Default dashboard params - * @return defaultDashboard - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DEFAULT_DASHBOARD, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DefaultDashboardParams getDefaultDashboard() { - return defaultDashboard; - } - - - @JsonProperty(value = JSON_PROPERTY_DEFAULT_DASHBOARD, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDefaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { - this.defaultDashboard = defaultDashboard; - } - - - public WebSelfRegistrationParams homeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { - this.homeDashboard = homeDashboard; + @Override + public WebSelfRegistrationParams customerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { + this.setCustomerTitlePrefix(customerTitlePrefix); return this; } - /** - * Home dashboard params - * @return homeDashboard - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_HOME_DASHBOARD, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HomeDashboardParams getHomeDashboard() { - return homeDashboard; - } - - - @JsonProperty(value = JSON_PROPERTY_HOME_DASHBOARD, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHomeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { - this.homeDashboard = homeDashboard; - } - - + @Override public WebSelfRegistrationParams customMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { - this.customMenuId = customMenuId; - return this; - } - - /** - * Custom menu id - * @return customMenuId - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOM_MENU_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CustomMenuId getCustomMenuId() { - return customMenuId; - } - - - @JsonProperty(value = JSON_PROPERTY_CUSTOM_MENU_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { - this.customMenuId = customMenuId; - } - - - public WebSelfRegistrationParams privacyPolicy(@javax.annotation.Nullable String privacyPolicy) { - this.privacyPolicy = privacyPolicy; - return this; - } - - /** - * Privacy policy text. Supports HTML. - * @return privacyPolicy - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PRIVACY_POLICY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrivacyPolicy() { - return privacyPolicy; - } - - - @JsonProperty(value = JSON_PROPERTY_PRIVACY_POLICY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrivacyPolicy(@javax.annotation.Nullable String privacyPolicy) { - this.privacyPolicy = privacyPolicy; - } - - - public WebSelfRegistrationParams termsOfUse(@javax.annotation.Nullable String termsOfUse) { - this.termsOfUse = termsOfUse; + this.setCustomMenuId(customMenuId); return this; } - /** - * Terms of User text. Supports HTML. - * @return termsOfUse - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTermsOfUse() { - return termsOfUse; - } - - - @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTermsOfUse(@javax.annotation.Nullable String termsOfUse) { - this.termsOfUse = termsOfUse; - } - - - public WebSelfRegistrationParams domainId(@javax.annotation.Nonnull DomainId domainId) { - this.domainId = domainId; + @Override + public WebSelfRegistrationParams customerGroupId(@javax.annotation.Nullable EntityGroupId customerGroupId) { + this.setCustomerGroupId(customerGroupId); return this; } - /** - * Domain name for self registration URL. Typically this matches the domain name from the Login White Labeling page. - * @return domainId - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_DOMAIN_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public DomainId getDomainId() { - return domainId; - } - - - @JsonProperty(value = JSON_PROPERTY_DOMAIN_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDomainId(@javax.annotation.Nonnull DomainId domainId) { - this.domainId = domainId; - } - - @Override - public WebSelfRegistrationParams type(@javax.annotation.Nonnull SelfRegistrationType type) { - this.setType(type); + public WebSelfRegistrationParams captcha(@javax.annotation.Nullable CaptchaParams captcha) { + this.setCaptcha(captcha); return this; } @@ -562,20 +235,7 @@ public boolean equals(Object o) { return false; } WebSelfRegistrationParams webSelfRegistrationParams = (WebSelfRegistrationParams) o; - return Objects.equals(this.enabled, webSelfRegistrationParams.enabled) && - Objects.equals(this.title, webSelfRegistrationParams.title) && - Objects.equals(this.captcha, webSelfRegistrationParams.captcha) && - Objects.equals(this.signUpFields, webSelfRegistrationParams.signUpFields) && - Objects.equals(this.showPrivacyPolicy, webSelfRegistrationParams.showPrivacyPolicy) && - Objects.equals(this.showTermsOfUse, webSelfRegistrationParams.showTermsOfUse) && - Objects.equals(this.notificationRecipient, webSelfRegistrationParams.notificationRecipient) && - Objects.equals(this.customerTitlePrefix, webSelfRegistrationParams.customerTitlePrefix) && - Objects.equals(this.customerGroupId, webSelfRegistrationParams.customerGroupId) && - Objects.equals(this.permissions, webSelfRegistrationParams.permissions) && - Objects.equals(this.defaultDashboard, webSelfRegistrationParams.defaultDashboard) && - Objects.equals(this.homeDashboard, webSelfRegistrationParams.homeDashboard) && - Objects.equals(this.customMenuId, webSelfRegistrationParams.customMenuId) && - Objects.equals(this.privacyPolicy, webSelfRegistrationParams.privacyPolicy) && + return Objects.equals(this.privacyPolicy, webSelfRegistrationParams.privacyPolicy) && Objects.equals(this.termsOfUse, webSelfRegistrationParams.termsOfUse) && Objects.equals(this.domainId, webSelfRegistrationParams.domainId) && super.equals(o); @@ -583,7 +243,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(enabled, title, captcha, signUpFields, showPrivacyPolicy, showTermsOfUse, notificationRecipient, customerTitlePrefix, customerGroupId, permissions, defaultDashboard, homeDashboard, customMenuId, privacyPolicy, termsOfUse, domainId, super.hashCode()); + return Objects.hash(privacyPolicy, termsOfUse, domainId, super.hashCode()); } @Override @@ -591,19 +251,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class WebSelfRegistrationParams {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" captcha: ").append(toIndentedString(captcha)).append("\n"); - sb.append(" signUpFields: ").append(toIndentedString(signUpFields)).append("\n"); - sb.append(" showPrivacyPolicy: ").append(toIndentedString(showPrivacyPolicy)).append("\n"); - sb.append(" showTermsOfUse: ").append(toIndentedString(showTermsOfUse)).append("\n"); - sb.append(" notificationRecipient: ").append(toIndentedString(notificationRecipient)).append("\n"); - sb.append(" customerTitlePrefix: ").append(toIndentedString(customerTitlePrefix)).append("\n"); - sb.append(" customerGroupId: ").append(toIndentedString(customerGroupId)).append("\n"); - sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); - sb.append(" defaultDashboard: ").append(toIndentedString(defaultDashboard)).append("\n"); - sb.append(" homeDashboard: ").append(toIndentedString(homeDashboard)).append("\n"); - sb.append(" customMenuId: ").append(toIndentedString(customMenuId)).append("\n"); sb.append(" privacyPolicy: ").append(toIndentedString(privacyPolicy)).append("\n"); sb.append(" termsOfUse: ").append(toIndentedString(termsOfUse)).append("\n"); sb.append(" domainId: ").append(toIndentedString(domainId)).append("\n"); @@ -699,11 +346,6 @@ public String toUrlQueryString(String prefix) { joiner.add(getNotificationRecipient().toUrlQueryString(prefix + "notificationRecipient" + suffix)); } - // add `captcha` to the URL query string - if (getCaptcha() != null) { - joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); - } - // add `signUpFields` to the URL query string if (getSignUpFields() != null) { for (int i = 0; i < getSignUpFields().size(); i++) { @@ -734,6 +376,11 @@ public String toUrlQueryString(String prefix) { joiner.add(getCustomerGroupId().toUrlQueryString(prefix + "customerGroupId" + suffix)); } + // add `captcha` to the URL query string + if (getCaptcha() != null) { + joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); + } + // add `privacyPolicy` to the URL query string if (getPrivacyPolicy() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sprivacyPolicy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrivacyPolicy())))); diff --git a/pe/src/main/java/org/thingsboard/client/model/WebViewPage.java b/pe/src/main/java/org/thingsboard/client/model/WebViewPage.java index d0d5588c..32edd6e3 100644 --- a/pe/src/main/java/org/thingsboard/client/model/WebViewPage.java +++ b/pe/src/main/java/org/thingsboard/client/model/WebViewPage.java @@ -42,7 +42,6 @@ */ @JsonPropertyOrder({ WebViewPage.JSON_PROPERTY_LABEL, - WebViewPage.JSON_PROPERTY_VISIBLE, WebViewPage.JSON_PROPERTY_ICON, WebViewPage.JSON_PROPERTY_URL }) @@ -58,10 +57,6 @@ public class WebViewPage extends MobilePage { @javax.annotation.Nullable private String label; - public static final String JSON_PROPERTY_VISIBLE = "visible"; - @javax.annotation.Nonnull - private Boolean visible; - public static final String JSON_PROPERTY_ICON = "icon"; @javax.annotation.Nullable private String icon; @@ -97,30 +92,6 @@ public void setLabel(@javax.annotation.Nullable String label) { } - public WebViewPage visible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - return this; - } - - /** - * Indicates if page is visible - * @return visible - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getVisible() { - return visible; - } - - - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVisible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - } - - public WebViewPage icon(@javax.annotation.Nullable String icon) { this.icon = icon; return this; @@ -175,6 +146,12 @@ public WebViewPage type(@javax.annotation.Nonnull MobilePageType type) { return this; } + @Override + public WebViewPage visible(@javax.annotation.Nullable Boolean visible) { + this.setVisible(visible); + return this; + } + /** * Return true if this WebViewPage object is equal to o. */ @@ -188,7 +165,6 @@ public boolean equals(Object o) { } WebViewPage webViewPage = (WebViewPage) o; return Objects.equals(this.label, webViewPage.label) && - Objects.equals(this.visible, webViewPage.visible) && Objects.equals(this.icon, webViewPage.icon) && Objects.equals(this.url, webViewPage.url) && super.equals(o); @@ -196,7 +172,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(label, visible, icon, url, super.hashCode()); + return Objects.hash(label, icon, url, super.hashCode()); } @Override @@ -205,7 +181,6 @@ public String toString() { sb.append("class WebViewPage {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append("}"); diff --git a/pe/src/main/java/org/thingsboard/client/model/WidgetTypeId.java b/pe/src/main/java/org/thingsboard/client/model/WidgetTypeId.java index ec1a73ad..5d027764 100644 --- a/pe/src/main/java/org/thingsboard/client/model/WidgetTypeId.java +++ b/pe/src/main/java/org/thingsboard/client/model/WidgetTypeId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * WidgetTypeId */ @JsonPropertyOrder({ - WidgetTypeId.JSON_PROPERTY_ID, - WidgetTypeId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class WidgetTypeId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class WidgetTypeId extends EntityId { public WidgetTypeId() { } + @Override public WidgetTypeId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public WidgetTypeId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this WidgetTypeId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - WidgetTypeId widgetTypeId = (WidgetTypeId) o; - return Objects.equals(this.id, widgetTypeId.id) && - Objects.equals(this.entityType, widgetTypeId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class WidgetTypeId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("WidgetTypeId", WidgetTypeId.class); + JSON.registerDiscriminator(WidgetTypeId.class, "entityType", mappings); +} } diff --git a/pe/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java b/pe/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java index 4661fdaa..88750984 100644 --- a/pe/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java +++ b/pe/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * WidgetsBundleId */ @JsonPropertyOrder({ - WidgetsBundleId.JSON_PROPERTY_ID, - WidgetsBundleId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class WidgetsBundleId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class WidgetsBundleId extends EntityId { public WidgetsBundleId() { } + @Override public WidgetsBundleId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public WidgetsBundleId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this WidgetsBundleId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - WidgetsBundleId widgetsBundleId = (WidgetsBundleId) o; - return Objects.equals(this.id, widgetsBundleId.id) && - Objects.equals(this.entityType, widgetsBundleId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class WidgetsBundleId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("WidgetsBundleId", WidgetsBundleId.class); + JSON.registerDiscriminator(WidgetsBundleId.class, "entityType", mappings); +} } diff --git a/pe/src/test/java/org/thingsboard/client/api/AlarmApiTest.java b/pe/src/test/java/org/thingsboard/client/api/AlarmApiTest.java index bcc4041b..fc253a82 100644 --- a/pe/src/test/java/org/thingsboard/client/api/AlarmApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/AlarmApiTest.java @@ -62,10 +62,7 @@ void testAlarmLifecycle() throws ApiException { Alarm alarm = new Alarm(); alarm.setType(((i % 2 == 0) ? "Temperature Alarm" : "Connection Alarm")); alarm.setSeverity(((i % 2 == 0) ? AlarmSeverity.CRITICAL : AlarmSeverity.WARNING)); - EntityId originator = new EntityId(); - originator.setEntityType(EntityType.DEVICE); - originator.setId((i % 2 == 0) ? createdDevice1.getId().getId() : createdDevice2.getId().getId()); - alarm.setOriginator(originator); + alarm.setOriginator((i % 2 == 0) ? createdDevice1.getId() : createdDevice2.getId()); Alarm createdAlarm = client.saveAlarm(alarm); assertNotNull(createdAlarm); diff --git a/pe/src/test/java/org/thingsboard/client/api/AlarmCommentApiTest.java b/pe/src/test/java/org/thingsboard/client/api/AlarmCommentApiTest.java index 3f473712..e7fcd5a1 100644 --- a/pe/src/test/java/org/thingsboard/client/api/AlarmCommentApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/AlarmCommentApiTest.java @@ -52,10 +52,7 @@ void testAlarmComments() throws ApiException { Alarm alarm = new Alarm(); alarm.setType("Temperature Alarm"); alarm.setSeverity(AlarmSeverity.CRITICAL); - EntityId originator = new EntityId(); - originator.setEntityType(EntityType.DEVICE); - originator.setId(createdDevice.getId().getId()); - alarm.setOriginator(originator); + alarm.setOriginator(createdDevice.getId()); Alarm createdAlarm = client.saveAlarm(alarm); String alarmId = createdAlarm.getId().getId().toString(); diff --git a/pe/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java b/pe/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java index 428fb2de..17e2d66a 100644 --- a/pe/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java @@ -70,11 +70,7 @@ void testCalculatedFieldLifecycle() throws ApiException { CalculatedField cf = new CalculatedField(); cf.setName(TEST_PREFIX + "CalcField_" + timestamp + "_" + i); cf.setType(CalculatedFieldType.SIMPLE); - - EntityId entityId = new EntityId(); - entityId.setEntityType(EntityType.DEVICE); - entityId.setId(createdDevice1.getId().getId()); - cf.setEntityId(entityId); + cf.setEntityId(createdDevice1.getId()); SimpleCalculatedFieldConfiguration config = new SimpleCalculatedFieldConfiguration(); @@ -107,11 +103,7 @@ void testCalculatedFieldLifecycle() throws ApiException { CalculatedField cf = new CalculatedField(); cf.setName(TEST_PREFIX + "CalcField2_" + timestamp + "_" + i); cf.setType(CalculatedFieldType.SIMPLE); - - EntityId entityId = new EntityId(); - entityId.setEntityType(EntityType.DEVICE); - entityId.setId(createdDevice2.getId().getId()); - cf.setEntityId(entityId); + cf.setEntityId(createdDevice2.getId()); SimpleCalculatedFieldConfiguration config = new SimpleCalculatedFieldConfiguration(); @@ -235,10 +227,7 @@ void testAlarmCalculatedFieldLifecycle() throws ApiException { cf.setName(TEST_PREFIX + "AlarmCalcField_" + timestamp); cf.setType(CalculatedFieldType.ALARM); - EntityId entityId = new EntityId(); - entityId.setEntityType(EntityType.DEVICE); - entityId.setId(createdDevice.getId().getId()); - cf.setEntityId(entityId); + cf.setEntityId(createdDevice.getId()); cf.setConfiguration(config); CalculatedField created = client.saveCalculatedField(cf); diff --git a/pe/src/test/java/org/thingsboard/client/api/DeviceApiTest.java b/pe/src/test/java/org/thingsboard/client/api/DeviceApiTest.java index 04057733..b72398b5 100644 --- a/pe/src/test/java/org/thingsboard/client/api/DeviceApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/DeviceApiTest.java @@ -190,8 +190,8 @@ void testFindByQuery() throws ApiException { device = client.saveDevice(device, null, null, null, null, null, null); EntityRelation buildingToDevice = new EntityRelation(); - buildingToDevice.setFrom(new EntityId().id(building.getId().getId()).entityType(EntityType.ASSET)); - buildingToDevice.setTo(new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE)); + buildingToDevice.setFrom(building.getId()); + buildingToDevice.setTo(device.getId()); buildingToDevice.setType("Contains"); buildingToDevice.setTypeGroup(RelationTypeGroup.COMMON); EntityRelation savedRelation = client.saveRelation(buildingToDevice); diff --git a/pe/src/test/java/org/thingsboard/client/api/EntityGroupApiTest.java b/pe/src/test/java/org/thingsboard/client/api/EntityGroupApiTest.java index e2c64e0d..94a669a8 100644 --- a/pe/src/test/java/org/thingsboard/client/api/EntityGroupApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/EntityGroupApiTest.java @@ -313,7 +313,7 @@ void testShareEntityGroup() throws ApiException { String broadGroupId = broadGroup.getId().getId().toString(); ShareGroupRequest shareRequest = new ShareGroupRequest(); shareRequest.setAllUserGroup(true); - shareRequest.setOwnerId(new EntityId().id(savedCustomer.getId().getId()).entityType(EntityType.CUSTOMER)); + shareRequest.setOwnerId(savedCustomer.getId()); client.shareEntityGroup(broadGroupId, shareRequest); // shareEntityGroupToChildOwnerUserGroup — share with the customer admin group via role diff --git a/pe/src/test/java/org/thingsboard/client/api/EntityQueryApiTest.java b/pe/src/test/java/org/thingsboard/client/api/EntityQueryApiTest.java index aa787e62..4ec97d67 100644 --- a/pe/src/test/java/org/thingsboard/client/api/EntityQueryApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/EntityQueryApiTest.java @@ -316,8 +316,8 @@ void testFindByAssetSearchQueryFilter() throws Exception { for (int i = 0; i < 3; i++) { Asset child = client.saveAsset(new Asset().name(QUERY_TEST_PREFIX + "asqChild_" + ts + "_" + i).type(childType), null, null, null, null, null); EntityRelation rel = new EntityRelation(); - rel.setFrom(new EntityId().id(root.getId().getId()).entityType(EntityType.ASSET)); - rel.setTo(new EntityId().id(child.getId().getId()).entityType(EntityType.ASSET)); + rel.setFrom(root.getId()); + rel.setTo(child.getId()); rel.setType("Contains"); rel.setTypeGroup(RelationTypeGroup.COMMON); client.saveRelation(rel); @@ -349,8 +349,8 @@ void testFindByDeviceSearchQueryFilter() throws Exception { for (int i = 0; i < 2; i++) { Device device = client.saveDevice(new Device().name(QUERY_TEST_PREFIX + "dsqDev_" + ts + "_" + i).type(deviceType), null, null, null, null, null, null); EntityRelation rel = new EntityRelation(); - rel.setFrom(new EntityId().id(root.getId().getId()).entityType(EntityType.ASSET)); - rel.setTo(new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE)); + rel.setFrom(root.getId()); + rel.setTo(device.getId()); rel.setType("Contains"); rel.setTypeGroup(RelationTypeGroup.COMMON); client.saveRelation(rel); @@ -419,8 +419,8 @@ void testFindByEdgeSearchQueryFilter() throws Exception { .edgeLicenseKey("licenseKey") .cloudEndpoint("http://localhost:8080"), null, null); EntityRelation rel = new EntityRelation(); - rel.setFrom(new EntityId().id(root.getId().getId()).entityType(EntityType.ASSET)); - rel.setTo(new EntityId().id(edge.getId().getId()).entityType(EntityType.EDGE)); + rel.setFrom(root.getId()); + rel.setTo(edge.getId()); rel.setType("Manages"); rel.setTypeGroup(RelationTypeGroup.COMMON); client.saveRelation(rel); @@ -453,7 +453,7 @@ void testFindByEntityViewTypeFilter() throws Exception { client.saveEntityView(new EntityView() .name(QUERY_TEST_PREFIX + "evt_" + ts + "_" + i) .type(viewType) - .entityId(new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE)), + .entityId(device.getId()), null, null, null, null, null); } @@ -479,11 +479,11 @@ void testFindByEntityViewSearchQueryFilter() throws Exception { EntityView ev = client.saveEntityView(new EntityView() .name(QUERY_TEST_PREFIX + "evsq_" + ts + "_" + i) .type(viewType) - .entityId(new EntityId().id(rootDevice.getId().getId()).entityType(EntityType.DEVICE)), + .entityId(rootDevice.getId()), null, null, null, null, null); EntityRelation rel = new EntityRelation(); - rel.setFrom(new EntityId().id(rootDevice.getId().getId()).entityType(EntityType.DEVICE)); - rel.setTo(new EntityId().id(ev.getId().getId()).entityType(EntityType.ENTITY_VIEW)); + rel.setFrom(rootDevice.getId()); + rel.setTo(ev.getId()); rel.setType("HasView"); rel.setTypeGroup(RelationTypeGroup.COMMON); client.saveRelation(rel); @@ -514,8 +514,8 @@ void testFindByRelationsQueryFilter() throws Exception { for (int i = 0; i < 2; i++) { Device device = client.saveDevice(new Device().name(QUERY_TEST_PREFIX + "rqfDev_" + ts + "_" + i).type("sensor"), null, null, null, null, null, null); EntityRelation rel = new EntityRelation(); - rel.setFrom(new EntityId().id(root.getId().getId()).entityType(EntityType.ASSET)); - rel.setTo(new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE)); + rel.setFrom(root.getId()); + rel.setTo(device.getId()); rel.setType("Contains"); rel.setTypeGroup(RelationTypeGroup.COMMON); client.saveRelation(rel); @@ -654,7 +654,7 @@ void testFindByEntitiesByGroupNameFilter() throws Exception { .entityFilter(new EntitiesByGroupNameFilter() .groupType(EntityType.DEVICE) .entityGroupNameFilter(groupName) - .ownerId(new EntityId().id(savedTenant.getId().getId()).entityType(EntityType.TENANT))) + .ownerId(savedTenant.getId())) .pageLink(pageLink(10)) .addEntityFieldsItem(new EntityKey().type(EntityKeyType.ENTITY_FIELD).key("name")); diff --git a/pe/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java b/pe/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java index 4dbb288c..e401e26e 100644 --- a/pe/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java @@ -38,14 +38,6 @@ public class EntityRelationApiTest extends AbstractApiTest { - private EntityId entityId(Device device) { - return new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE); - } - - private EntityId entityId(Asset asset) { - return new EntityId().id(asset.getId().getId()).entityType(EntityType.ASSET); - } - @Test void testEntityRelationLifecycle() throws ApiException { long timestamp = System.currentTimeMillis(); @@ -78,8 +70,8 @@ void testEntityRelationLifecycle() throws ApiException { // create relations: building -> Contains -> floor, floor -> Contains -> device1/device2/device3 EntityRelation buildingToFloor = new EntityRelation(); - buildingToFloor.setFrom(entityId(building)); - buildingToFloor.setTo(entityId(floor)); + buildingToFloor.setFrom(building.getId()); + buildingToFloor.setTo(floor.getId()); buildingToFloor.setType("Contains"); buildingToFloor.setTypeGroup(RelationTypeGroup.COMMON); EntityRelation savedRelation = client @@ -88,17 +80,17 @@ void testEntityRelationLifecycle() throws ApiException { assertEquals("Contains", savedRelation.getType()); client.saveRelation(new EntityRelation() - .from(entityId(floor)) - .to(entityId(device1)) + .from(floor.getId()) + .to(device1.getId()) .type("Contains") .typeGroup(RelationTypeGroup.COMMON)); client.saveRelation(new EntityRelation() - .from(entityId(floor)) - .to(entityId(device2)) + .from(floor.getId()) + .to(device2.getId()) .type("Contains").typeGroup(RelationTypeGroup.COMMON)); client.saveRelation(new EntityRelation() - .from(entityId(floor)) - .to(entityId(device3)) + .from(floor.getId()) + .to(device3.getId()) .type("Manages") .typeGroup(RelationTypeGroup.COMMON)); diff --git a/pe/src/test/java/org/thingsboard/client/api/EntityViewApiTest.java b/pe/src/test/java/org/thingsboard/client/api/EntityViewApiTest.java index dad70060..3669108c 100644 --- a/pe/src/test/java/org/thingsboard/client/api/EntityViewApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/EntityViewApiTest.java @@ -48,9 +48,7 @@ void testSaveAndGetEntityView() throws Exception { EntityView ev = new EntityView(); ev.setName(EV_PREFIX + "save_" + ts); ev.setType("testType"); - ev.setEntityId(new EntityId() - .id(device.getId().getId()) - .entityType(EntityType.DEVICE)); + ev.setEntityId(device.getId()); ev.setKeys(new TelemetryEntityView() .timeseries(List.of("temperature", "humidity")) .attributes(new AttributesEntityView() @@ -209,9 +207,7 @@ private EntityView createEntityView(String name, String type, Device device) thr EntityView ev = new EntityView(); ev.setName(name); ev.setType(type); - ev.setEntityId(new EntityId() - .id(device.getId().getId()) - .entityType(EntityType.DEVICE)); + ev.setEntityId(device.getId()); ev.setKeys(new TelemetryEntityView() .timeseries(List.of("temperature")) .attributes(new AttributesEntityView() diff --git a/pe/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java b/pe/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java index d90370db..a7484573 100644 --- a/pe/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java @@ -40,11 +40,9 @@ public class OtaPackageApiTest extends AbstractApiTest { private static final String OTA_PREFIX = "OtaTest_"; - private DeviceProfileId getDefaultDeviceProfileId() throws Exception { + private DeviceProfileId getDefaultDeviceProfileId() { DeviceProfileInfo profileInfo = client.getDefaultDeviceProfileInfo(); - return new DeviceProfileId() - .id(profileInfo.getId().getId()) - .entityType(EntityType.DEVICE_PROFILE); + return (DeviceProfileId) profileInfo.getId(); } private SaveOtaPackageInfoRequest buildOtaPackageInfoRequest( diff --git a/pe/src/test/java/org/thingsboard/client/api/UserApiTest.java b/pe/src/test/java/org/thingsboard/client/api/UserApiTest.java index e7986ada..db12bd2c 100644 --- a/pe/src/test/java/org/thingsboard/client/api/UserApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/UserApiTest.java @@ -230,7 +230,7 @@ void testGetUsersForAssign() throws Exception { Alarm alarm = client.saveAlarm(new Alarm() .type("TestAlarm") - .originator(new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE)) + .originator(device.getId()) .severity(AlarmSeverity.WARNING) .acknowledged(false) .cleared(false)); From c215f4517ac8770304289fa4ec73977fa216d439 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Wed, 11 Mar 2026 21:01:12 +0200 Subject: [PATCH 4/8] regenerated clients, fixed tests --- ce/docs/AlarmCommentId.md | 2 +- ce/docs/AuditLogId.md | 2 +- ce/docs/CalculatedFieldDebugEventFilter.md | 2 +- ce/docs/ComponentDescriptorId.md | 2 +- ce/docs/Dashboard.md | 12 +- ce/docs/DeviceCredentialsId.md | 2 +- ce/docs/EdgeEventId.md | 2 +- ce/docs/EntityId.md | 2 +- ce/docs/EventId.md | 2 +- ce/docs/FeaturesInfo.md | 4 +- .../MicrosoftTeamsNotificationTargetConfig.md | 4 +- ce/docs/OAuth2ClientRegistrationTemplateId.md | 2 +- ce/docs/OtaPackageData.md | 8 +- ce/docs/QrCodeSettingsId.md | 2 +- ce/docs/RuleChainDebugEventFilter.md | 2 +- ce/docs/RuleNodeDebugEventFilter.md | 2 +- ce/docs/TbResource.md | 2 +- ce/docs/TbResourceInfo.md | 2 +- ce/spec/openapi.json | 210 +- .../client/model/AdminSettingsId.java | 18 +- .../thingsboard/client/model/AiModelId.java | 18 +- .../client/model/AlarmCommentId.java | 2 +- .../org/thingsboard/client/model/AlarmId.java | 18 +- .../thingsboard/client/model/ApiKeyId.java | 18 +- .../client/model/ApiUsageStateId.java | 18 +- .../org/thingsboard/client/model/AssetId.java | 18 +- .../client/model/AssetProfileId.java | 18 +- .../thingsboard/client/model/AuditLogId.java | 18 +- .../CalculatedFieldDebugEventFilter.java | 68 +- .../client/model/CalculatedFieldId.java | 18 +- .../client/model/ComponentDescriptorId.java | 18 +- .../thingsboard/client/model/CustomerId.java | 18 +- .../thingsboard/client/model/Dashboard.java | 390 +- .../thingsboard/client/model/DashboardId.java | 18 +- .../client/model/DeviceCredentialsId.java | 18 +- .../thingsboard/client/model/DeviceId.java | 18 +- .../client/model/DeviceProfileId.java | 18 +- .../thingsboard/client/model/DomainId.java | 18 +- .../thingsboard/client/model/EdgeEventId.java | 18 +- .../org/thingsboard/client/model/EdgeId.java | 18 +- .../thingsboard/client/model/EntityId.java | 70 +- .../client/model/EntityViewId.java | 18 +- .../org/thingsboard/client/model/EventId.java | 18 +- .../client/model/FeaturesInfo.java | 136 +- .../org/thingsboard/client/model/JobId.java | 18 +- ...icrosoftTeamsNotificationTargetConfig.java | 162 +- .../client/model/MobileAppBundleId.java | 18 +- .../thingsboard/client/model/MobileAppId.java | 18 +- .../client/model/NotificationId.java | 18 +- .../client/model/NotificationRequestId.java | 18 +- .../client/model/NotificationRuleId.java | 18 +- .../client/model/NotificationTargetId.java | 18 +- .../client/model/NotificationTemplateId.java | 18 +- .../client/model/OAuth2ClientId.java | 18 +- .../OAuth2ClientRegistrationTemplateId.java | 18 +- .../client/model/OtaPackageData.java | 216 +- .../client/model/OtaPackageId.java | 18 +- .../client/model/QrCodeSettingsId.java | 2 +- .../org/thingsboard/client/model/QueueId.java | 18 +- .../client/model/QueueStatsId.java | 18 +- .../org/thingsboard/client/model/RpcId.java | 18 +- .../model/RuleChainDebugEventFilter.java | 68 +- .../thingsboard/client/model/RuleChainId.java | 18 +- .../model/RuleNodeDebugEventFilter.java | 68 +- .../thingsboard/client/model/RuleNodeId.java | 18 +- .../thingsboard/client/model/TbResource.java | 56 +- .../client/model/TbResourceId.java | 18 +- .../client/model/TbResourceInfo.java | 56 +- .../thingsboard/client/model/TenantId.java | 18 +- .../client/model/TenantProfileId.java | 18 +- .../org/thingsboard/client/model/UserId.java | 18 +- .../client/model/WidgetTypeId.java | 18 +- .../client/model/WidgetsBundleId.java | 18 +- paas/docs/AdminSettingsId.md | 4 +- paas/docs/AiModelId.md | 4 +- .../docs/AlarmCalculatedFieldConfiguration.md | 4 +- paas/docs/AlarmId.md | 4 +- paas/docs/ApiKeyId.md | 4 +- paas/docs/ApiUsageStateId.md | 23 + paas/docs/Asset.md | 2 +- paas/docs/AssetId.md | 4 +- paas/docs/AssetInfo.md | 2 +- paas/docs/AssetProfileId.md | 4 +- paas/docs/AttributesOutput.md | 1 - paas/docs/AuditLog.md | 2 +- paas/docs/BaseReadTsKvQuery.md | 2 +- paas/docs/BlobEntityId.md | 4 +- paas/docs/BlobEntityInfo.md | 2 +- paas/docs/BlobEntityWithCustomerInfo.md | 2 +- paas/docs/CalculatedFieldConfiguration.md | 2 +- paas/docs/CalculatedFieldDebugEventFilter.md | 2 +- paas/docs/CalculatedFieldId.md | 4 +- paas/docs/ConverterId.md | 4 +- paas/docs/CustomMenuItem.md | 1 - paas/docs/CustomMobilePage.md | 1 - paas/docs/Customer.md | 2 +- paas/docs/CustomerId.md | 4 +- paas/docs/CustomerInfo.md | 2 +- paas/docs/Dashboard.md | 16 +- paas/docs/DashboardId.md | 4 +- paas/docs/DashboardInfo.md | 2 +- paas/docs/DashboardPage.md | 1 - paas/docs/DebugConverterEventFilter.md | 2 +- paas/docs/DebugIntegrationEventFilter.md | 2 +- paas/docs/DefaultMenuItem.md | 1 - paas/docs/DefaultMobilePage.md | 1 - paas/docs/Device.md | 2 +- paas/docs/DeviceApiControllerApi.md | 300 + paas/docs/DeviceId.md | 4 +- paas/docs/DeviceInfo.md | 2 +- paas/docs/DeviceProfileId.md | 4 +- paas/docs/Domain.md | 2 +- paas/docs/DomainId.md | 4 +- paas/docs/DomainInfo.md | 2 +- paas/docs/Edge.md | 2 +- paas/docs/EdgeId.md | 4 +- paas/docs/EdgeInfo.md | 2 +- ...AggregationCalculatedFieldConfiguration.md | 4 +- paas/docs/EntityGroupId.md | 4 +- paas/docs/EntityGroupInfo.md | 2 +- paas/docs/EntityGroupInfoOwnerIdsInner.md | 23 + paas/docs/EntityView.md | 2 +- paas/docs/EntityViewId.md | 4 +- paas/docs/EntityViewInfo.md | 2 +- paas/docs/ErrorComponentAllOfException.md | 2 +- .../docs/ErrorComponentAllOfExceptionCause.md | 2 +- paas/docs/EventInfo.md | 2 +- paas/docs/Failure.md | 1 - paas/docs/FeaturesInfo.md | 6 +- .../GeofencingCalculatedFieldConfiguration.md | 2 +- paas/docs/GroupPermissionId.md | 4 +- paas/docs/HomeMenuItem.md | 1 - paas/docs/Integration.md | 2 +- paas/docs/IntegrationId.md | 4 +- paas/docs/IntegrationInfo.md | 2 +- paas/docs/JobId.md | 4 +- .../MicrosoftTeamsNotificationTargetConfig.md | 4 +- paas/docs/MobileAppBundleId.md | 4 +- paas/docs/MobileAppId.md | 4 +- paas/docs/MobileSelfRegistrationParams.md | 15 +- paas/docs/NotificationId.md | 4 +- paas/docs/NotificationRequestId.md | 4 +- paas/docs/NotificationRuleId.md | 4 +- paas/docs/NotificationRuleRecipientsConfig.md | 2 +- paas/docs/NotificationTargetId.md | 4 +- paas/docs/NotificationTemplateId.md | 4 +- paas/docs/OAuth2Client.md | 2 +- paas/docs/OAuth2ClientId.md | 4 +- paas/docs/OtaPackageData.md | 8 +- paas/docs/OtaPackageId.md | 4 +- ...PropagationCalculatedFieldConfiguration.md | 2 +- paas/docs/QueueId.md | 4 +- paas/docs/QueueStatsId.md | 4 +- ...AggregationCalculatedFieldConfiguration.md | 6 +- paas/docs/Report.md | 2 +- paas/docs/ReportId.md | 4 +- paas/docs/ReportInfo.md | 2 +- paas/docs/ReportTemplate.md | 2 +- paas/docs/ReportTemplateConfig.md | 2 +- paas/docs/ReportTemplateId.md | 4 +- paas/docs/ReportTemplateInfo.md | 2 +- paas/docs/ReportTimeSeriesChartSettings.md | 2 +- paas/docs/Role.md | 2 +- paas/docs/RoleId.md | 4 +- paas/docs/RpcId.md | 4 +- paas/docs/RuleChainDebugEventFilter.md | 2 +- paas/docs/RuleChainId.md | 4 +- paas/docs/RuleNodeDebugEventFilter.md | 2 +- paas/docs/RuleNodeId.md | 4 +- paas/docs/ScheduledReportInfo.md | 4 +- paas/docs/SchedulerEvent.md | 4 +- paas/docs/SchedulerEventId.md | 4 +- paas/docs/SchedulerEventInfo.md | 4 +- paas/docs/SchedulerEventWithCustomerInfo.md | 4 +- paas/docs/SecretId.md | 4 +- paas/docs/SelfRegistrationParams.md | 16 +- paas/docs/ShortEntityView.md | 2 +- paas/docs/Success.md | 1 - paas/docs/TbResourceId.md | 4 +- paas/docs/TenantId.md | 4 +- paas/docs/TenantProfileId.md | 4 +- paas/docs/TimeSeriesOutput.md | 1 - paas/docs/TsKvEntry.md | 4 +- paas/docs/User.md | 2 +- paas/docs/UserId.md | 4 +- paas/docs/UserInfo.md | 2 +- paas/docs/WebSelfRegistrationParams.md | 15 +- paas/docs/WebViewPage.md | 1 - paas/docs/WidgetTypeId.md | 4 +- paas/docs/WidgetsBundleId.md | 4 +- paas/spec/openapi.json | 27115 ++++++++-------- .../client/api/ThingsboardApi.java | 1733 +- .../client/model/AdminSettingsId.java | 80 +- .../thingsboard/client/model/AiModelId.java | 80 +- .../AlarmAssignmentRecipientsConfig.java | 2 +- .../AlarmCalculatedFieldConfiguration.java | 180 +- .../model/AlarmCommentRecipientsConfig.java | 2 +- .../org/thingsboard/client/model/AlarmId.java | 80 +- .../thingsboard/client/model/ApiKeyId.java | 80 +- .../model/ApiUsageLimitRecipientsConfig.java | 2 +- .../client/model/ApiUsageStateId.java | 159 + .../org/thingsboard/client/model/Asset.java | 14 +- .../org/thingsboard/client/model/AssetId.java | 80 +- .../thingsboard/client/model/AssetInfo.java | 14 +- .../client/model/AssetProfileId.java | 80 +- .../client/model/AttributesOutput.java | 57 +- .../thingsboard/client/model/AuditLog.java | 12 +- .../client/model/BaseReadTsKvQuery.java | 70 +- .../client/model/BlobEntityId.java | 80 +- .../client/model/BlobEntityInfo.java | 14 +- .../model/BlobEntityWithCustomerInfo.java | 14 +- .../model/CalculatedFieldConfiguration.java | 68 +- .../CalculatedFieldDebugEventFilter.java | 68 +- .../client/model/CalculatedFieldId.java | 80 +- .../thingsboard/client/model/ConverterId.java | 80 +- .../client/model/CsvReportTemplateConfig.java | 34 +- .../client/model/CustomMenuItem.java | 39 +- .../client/model/CustomMobilePage.java | 39 +- .../thingsboard/client/model/Customer.java | 14 +- .../thingsboard/client/model/CustomerId.java | 80 +- .../client/model/CustomerInfo.java | 14 +- .../thingsboard/client/model/Dashboard.java | 436 +- .../thingsboard/client/model/DashboardId.java | 80 +- .../client/model/DashboardInfo.java | 14 +- .../client/model/DashboardPage.java | 39 +- .../model/DebugConverterEventFilter.java | 68 +- .../model/DebugIntegrationEventFilter.java | 68 +- .../client/model/DefaultMenuItem.java | 39 +- .../client/model/DefaultMobilePage.java | 39 +- .../org/thingsboard/client/model/Device.java | 14 +- .../model/DeviceActivityRecipientsConfig.java | 2 +- .../thingsboard/client/model/DeviceId.java | 80 +- .../thingsboard/client/model/DeviceInfo.java | 14 +- .../client/model/DeviceProfileId.java | 80 +- .../org/thingsboard/client/model/Domain.java | 14 +- .../thingsboard/client/model/DomainId.java | 80 +- .../thingsboard/client/model/DomainInfo.java | 14 +- .../org/thingsboard/client/model/Edge.java | 14 +- ...eCommunicationFailureRecipientsConfig.java | 2 +- .../model/EdgeConnectionRecipientsConfig.java | 2 +- .../org/thingsboard/client/model/EdgeId.java | 80 +- .../thingsboard/client/model/EdgeInfo.java | 14 +- .../model/EntitiesLimitRecipientsConfig.java | 2 +- .../model/EntityActionRecipientsConfig.java | 2 +- ...gregationCalculatedFieldConfiguration.java | 136 +- .../client/model/EntityGroupId.java | 80 +- .../client/model/EntityGroupInfo.java | 13 +- .../model/EntityGroupInfoOwnerIdsInner.java | 2721 ++ .../thingsboard/client/model/EntityId.java | 110 + .../thingsboard/client/model/EntityView.java | 14 +- .../client/model/EntityViewId.java | 80 +- .../client/model/EntityViewInfo.java | 14 +- .../model/ErrorComponentAllOfException.java | 78 +- .../ErrorComponentAllOfExceptionCause.java | 70 +- ...latedNotificationRuleRecipientsConfig.java | 2 +- .../thingsboard/client/model/EventInfo.java | 14 +- .../org/thingsboard/client/model/Failure.java | 35 +- .../client/model/FeaturesInfo.java | 178 +- ...eofencingCalculatedFieldConfiguration.java | 120 +- .../client/model/GroupPermissionId.java | 80 +- .../client/model/HomeMenuItem.java | 39 +- .../thingsboard/client/model/Integration.java | 74 +- .../client/model/IntegrationId.java | 80 +- .../client/model/IntegrationInfo.java | 74 +- ...grationLifecycleEventRecipientsConfig.java | 2 +- .../org/thingsboard/client/model/JobId.java | 80 +- ...icrosoftTeamsNotificationTargetConfig.java | 162 +- .../client/model/MobileAppBundleId.java | 80 +- .../thingsboard/client/model/MobileAppId.java | 80 +- .../model/MobileSelfRegistrationParams.java | 585 +- .../NewPlatformVersionRecipientsConfig.java | 2 +- .../client/model/NotificationId.java | 80 +- .../client/model/NotificationRequestId.java | 80 +- .../client/model/NotificationRuleId.java | 80 +- .../NotificationRuleRecipientsConfig.java | 16 +- .../client/model/NotificationTargetId.java | 80 +- .../client/model/NotificationTemplateId.java | 80 +- .../client/model/OAuth2Client.java | 14 +- .../client/model/OAuth2ClientId.java | 80 +- .../client/model/OtaPackageData.java | 216 +- .../client/model/OtaPackageId.java | 80 +- .../client/model/PdfReportTemplateConfig.java | 34 +- ...opagationCalculatedFieldConfiguration.java | 92 +- .../org/thingsboard/client/model/QueueId.java | 80 +- .../client/model/QueueStatsId.java | 80 +- .../model/RateLimitsRecipientsConfig.java | 2 +- ...gregationCalculatedFieldConfiguration.java | 166 +- .../org/thingsboard/client/model/Report.java | 14 +- .../ReportBarChartWithLabelsSettings.java | 18 +- .../thingsboard/client/model/ReportId.java | 80 +- .../thingsboard/client/model/ReportInfo.java | 14 +- .../model/ReportRangeChartSettings.java | 18 +- .../client/model/ReportTemplate.java | 14 +- .../client/model/ReportTemplateConfig.java | 104 +- .../client/model/ReportTemplateId.java | 80 +- .../client/model/ReportTemplateInfo.java | 14 +- .../model/ReportTimeSeriesChartSettings.java | 74 +- .../ResourceShortageRecipientsConfig.java | 2 +- .../org/thingsboard/client/model/Role.java | 14 +- .../org/thingsboard/client/model/RoleId.java | 80 +- .../org/thingsboard/client/model/RpcId.java | 80 +- .../model/RuleChainDebugEventFilter.java | 68 +- .../thingsboard/client/model/RuleChainId.java | 80 +- ...mponentLifecycleEventRecipientsConfig.java | 2 +- .../model/RuleNodeDebugEventFilter.java | 68 +- .../thingsboard/client/model/RuleNodeId.java | 80 +- .../client/model/ScheduledReportInfo.java | 26 +- .../client/model/SchedulerEvent.java | 26 +- .../client/model/SchedulerEventId.java | 80 +- .../client/model/SchedulerEventInfo.java | 26 +- .../model/SchedulerEventWithCustomerInfo.java | 26 +- .../ScriptCalculatedFieldConfiguration.java | 18 +- .../thingsboard/client/model/SecretId.java | 80 +- .../client/model/SelfRegistrationParams.java | 454 +- .../client/model/ShortEntityView.java | 12 +- .../SimpleCalculatedFieldConfiguration.java | 18 +- .../org/thingsboard/client/model/Success.java | 35 +- ...TaskProcessingFailureRecipientsConfig.java | 2 +- .../client/model/TbResourceId.java | 80 +- .../thingsboard/client/model/TenantId.java | 80 +- .../client/model/TenantProfileId.java | 80 +- .../client/model/TimeSeriesOutput.java | 57 +- .../thingsboard/client/model/TsKvEntry.java | 130 +- .../org/thingsboard/client/model/User.java | 14 +- .../org/thingsboard/client/model/UserId.java | 80 +- .../thingsboard/client/model/UserInfo.java | 14 +- .../model/WebSelfRegistrationParams.java | 577 +- .../thingsboard/client/model/WebViewPage.java | 39 +- .../client/model/WidgetTypeId.java | 80 +- .../client/model/WidgetsBundleId.java | 80 +- .../thingsboard/client/api/AdminApiTest.java | 2 +- .../thingsboard/client/api/AlarmApiTest.java | 5 +- .../client/api/AlarmCommentApiTest.java | 5 +- .../client/api/CalculatedFieldApiTest.java | 16 +- .../thingsboard/client/api/DeviceApiTest.java | 4 +- .../client/api/EntityGroupApiTest.java | 2 +- .../client/api/EntityQueryApiTest.java | 26 +- .../client/api/EntityRelationApiTest.java | 24 +- .../client/api/EntityViewApiTest.java | 8 +- .../thingsboard/client/api/UserApiTest.java | 2 +- pe/docs/BaseReadTsKvQuery.md | 2 +- pe/docs/CalculatedFieldDebugEventFilter.md | 2 +- pe/docs/Dashboard.md | 14 +- pe/docs/DebugConverterEventFilter.md | 2 +- pe/docs/DebugIntegrationEventFilter.md | 2 +- pe/docs/Device.md | 2 +- pe/docs/DeviceInfo.md | 2 +- pe/docs/ErrorComponentAllOfException.md | 2 +- pe/docs/ErrorComponentAllOfExceptionCause.md | 2 +- pe/docs/FeaturesInfo.md | 6 +- .../MicrosoftTeamsNotificationTargetConfig.md | 4 +- pe/docs/MobileSelfRegistrationParams.md | 2 +- pe/docs/OtaPackageData.md | 8 +- pe/docs/ReportTemplateConfig.md | 2 +- pe/docs/RuleChainDebugEventFilter.md | 2 +- pe/docs/RuleNodeDebugEventFilter.md | 2 +- pe/docs/SelfRegistrationParams.md | 16 +- pe/docs/TbResource.md | 2 +- pe/docs/TbResourceInfo.md | 2 +- pe/docs/TsKvEntry.md | 2 +- pe/docs/WebSelfRegistrationParams.md | 2 +- pe/spec/openapi.json | 276 +- .../client/model/BaseReadTsKvQuery.java | 70 +- .../CalculatedFieldDebugEventFilter.java | 68 +- .../client/model/CsvReportTemplateConfig.java | 32 +- .../thingsboard/client/model/Dashboard.java | 436 +- .../model/DebugConverterEventFilter.java | 68 +- .../model/DebugIntegrationEventFilter.java | 68 +- .../org/thingsboard/client/model/Device.java | 78 +- .../thingsboard/client/model/DeviceInfo.java | 78 +- .../model/ErrorComponentAllOfException.java | 78 +- .../ErrorComponentAllOfExceptionCause.java | 70 +- .../client/model/FeaturesInfo.java | 174 +- ...icrosoftTeamsNotificationTargetConfig.java | 162 +- .../model/MobileSelfRegistrationParams.java | 184 +- .../client/model/OtaPackageData.java | 216 +- .../client/model/PdfReportTemplateConfig.java | 32 +- .../client/model/ReportTemplateConfig.java | 104 +- .../model/RuleChainDebugEventFilter.java | 68 +- .../model/RuleNodeDebugEventFilter.java | 68 +- .../client/model/SelfRegistrationParams.java | 416 +- .../thingsboard/client/model/TbResource.java | 56 +- .../client/model/TbResourceInfo.java | 56 +- .../thingsboard/client/model/TsKvEntry.java | 74 +- .../model/WebSelfRegistrationParams.java | 186 +- 385 files changed, 25483 insertions(+), 21804 deletions(-) create mode 100644 paas/docs/ApiUsageStateId.md create mode 100644 paas/docs/DeviceApiControllerApi.md create mode 100644 paas/docs/EntityGroupInfoOwnerIdsInner.md create mode 100644 paas/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java create mode 100644 paas/src/main/java/org/thingsboard/client/model/EntityGroupInfoOwnerIdsInner.java diff --git a/ce/docs/AlarmCommentId.md b/ce/docs/AlarmCommentId.md index 05386ee8..d6c31660 100644 --- a/ce/docs/AlarmCommentId.md +++ b/ce/docs/AlarmCommentId.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | +| **id** | **UUID** | string | | diff --git a/ce/docs/AuditLogId.md b/ce/docs/AuditLogId.md index 40437321..c92d14e0 100644 --- a/ce/docs/AuditLogId.md +++ b/ce/docs/AuditLogId.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | | [optional] | +| **id** | **UUID** | string | | diff --git a/ce/docs/CalculatedFieldDebugEventFilter.md b/ce/docs/CalculatedFieldDebugEventFilter.md index e31ffb23..4654cee1 100644 --- a/ce/docs/CalculatedFieldDebugEventFilter.md +++ b/ce/docs/CalculatedFieldDebugEventFilter.md @@ -17,8 +17,8 @@ | **msgType** | **String** | String value representing the message type | [optional] | | **arguments** | **String** | String value representing the arguments that were used in the calculation performed | [optional] | | **result** | **String** | String value representing the result of a calculation | [optional] | -| **isError** | **Boolean** | | [optional] | | **error** | **Boolean** | | [optional] | +| **isError** | **Boolean** | | [optional] | ### Enum: EntityTypeEnum diff --git a/ce/docs/ComponentDescriptorId.md b/ce/docs/ComponentDescriptorId.md index cffbddfd..8a0673b1 100644 --- a/ce/docs/ComponentDescriptorId.md +++ b/ce/docs/ComponentDescriptorId.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | | [optional] | +| **id** | **UUID** | string | | diff --git a/ce/docs/Dashboard.md b/ce/docs/Dashboard.md index 3fc34a8c..31fea1ad 100644 --- a/ce/docs/Dashboard.md +++ b/ce/docs/Dashboard.md @@ -7,18 +7,18 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **DashboardId** | JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. | [optional] | -| **createdTime** | **Long** | Timestamp of the dashboard creation, in milliseconds | [optional] [readonly] | -| **tenantId** | **TenantId** | JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. | [optional] [readonly] | | **title** | **String** | Title of the dashboard. | | | **image** | **String** | Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. | [optional] [readonly] | -| **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | | **mobileHide** | **Boolean** | Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. | [optional] [readonly] | | **mobileOrder** | **Integer** | Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications | [optional] [readonly] | -| **version** | **Long** | | [optional] | -| **resources** | **List\** | | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON. | [optional] | | **name** | **String** | Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. | [optional] [readonly] | +| **resources** | **List\** | | [optional] | +| **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | +| **createdTime** | **Long** | Timestamp of the dashboard creation, in milliseconds | [optional] [readonly] | +| **id** | **DashboardId** | JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. | [optional] | +| **tenantId** | **TenantId** | JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. | [optional] [readonly] | +| **version** | **Long** | | [optional] | diff --git a/ce/docs/DeviceCredentialsId.md b/ce/docs/DeviceCredentialsId.md index 7d21d320..2ee8844c 100644 --- a/ce/docs/DeviceCredentialsId.md +++ b/ce/docs/DeviceCredentialsId.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | | [optional] | +| **id** | **UUID** | string | | diff --git a/ce/docs/EdgeEventId.md b/ce/docs/EdgeEventId.md index 86b964f3..f967bb24 100644 --- a/ce/docs/EdgeEventId.md +++ b/ce/docs/EdgeEventId.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | | [optional] | +| **id** | **UUID** | string | | diff --git a/ce/docs/EntityId.md b/ce/docs/EntityId.md index 18402a2a..f179bec2 100644 --- a/ce/docs/EntityId.md +++ b/ce/docs/EntityId.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | | **entityType** | **EntityType** | | | +| **id** | **UUID** | ID of the entity, time-based UUID v1 | | diff --git a/ce/docs/EventId.md b/ce/docs/EventId.md index 32ef60f1..667453f3 100644 --- a/ce/docs/EventId.md +++ b/ce/docs/EventId.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | | [optional] | +| **id** | **UUID** | string | | diff --git a/ce/docs/FeaturesInfo.md b/ce/docs/FeaturesInfo.md index ebf4ca82..e32f8279 100644 --- a/ce/docs/FeaturesInfo.md +++ b/ce/docs/FeaturesInfo.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **emailEnabled** | **Boolean** | | [optional] | | **smsEnabled** | **Boolean** | | [optional] | -| **oauthEnabled** | **Boolean** | | [optional] | | **notificationEnabled** | **Boolean** | | [optional] | +| **oauthEnabled** | **Boolean** | | [optional] | | **twoFaEnabled** | **Boolean** | | [optional] | -| **emailEnabled** | **Boolean** | | [optional] | diff --git a/ce/docs/MicrosoftTeamsNotificationTargetConfig.md b/ce/docs/MicrosoftTeamsNotificationTargetConfig.md index b39ff995..f6abb253 100644 --- a/ce/docs/MicrosoftTeamsNotificationTargetConfig.md +++ b/ce/docs/MicrosoftTeamsNotificationTargetConfig.md @@ -12,11 +12,11 @@ | **webhookUrl** | **String** | | | | **channelName** | **String** | | | | **useOldApi** | **Boolean** | | [optional] | -| **id** | **Object** | | [optional] | -| **title** | **String** | | [optional] | | **email** | **String** | | [optional] | | **firstName** | **String** | | [optional] | +| **id** | **Object** | | [optional] | | **lastName** | **String** | | [optional] | +| **title** | **String** | | [optional] | diff --git a/ce/docs/OAuth2ClientRegistrationTemplateId.md b/ce/docs/OAuth2ClientRegistrationTemplateId.md index e37054ba..641863f6 100644 --- a/ce/docs/OAuth2ClientRegistrationTemplateId.md +++ b/ce/docs/OAuth2ClientRegistrationTemplateId.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | | [optional] | +| **id** | **UUID** | string | | diff --git a/ce/docs/OtaPackageData.md b/ce/docs/OtaPackageData.md index ef21853b..1acf91c1 100644 --- a/ce/docs/OtaPackageData.md +++ b/ce/docs/OtaPackageData.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **_short** | **Integer** | | [optional] | | **_char** | **String** | | [optional] | +| **direct** | **Boolean** | | [optional] | +| **_double** | **Double** | | [optional] | +| **_float** | **Float** | | [optional] | | **_int** | **Integer** | | [optional] | | **_long** | **Long** | | [optional] | -| **_float** | **Float** | | [optional] | -| **_double** | **Double** | | [optional] | -| **direct** | **Boolean** | | [optional] | | **readOnly** | **Boolean** | | [optional] | +| **_short** | **Integer** | | [optional] | diff --git a/ce/docs/QrCodeSettingsId.md b/ce/docs/QrCodeSettingsId.md index b9a925c6..bc0eb9e6 100644 --- a/ce/docs/QrCodeSettingsId.md +++ b/ce/docs/QrCodeSettingsId.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | +| **id** | **UUID** | string | | diff --git a/ce/docs/RuleChainDebugEventFilter.md b/ce/docs/RuleChainDebugEventFilter.md index 6f9e9e0e..9ace52e2 100644 --- a/ce/docs/RuleChainDebugEventFilter.md +++ b/ce/docs/RuleChainDebugEventFilter.md @@ -12,8 +12,8 @@ | **server** | **String** | String value representing the server name, identifier or ip address where the platform is running | [optional] | | **errorStr** | **String** | The case insensitive 'contains' filter based on error message | [optional] | | **message** | **String** | String value representing the message | [optional] | -| **isError** | **Boolean** | | [optional] | | **error** | **Boolean** | | [optional] | +| **isError** | **Boolean** | | [optional] | diff --git a/ce/docs/RuleNodeDebugEventFilter.md b/ce/docs/RuleNodeDebugEventFilter.md index 16baea68..6791375f 100644 --- a/ce/docs/RuleNodeDebugEventFilter.md +++ b/ce/docs/RuleNodeDebugEventFilter.md @@ -19,8 +19,8 @@ | **relationType** | **String** | String value representing the type of message routing | [optional] | | **dataSearch** | **String** | The case insensitive 'contains' filter based on data (key and value) for the message. | [optional] | | **metadataSearch** | **String** | The case insensitive 'contains' filter based on metadata (key and value) for the message. | [optional] | -| **isError** | **Boolean** | | [optional] | | **error** | **Boolean** | | [optional] | +| **isError** | **Boolean** | | [optional] | ### Enum: MsgDirectionTypeEnum diff --git a/ce/docs/TbResource.md b/ce/docs/TbResource.md index 9d107784..e0042cae 100644 --- a/ce/docs/TbResource.md +++ b/ce/docs/TbResource.md @@ -24,8 +24,8 @@ A JSON value representing the Resource. | **preview** | **String** | | [optional] | | **name** | **String** | | [optional] [readonly] | | **_public** | **Boolean** | | [optional] | -| **publicLink** | **String** | | [optional] [readonly] | | **link** | **String** | | [optional] [readonly] | +| **publicLink** | **String** | | [optional] [readonly] | diff --git a/ce/docs/TbResourceInfo.md b/ce/docs/TbResourceInfo.md index 4a87a800..fe6ef5bc 100644 --- a/ce/docs/TbResourceInfo.md +++ b/ce/docs/TbResourceInfo.md @@ -22,8 +22,8 @@ A JSON value representing the Resource Info. | **descriptor** | **com.fasterxml.jackson.databind.JsonNode** | Resource descriptor. | [optional] | | **name** | **String** | | [optional] [readonly] | | **_public** | **Boolean** | | [optional] | -| **publicLink** | **String** | | [optional] [readonly] | | **link** | **String** | | [optional] [readonly] | +| **publicLink** | **String** | | [optional] [readonly] | diff --git a/ce/spec/openapi.json b/ce/spec/openapi.json index 55ef9da3..8a111545 100644 --- a/ce/spec/openapi.json +++ b/ce/spec/openapi.json @@ -82806,7 +82806,7 @@ "id": { "type": "string", "format": "uuid", - "description": "ID of the entity, time-based UUID v1", + "description": "string", "example": "784f394c-42b6-435a-983c-b7beff2784f9" } }, @@ -85109,9 +85109,14 @@ "properties": { "id": { "type": "string", - "format": "uuid" + "format": "uuid", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" } - } + }, + "required": [ + "id" + ] }, "AuthenticationProtocol": { "type": "string", @@ -85770,12 +85775,12 @@ "x + y": 32 } }, + "error": { + "type": "boolean" + }, "isError": { "type": "boolean", "writeOnly": true - }, - "error": { - "type": "boolean" } } } @@ -86176,9 +86181,14 @@ "properties": { "id": { "type": "string", - "format": "uuid" + "format": "uuid", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" } - } + }, + "required": [ + "id" + ] }, "ComponentLifecycleEvent": { "type": "string", @@ -86446,22 +86456,6 @@ "Dashboard": { "type": "object", "properties": { - "id": { - "$ref": "#/components/schemas/DashboardId", - "description": "JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard." - }, - "createdTime": { - "type": "integer", - "format": "int64", - "description": "Timestamp of the dashboard creation, in milliseconds", - "example": 1609459200000, - "readOnly": true - }, - "tenantId": { - "$ref": "#/components/schemas/TenantId", - "description": "JSON object with Tenant Id. Tenant Id of the dashboard can't be changed.", - "readOnly": true - }, "title": { "type": "string", "description": "Title of the dashboard." @@ -86471,15 +86465,6 @@ "description": "Thumbnail picture for rendering of the dashboards in a grid view on mobile devices.", "readOnly": true }, - "assignedCustomers": { - "type": "array", - "description": "List of assigned customers with their info.", - "items": { - "$ref": "#/components/schemas/ShortCustomerInfo" - }, - "readOnly": true, - "uniqueItems": true - }, "mobileHide": { "type": "boolean", "description": "Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens.", @@ -86491,9 +86476,14 @@ "description": "Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications", "readOnly": true }, - "version": { - "type": "integer", - "format": "int64" + "configuration": { + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON." + }, + "name": { + "type": "string", + "description": "Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", + "readOnly": true }, "resources": { "type": "array", @@ -86501,14 +86491,34 @@ "$ref": "#/components/schemas/ResourceExportData" } }, - "configuration": { - "$ref": "#/components/schemas/JsonNode", - "description": "JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON." + "assignedCustomers": { + "type": "array", + "description": "List of assigned customers with their info.", + "items": { + "$ref": "#/components/schemas/ShortCustomerInfo" + }, + "readOnly": true, + "uniqueItems": true }, - "name": { - "type": "string", - "description": "Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the dashboard creation, in milliseconds", + "example": 1609459200000, "readOnly": true + }, + "id": { + "$ref": "#/components/schemas/DashboardId", + "description": "JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard." + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id. Tenant Id of the dashboard can't be changed.", + "readOnly": true + }, + "version": { + "type": "integer", + "format": "int64" } }, "required": [ @@ -87350,9 +87360,14 @@ "properties": { "id": { "type": "string", - "format": "uuid" + "format": "uuid", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" } - } + }, + "required": [ + "id" + ] }, "DeviceCredentialsType": { "type": "string", @@ -88465,9 +88480,14 @@ "properties": { "id": { "type": "string", - "format": "uuid" + "format": "uuid", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" } - } + }, + "required": [ + "id" + ] }, "EdgeEventType": { "type": "string", @@ -89217,15 +89237,15 @@ } }, "properties": { + "entityType": { + "$ref": "#/components/schemas/EntityType", + "example": "DEVICE" + }, "id": { "type": "string", "format": "uuid", "description": "ID of the entity, time-based UUID v1", "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "example": "DEVICE" } }, "required": [ @@ -89978,9 +89998,14 @@ "properties": { "id": { "type": "string", - "format": "uuid" + "format": "uuid", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" } - } + }, + "required": [ + "id" + ] }, "EventInfo": { "type": "object", @@ -90060,19 +90085,19 @@ "FeaturesInfo": { "type": "object", "properties": { - "smsEnabled": { + "emailEnabled": { "type": "boolean" }, - "oauthEnabled": { + "smsEnabled": { "type": "boolean" }, "notificationEnabled": { "type": "boolean" }, - "twoFaEnabled": { + "oauthEnabled": { "type": "boolean" }, - "emailEnabled": { + "twoFaEnabled": { "type": "boolean" } } @@ -91375,20 +91400,20 @@ "useOldApi": { "type": "boolean" }, - "id": { - - }, - "title": { - "type": "string" - }, "email": { "type": "string" }, "firstName": { "type": "string" + }, + "id": { + }, "lastName": { "type": "string" + }, + "title": { + "type": "string" } } } @@ -93112,9 +93137,14 @@ "properties": { "id": { "type": "string", - "format": "uuid" + "format": "uuid", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" } - } + }, + "required": [ + "id" + ] }, "OAuth2CustomMapperConfig": { "type": "object", @@ -93586,34 +93616,34 @@ "data": { "type": "object", "properties": { - "short": { - "type": "integer", - "format": "int32" - }, "char": { "type": "string" }, - "int": { - "type": "integer", - "format": "int32" + "direct": { + "type": "boolean" }, - "long": { - "type": "integer", - "format": "int64" + "double": { + "type": "number", + "format": "double" }, "float": { "type": "number", "format": "float" }, - "double": { - "type": "number", - "format": "double" + "int": { + "type": "integer", + "format": "int32" }, - "direct": { - "type": "boolean" + "long": { + "type": "integer", + "format": "int64" }, "readOnly": { "type": "boolean" + }, + "short": { + "type": "integer", + "format": "int32" } } }, @@ -95736,7 +95766,7 @@ "id": { "type": "string", "format": "uuid", - "description": "ID of the entity, time-based UUID v1", + "description": "string", "example": "784f394c-42b6-435a-983c-b7beff2784f9" } }, @@ -96627,12 +96657,12 @@ "type": "string", "description": "String value representing the message" }, + "error": { + "type": "boolean" + }, "isError": { "type": "boolean", "writeOnly": true - }, - "error": { - "type": "boolean" } } } @@ -96979,12 +97009,12 @@ "description": "The case insensitive 'contains' filter based on metadata (key and value) for the message.", "example": "deviceName" }, + "error": { + "type": "boolean" + }, "isError": { "type": "boolean", "writeOnly": true - }, - "error": { - "type": "boolean" } } } @@ -98191,11 +98221,11 @@ "public": { "type": "boolean" }, - "publicLink": { + "link": { "type": "string", "readOnly": true }, - "link": { + "publicLink": { "type": "string", "readOnly": true } @@ -98302,11 +98332,11 @@ "public": { "type": "boolean" }, - "publicLink": { + "link": { "type": "string", "readOnly": true }, - "link": { + "publicLink": { "type": "string", "readOnly": true } diff --git a/ce/src/main/java/org/thingsboard/client/model/AdminSettingsId.java b/ce/src/main/java/org/thingsboard/client/model/AdminSettingsId.java index 7ad6f9fd..27348fc7 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AdminSettingsId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AdminSettingsId.java @@ -55,14 +55,14 @@ public AdminSettingsId() { } @Override - public AdminSettingsId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public AdminSettingsId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public AdminSettingsId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public AdminSettingsId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/AiModelId.java b/ce/src/main/java/org/thingsboard/client/model/AiModelId.java index 4ec02d0c..0087041b 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AiModelId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AiModelId.java @@ -55,14 +55,14 @@ public AiModelId() { } @Override - public AiModelId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public AiModelId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public AiModelId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public AiModelId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/AlarmCommentId.java b/ce/src/main/java/org/thingsboard/client/model/AlarmCommentId.java index 6f453835..41b2c2b1 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AlarmCommentId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AlarmCommentId.java @@ -53,7 +53,7 @@ public AlarmCommentId id(@javax.annotation.Nonnull UUID id) { } /** - * ID of the entity, time-based UUID v1 + * string * @return id */ @javax.annotation.Nonnull diff --git a/ce/src/main/java/org/thingsboard/client/model/AlarmId.java b/ce/src/main/java/org/thingsboard/client/model/AlarmId.java index d24b8337..89e7845a 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AlarmId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AlarmId.java @@ -55,14 +55,14 @@ public AlarmId() { } @Override - public AlarmId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public AlarmId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public AlarmId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public AlarmId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/ApiKeyId.java b/ce/src/main/java/org/thingsboard/client/model/ApiKeyId.java index aa45306b..4e1a602d 100644 --- a/ce/src/main/java/org/thingsboard/client/model/ApiKeyId.java +++ b/ce/src/main/java/org/thingsboard/client/model/ApiKeyId.java @@ -55,14 +55,14 @@ public ApiKeyId() { } @Override - public ApiKeyId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public ApiKeyId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public ApiKeyId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public ApiKeyId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java b/ce/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java index 1e2ff9c3..4ba25b7c 100644 --- a/ce/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java +++ b/ce/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java @@ -55,14 +55,14 @@ public ApiUsageStateId() { } @Override - public ApiUsageStateId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public ApiUsageStateId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public ApiUsageStateId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public ApiUsageStateId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/AssetId.java b/ce/src/main/java/org/thingsboard/client/model/AssetId.java index e8d5db42..020c1374 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AssetId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AssetId.java @@ -55,14 +55,14 @@ public AssetId() { } @Override - public AssetId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public AssetId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public AssetId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public AssetId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/AssetProfileId.java b/ce/src/main/java/org/thingsboard/client/model/AssetProfileId.java index 63cd8f02..a010b9fd 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AssetProfileId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AssetProfileId.java @@ -55,14 +55,14 @@ public AssetProfileId() { } @Override - public AssetProfileId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public AssetProfileId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public AssetProfileId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public AssetProfileId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/AuditLogId.java b/ce/src/main/java/org/thingsboard/client/model/AuditLogId.java index dd541320..5f84ef76 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AuditLogId.java +++ b/ce/src/main/java/org/thingsboard/client/model/AuditLogId.java @@ -41,32 +41,32 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class AuditLogId { public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nullable + @javax.annotation.Nonnull private UUID id; public AuditLogId() { } - public AuditLogId id(@javax.annotation.Nullable UUID id) { + public AuditLogId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; } /** - * Get id + * string * @return id */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public UUID getId() { return id; } - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(@javax.annotation.Nullable UUID id) { + @JsonProperty(value = JSON_PROPERTY_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { this.id = id; } diff --git a/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java b/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java index d24b4447..8891973e 100644 --- a/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java +++ b/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java @@ -49,8 +49,8 @@ CalculatedFieldDebugEventFilter.JSON_PROPERTY_MSG_TYPE, CalculatedFieldDebugEventFilter.JSON_PROPERTY_ARGUMENTS, CalculatedFieldDebugEventFilter.JSON_PROPERTY_RESULT, - CalculatedFieldDebugEventFilter.JSON_PROPERTY_IS_ERROR, - CalculatedFieldDebugEventFilter.JSON_PROPERTY_ERROR + CalculatedFieldDebugEventFilter.JSON_PROPERTY_ERROR, + CalculatedFieldDebugEventFilter.JSON_PROPERTY_IS_ERROR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -125,14 +125,14 @@ public static EntityTypeEnum fromValue(String value) { @javax.annotation.Nullable private String result; - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public static final String JSON_PROPERTY_ERROR = "error"; @javax.annotation.Nullable private Boolean error; + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private Boolean isError; + public CalculatedFieldDebugEventFilter() { } @@ -328,51 +328,51 @@ public void setResult(@javax.annotation.Nullable String result) { } - public CalculatedFieldDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public CalculatedFieldDebugEventFilter error(@javax.annotation.Nullable Boolean error) { + this.error = error; return this; } /** - * Get isError - * @return isError + * Get error + * @return error */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; + public Boolean getError() { + return error; } - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public void setError(@javax.annotation.Nullable Boolean error) { + this.error = error; } - public CalculatedFieldDebugEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; + public CalculatedFieldDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; return this; } /** - * Get error - * @return error + * Get isError + * @return isError */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; + public Boolean getIsError() { + return isError; } - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; + public void setIsError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; } @@ -408,14 +408,14 @@ public boolean equals(Object o) { Objects.equals(this.msgType, calculatedFieldDebugEventFilter.msgType) && Objects.equals(this.arguments, calculatedFieldDebugEventFilter.arguments) && Objects.equals(this.result, calculatedFieldDebugEventFilter.result) && - Objects.equals(this.isError, calculatedFieldDebugEventFilter.isError) && Objects.equals(this.error, calculatedFieldDebugEventFilter.error) && + Objects.equals(this.isError, calculatedFieldDebugEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, entityId, entityType, msgId, msgType, arguments, result, isError, error, super.hashCode()); + return Objects.hash(server, errorStr, entityId, entityType, msgId, msgType, arguments, result, error, isError, super.hashCode()); } @Override @@ -431,8 +431,8 @@ public String toString() { sb.append(" msgType: ").append(toIndentedString(msgType)).append("\n"); sb.append(" arguments: ").append(toIndentedString(arguments)).append("\n"); sb.append(" result: ").append(toIndentedString(result)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -530,16 +530,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); } - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - // add `error` to the URL query string if (getError() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java b/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java index 724a8af2..7b2eb2fe 100644 --- a/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java +++ b/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java @@ -55,14 +55,14 @@ public CalculatedFieldId() { } @Override - public CalculatedFieldId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public CalculatedFieldId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public CalculatedFieldId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public CalculatedFieldId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/ComponentDescriptorId.java b/ce/src/main/java/org/thingsboard/client/model/ComponentDescriptorId.java index d825c9c3..500a7f6c 100644 --- a/ce/src/main/java/org/thingsboard/client/model/ComponentDescriptorId.java +++ b/ce/src/main/java/org/thingsboard/client/model/ComponentDescriptorId.java @@ -41,32 +41,32 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class ComponentDescriptorId { public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nullable + @javax.annotation.Nonnull private UUID id; public ComponentDescriptorId() { } - public ComponentDescriptorId id(@javax.annotation.Nullable UUID id) { + public ComponentDescriptorId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; } /** - * Get id + * string * @return id */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public UUID getId() { return id; } - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(@javax.annotation.Nullable UUID id) { + @JsonProperty(value = JSON_PROPERTY_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { this.id = id; } diff --git a/ce/src/main/java/org/thingsboard/client/model/CustomerId.java b/ce/src/main/java/org/thingsboard/client/model/CustomerId.java index 0111bf30..65d73299 100644 --- a/ce/src/main/java/org/thingsboard/client/model/CustomerId.java +++ b/ce/src/main/java/org/thingsboard/client/model/CustomerId.java @@ -55,14 +55,14 @@ public CustomerId() { } @Override - public CustomerId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public CustomerId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public CustomerId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public CustomerId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/Dashboard.java b/ce/src/main/java/org/thingsboard/client/model/Dashboard.java index 82e43370..85c75a2c 100644 --- a/ce/src/main/java/org/thingsboard/client/model/Dashboard.java +++ b/ce/src/main/java/org/thingsboard/client/model/Dashboard.java @@ -44,33 +44,21 @@ * Dashboard */ @JsonPropertyOrder({ - Dashboard.JSON_PROPERTY_ID, - Dashboard.JSON_PROPERTY_CREATED_TIME, - Dashboard.JSON_PROPERTY_TENANT_ID, Dashboard.JSON_PROPERTY_TITLE, Dashboard.JSON_PROPERTY_IMAGE, - Dashboard.JSON_PROPERTY_ASSIGNED_CUSTOMERS, Dashboard.JSON_PROPERTY_MOBILE_HIDE, Dashboard.JSON_PROPERTY_MOBILE_ORDER, - Dashboard.JSON_PROPERTY_VERSION, - Dashboard.JSON_PROPERTY_RESOURCES, Dashboard.JSON_PROPERTY_CONFIGURATION, - Dashboard.JSON_PROPERTY_NAME + Dashboard.JSON_PROPERTY_NAME, + Dashboard.JSON_PROPERTY_RESOURCES, + Dashboard.JSON_PROPERTY_ASSIGNED_CUSTOMERS, + Dashboard.JSON_PROPERTY_CREATED_TIME, + Dashboard.JSON_PROPERTY_ID, + Dashboard.JSON_PROPERTY_TENANT_ID, + Dashboard.JSON_PROPERTY_VERSION }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class Dashboard { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nullable - private DashboardId id; - - public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; - @javax.annotation.Nullable - private Long createdTime; - - public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; - @javax.annotation.Nullable - private TenantId tenantId; - public static final String JSON_PROPERTY_TITLE = "title"; @javax.annotation.Nonnull private String title; @@ -79,10 +67,6 @@ public class Dashboard { @javax.annotation.Nullable private String image; - public static final String JSON_PROPERTY_ASSIGNED_CUSTOMERS = "assignedCustomers"; - @javax.annotation.Nullable - private Set assignedCustomers = new LinkedHashSet<>(); - public static final String JSON_PROPERTY_MOBILE_HIDE = "mobileHide"; @javax.annotation.Nullable private Boolean mobileHide; @@ -91,95 +75,59 @@ public class Dashboard { @javax.annotation.Nullable private Integer mobileOrder; - public static final String JSON_PROPERTY_VERSION = "version"; + public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; @javax.annotation.Nullable - private Long version; + private com.fasterxml.jackson.databind.JsonNode _configuration; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; public static final String JSON_PROPERTY_RESOURCES = "resources"; @javax.annotation.Nullable private List resources = new ArrayList<>(); - public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; + public static final String JSON_PROPERTY_ASSIGNED_CUSTOMERS = "assignedCustomers"; @javax.annotation.Nullable - private com.fasterxml.jackson.databind.JsonNode _configuration; + private Set assignedCustomers = new LinkedHashSet<>(); - public static final String JSON_PROPERTY_NAME = "name"; + public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; @javax.annotation.Nullable - private String name; + private Long createdTime; + + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private DashboardId id; + + public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; + @javax.annotation.Nullable + private TenantId tenantId; + + public static final String JSON_PROPERTY_VERSION = "version"; + @javax.annotation.Nullable + private Long version; public Dashboard() { } @JsonCreator public Dashboard( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_IMAGE) String image, @JsonProperty(JSON_PROPERTY_MOBILE_HIDE) Boolean mobileHide, @JsonProperty(JSON_PROPERTY_MOBILE_ORDER) Integer mobileOrder, - @JsonProperty(JSON_PROPERTY_NAME) String name + @JsonProperty(JSON_PROPERTY_NAME) String name, + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId ) { this(); - this.createdTime = createdTime; - this.tenantId = tenantId; this.image = image; this.mobileHide = mobileHide; this.mobileOrder = mobileOrder; this.name = name; + this.createdTime = createdTime; + this.tenantId = tenantId; } - public Dashboard id(@javax.annotation.Nullable DashboardId id) { - this.id = id; - return this; - } - - /** - * JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. - * @return id - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DashboardId getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(@javax.annotation.Nullable DashboardId id) { - this.id = id; - } - - - /** - * Timestamp of the dashboard creation, in milliseconds - * @return createdTime - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CREATED_TIME, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCreatedTime() { - return createdTime; - } - - - - - /** - * JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. - * @return tenantId - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TenantId getTenantId() { - return tenantId; - } - - - - public Dashboard title(@javax.annotation.Nonnull String title) { this.title = title; return this; @@ -218,39 +166,6 @@ public String getImage() { - public Dashboard assignedCustomers(@javax.annotation.Nullable Set assignedCustomers) { - this.assignedCustomers = assignedCustomers; - return this; - } - - public Dashboard addAssignedCustomersItem(ShortCustomerInfo assignedCustomersItem) { - if (this.assignedCustomers == null) { - this.assignedCustomers = new LinkedHashSet<>(); - } - this.assignedCustomers.add(assignedCustomersItem); - return this; - } - - /** - * List of assigned customers with their info. - * @return assignedCustomers - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ASSIGNED_CUSTOMERS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Set getAssignedCustomers() { - return assignedCustomers; - } - - - @JsonDeserialize(as = LinkedHashSet.class) - @JsonProperty(value = JSON_PROPERTY_ASSIGNED_CUSTOMERS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAssignedCustomers(@javax.annotation.Nullable Set assignedCustomers) { - this.assignedCustomers = assignedCustomers; - } - - /** * Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. * @return mobileHide @@ -279,30 +194,44 @@ public Integer getMobileOrder() { - public Dashboard version(@javax.annotation.Nullable Long version) { - this.version = version; + public Dashboard _configuration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { + this._configuration = _configuration; return this; } /** - * Get version - * @return version + * JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON. + * @return _configuration */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VERSION, required = false) + @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getVersion() { - return version; + public com.fasterxml.jackson.databind.JsonNode getConfiguration() { + return _configuration; } - @JsonProperty(value = JSON_PROPERTY_VERSION, required = false) + @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setVersion(@javax.annotation.Nullable Long version) { - this.version = version; + public void setConfiguration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { + this._configuration = _configuration; } + /** + * Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_NAME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + + public Dashboard resources(@javax.annotation.Nullable List resources) { this.resources = resources; return this; @@ -335,44 +264,115 @@ public void setResources(@javax.annotation.Nullable List res } - public Dashboard _configuration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { - this._configuration = _configuration; + public Dashboard assignedCustomers(@javax.annotation.Nullable Set assignedCustomers) { + this.assignedCustomers = assignedCustomers; + return this; + } + + public Dashboard addAssignedCustomersItem(ShortCustomerInfo assignedCustomersItem) { + if (this.assignedCustomers == null) { + this.assignedCustomers = new LinkedHashSet<>(); + } + this.assignedCustomers.add(assignedCustomersItem); return this; } /** - * JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON. - * @return _configuration + * List of assigned customers with their info. + * @return assignedCustomers */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) + @JsonProperty(value = JSON_PROPERTY_ASSIGNED_CUSTOMERS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public com.fasterxml.jackson.databind.JsonNode getConfiguration() { - return _configuration; + public Set getAssignedCustomers() { + return assignedCustomers; } - @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) + @JsonDeserialize(as = LinkedHashSet.class) + @JsonProperty(value = JSON_PROPERTY_ASSIGNED_CUSTOMERS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setConfiguration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { - this._configuration = _configuration; + public void setAssignedCustomers(@javax.annotation.Nullable Set assignedCustomers) { + this.assignedCustomers = assignedCustomers; } /** - * Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. - * @return name + * Timestamp of the dashboard creation, in milliseconds + * @return createdTime */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_NAME, required = false) + @JsonProperty(value = JSON_PROPERTY_CREATED_TIME, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; + public Long getCreatedTime() { + return createdTime; } + public Dashboard id(@javax.annotation.Nullable DashboardId id) { + this.id = id; + return this; + } + + /** + * JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DashboardId getId() { + return id; + } + + + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(@javax.annotation.Nullable DashboardId id) { + this.id = id; + } + + + /** + * JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. + * @return tenantId + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TenantId getTenantId() { + return tenantId; + } + + + + + public Dashboard version(@javax.annotation.Nullable Long version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_VERSION, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getVersion() { + return version; + } + + + @JsonProperty(value = JSON_PROPERTY_VERSION, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVersion(@javax.annotation.Nullable Long version) { + this.version = version; + } + + /** * Return true if this Dashboard object is equal to o. */ @@ -385,41 +385,41 @@ public boolean equals(Object o) { return false; } Dashboard dashboard = (Dashboard) o; - return Objects.equals(this.id, dashboard.id) && - Objects.equals(this.createdTime, dashboard.createdTime) && - Objects.equals(this.tenantId, dashboard.tenantId) && - Objects.equals(this.title, dashboard.title) && + return Objects.equals(this.title, dashboard.title) && Objects.equals(this.image, dashboard.image) && - Objects.equals(this.assignedCustomers, dashboard.assignedCustomers) && Objects.equals(this.mobileHide, dashboard.mobileHide) && Objects.equals(this.mobileOrder, dashboard.mobileOrder) && - Objects.equals(this.version, dashboard.version) && - Objects.equals(this.resources, dashboard.resources) && Objects.equals(this._configuration, dashboard._configuration) && - Objects.equals(this.name, dashboard.name); + Objects.equals(this.name, dashboard.name) && + Objects.equals(this.resources, dashboard.resources) && + Objects.equals(this.assignedCustomers, dashboard.assignedCustomers) && + Objects.equals(this.createdTime, dashboard.createdTime) && + Objects.equals(this.id, dashboard.id) && + Objects.equals(this.tenantId, dashboard.tenantId) && + Objects.equals(this.version, dashboard.version); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, title, image, assignedCustomers, mobileHide, mobileOrder, version, resources, _configuration, name); + return Objects.hash(title, image, mobileHide, mobileOrder, _configuration, name, resources, assignedCustomers, createdTime, id, tenantId, version); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Dashboard {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); - sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" image: ").append(toIndentedString(image)).append("\n"); - sb.append(" assignedCustomers: ").append(toIndentedString(assignedCustomers)).append("\n"); sb.append(" mobileHide: ").append(toIndentedString(mobileHide)).append("\n"); sb.append(" mobileOrder: ").append(toIndentedString(mobileOrder)).append("\n"); - sb.append(" version: ").append(toIndentedString(version)).append("\n"); - sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); + sb.append(" assignedCustomers: ").append(toIndentedString(assignedCustomers)).append("\n"); + sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append("}"); return sb.toString(); } @@ -467,21 +467,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(getId().toUrlQueryString(prefix + "id" + suffix)); - } - - // add `createdTime` to the URL query string - if (getCreatedTime() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%screatedTime%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedTime())))); - } - - // add `tenantId` to the URL query string - if (getTenantId() != null) { - joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix)); - } - // add `title` to the URL query string if (getTitle() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); @@ -492,18 +477,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%simage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getImage())))); } - // add `assignedCustomers` to the URL query string - if (getAssignedCustomers() != null) { - int i = 0; - for (ShortCustomerInfo _item : getAssignedCustomers()) { - if (_item != null) { - joiner.add(_item.toUrlQueryString(String.format(java.util.Locale.ROOT, "%sassignedCustomers%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - i++; - } - // add `mobileHide` to the URL query string if (getMobileHide() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%smobileHide%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMobileHide())))); @@ -514,9 +487,14 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smobileOrder%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMobileOrder())))); } - // add `version` to the URL query string - if (getVersion() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); + // add `configuration` to the URL query string + if (getConfiguration() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sconfiguration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfiguration())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); } // add `resources` to the URL query string @@ -529,14 +507,36 @@ public String toUrlQueryString(String prefix) { } } - // add `configuration` to the URL query string - if (getConfiguration() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sconfiguration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfiguration())))); + // add `assignedCustomers` to the URL query string + if (getAssignedCustomers() != null) { + int i = 0; + for (ShortCustomerInfo _item : getAssignedCustomers()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format(java.util.Locale.ROOT, "%sassignedCustomers%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; } - // add `name` to the URL query string - if (getName() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + // add `createdTime` to the URL query string + if (getCreatedTime() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%screatedTime%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedTime())))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(getId().toUrlQueryString(prefix + "id" + suffix)); + } + + // add `tenantId` to the URL query string + if (getTenantId() != null) { + joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix)); + } + + // add `version` to the URL query string + if (getVersion() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); } return joiner.toString(); diff --git a/ce/src/main/java/org/thingsboard/client/model/DashboardId.java b/ce/src/main/java/org/thingsboard/client/model/DashboardId.java index 56d8e5b5..0adb2885 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DashboardId.java +++ b/ce/src/main/java/org/thingsboard/client/model/DashboardId.java @@ -55,14 +55,14 @@ public DashboardId() { } @Override - public DashboardId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public DashboardId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public DashboardId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public DashboardId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/DeviceCredentialsId.java b/ce/src/main/java/org/thingsboard/client/model/DeviceCredentialsId.java index 4eec6b43..f3565ce4 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DeviceCredentialsId.java +++ b/ce/src/main/java/org/thingsboard/client/model/DeviceCredentialsId.java @@ -41,32 +41,32 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class DeviceCredentialsId { public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nullable + @javax.annotation.Nonnull private UUID id; public DeviceCredentialsId() { } - public DeviceCredentialsId id(@javax.annotation.Nullable UUID id) { + public DeviceCredentialsId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; } /** - * Get id + * string * @return id */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public UUID getId() { return id; } - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(@javax.annotation.Nullable UUID id) { + @JsonProperty(value = JSON_PROPERTY_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { this.id = id; } diff --git a/ce/src/main/java/org/thingsboard/client/model/DeviceId.java b/ce/src/main/java/org/thingsboard/client/model/DeviceId.java index 6088bccf..333fbafe 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DeviceId.java +++ b/ce/src/main/java/org/thingsboard/client/model/DeviceId.java @@ -55,14 +55,14 @@ public DeviceId() { } @Override - public DeviceId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public DeviceId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public DeviceId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public DeviceId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/DeviceProfileId.java b/ce/src/main/java/org/thingsboard/client/model/DeviceProfileId.java index 750f9962..e5024d1b 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DeviceProfileId.java +++ b/ce/src/main/java/org/thingsboard/client/model/DeviceProfileId.java @@ -55,14 +55,14 @@ public DeviceProfileId() { } @Override - public DeviceProfileId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public DeviceProfileId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public DeviceProfileId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public DeviceProfileId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/DomainId.java b/ce/src/main/java/org/thingsboard/client/model/DomainId.java index e89b114e..f1f896c7 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DomainId.java +++ b/ce/src/main/java/org/thingsboard/client/model/DomainId.java @@ -55,14 +55,14 @@ public DomainId() { } @Override - public DomainId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public DomainId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public DomainId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public DomainId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/EdgeEventId.java b/ce/src/main/java/org/thingsboard/client/model/EdgeEventId.java index e9af29a4..773ee7e3 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EdgeEventId.java +++ b/ce/src/main/java/org/thingsboard/client/model/EdgeEventId.java @@ -41,32 +41,32 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class EdgeEventId { public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nullable + @javax.annotation.Nonnull private UUID id; public EdgeEventId() { } - public EdgeEventId id(@javax.annotation.Nullable UUID id) { + public EdgeEventId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; } /** - * Get id + * string * @return id */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public UUID getId() { return id; } - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(@javax.annotation.Nullable UUID id) { + @JsonProperty(value = JSON_PROPERTY_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { this.id = id; } diff --git a/ce/src/main/java/org/thingsboard/client/model/EdgeId.java b/ce/src/main/java/org/thingsboard/client/model/EdgeId.java index e508e60c..40ec2ba1 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EdgeId.java +++ b/ce/src/main/java/org/thingsboard/client/model/EdgeId.java @@ -55,14 +55,14 @@ public EdgeId() { } @Override - public EdgeId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public EdgeId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public EdgeId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public EdgeId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/EntityId.java b/ce/src/main/java/org/thingsboard/client/model/EntityId.java index aa4ad53a..8c8105f3 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EntityId.java +++ b/ce/src/main/java/org/thingsboard/client/model/EntityId.java @@ -41,8 +41,8 @@ * EntityId */ @JsonPropertyOrder({ - EntityId.JSON_PROPERTY_ID, - EntityId.JSON_PROPERTY_ENTITY_TYPE + EntityId.JSON_PROPERTY_ENTITY_TYPE, + EntityId.JSON_PROPERTY_ID }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -90,62 +90,62 @@ }) public class EntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; @javax.annotation.Nonnull private EntityType entityType; + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + public EntityId() { } - public EntityId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + public EntityId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.entityType = entityType; return this; } /** - * ID of the entity, time-based UUID v1 - * @return id + * Get entityType + * @return entityType */ @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) + @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; + public EntityType getEntityType() { + return entityType; } - @JsonProperty(value = JSON_PROPERTY_ID, required = true) + @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; + public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { + this.entityType = entityType; } - public EntityId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + public EntityId id(@javax.annotation.Nonnull UUID id) { + this.id = id; return this; } /** - * Get entityType - * @return entityType + * ID of the entity, time-based UUID v1 + * @return id */ @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) + @JsonProperty(value = JSON_PROPERTY_ID, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; + public UUID getId() { + return id; } - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) + @JsonProperty(value = JSON_PROPERTY_ID, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; } @@ -161,21 +161,21 @@ public boolean equals(Object o) { return false; } EntityId entityId = (EntityId) o; - return Objects.equals(this.id, entityId.id) && - Objects.equals(this.entityType, entityId.entityType); + return Objects.equals(this.entityType, entityId.entityType) && + Objects.equals(this.id, entityId.id); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(entityType, id); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EntityId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append("}"); return sb.toString(); } @@ -223,16 +223,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/EntityViewId.java b/ce/src/main/java/org/thingsboard/client/model/EntityViewId.java index 8f144abd..8ccc40b3 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EntityViewId.java +++ b/ce/src/main/java/org/thingsboard/client/model/EntityViewId.java @@ -55,14 +55,14 @@ public EntityViewId() { } @Override - public EntityViewId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public EntityViewId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public EntityViewId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public EntityViewId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/EventId.java b/ce/src/main/java/org/thingsboard/client/model/EventId.java index 813e8a55..8e8b32d2 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EventId.java +++ b/ce/src/main/java/org/thingsboard/client/model/EventId.java @@ -41,32 +41,32 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class EventId { public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nullable + @javax.annotation.Nonnull private UUID id; public EventId() { } - public EventId id(@javax.annotation.Nullable UUID id) { + public EventId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; } /** - * Get id + * string * @return id */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public UUID getId() { return id; } - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(@javax.annotation.Nullable UUID id) { + @JsonProperty(value = JSON_PROPERTY_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { this.id = id; } diff --git a/ce/src/main/java/org/thingsboard/client/model/FeaturesInfo.java b/ce/src/main/java/org/thingsboard/client/model/FeaturesInfo.java index da660036..8670c04b 100644 --- a/ce/src/main/java/org/thingsboard/client/model/FeaturesInfo.java +++ b/ce/src/main/java/org/thingsboard/client/model/FeaturesInfo.java @@ -35,82 +35,82 @@ * FeaturesInfo */ @JsonPropertyOrder({ + FeaturesInfo.JSON_PROPERTY_EMAIL_ENABLED, FeaturesInfo.JSON_PROPERTY_SMS_ENABLED, - FeaturesInfo.JSON_PROPERTY_OAUTH_ENABLED, FeaturesInfo.JSON_PROPERTY_NOTIFICATION_ENABLED, - FeaturesInfo.JSON_PROPERTY_TWO_FA_ENABLED, - FeaturesInfo.JSON_PROPERTY_EMAIL_ENABLED + FeaturesInfo.JSON_PROPERTY_OAUTH_ENABLED, + FeaturesInfo.JSON_PROPERTY_TWO_FA_ENABLED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class FeaturesInfo { - public static final String JSON_PROPERTY_SMS_ENABLED = "smsEnabled"; + public static final String JSON_PROPERTY_EMAIL_ENABLED = "emailEnabled"; @javax.annotation.Nullable - private Boolean smsEnabled; + private Boolean emailEnabled; - public static final String JSON_PROPERTY_OAUTH_ENABLED = "oauthEnabled"; + public static final String JSON_PROPERTY_SMS_ENABLED = "smsEnabled"; @javax.annotation.Nullable - private Boolean oauthEnabled; + private Boolean smsEnabled; public static final String JSON_PROPERTY_NOTIFICATION_ENABLED = "notificationEnabled"; @javax.annotation.Nullable private Boolean notificationEnabled; - public static final String JSON_PROPERTY_TWO_FA_ENABLED = "twoFaEnabled"; + public static final String JSON_PROPERTY_OAUTH_ENABLED = "oauthEnabled"; @javax.annotation.Nullable - private Boolean twoFaEnabled; + private Boolean oauthEnabled; - public static final String JSON_PROPERTY_EMAIL_ENABLED = "emailEnabled"; + public static final String JSON_PROPERTY_TWO_FA_ENABLED = "twoFaEnabled"; @javax.annotation.Nullable - private Boolean emailEnabled; + private Boolean twoFaEnabled; public FeaturesInfo() { } - public FeaturesInfo smsEnabled(@javax.annotation.Nullable Boolean smsEnabled) { - this.smsEnabled = smsEnabled; + public FeaturesInfo emailEnabled(@javax.annotation.Nullable Boolean emailEnabled) { + this.emailEnabled = emailEnabled; return this; } /** - * Get smsEnabled - * @return smsEnabled + * Get emailEnabled + * @return emailEnabled */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SMS_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_EMAIL_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSmsEnabled() { - return smsEnabled; + public Boolean getEmailEnabled() { + return emailEnabled; } - @JsonProperty(value = JSON_PROPERTY_SMS_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_EMAIL_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsEnabled(@javax.annotation.Nullable Boolean smsEnabled) { - this.smsEnabled = smsEnabled; + public void setEmailEnabled(@javax.annotation.Nullable Boolean emailEnabled) { + this.emailEnabled = emailEnabled; } - public FeaturesInfo oauthEnabled(@javax.annotation.Nullable Boolean oauthEnabled) { - this.oauthEnabled = oauthEnabled; + public FeaturesInfo smsEnabled(@javax.annotation.Nullable Boolean smsEnabled) { + this.smsEnabled = smsEnabled; return this; } /** - * Get oauthEnabled - * @return oauthEnabled + * Get smsEnabled + * @return smsEnabled */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_OAUTH_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_SMS_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getOauthEnabled() { - return oauthEnabled; + public Boolean getSmsEnabled() { + return smsEnabled; } - @JsonProperty(value = JSON_PROPERTY_OAUTH_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_SMS_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauthEnabled(@javax.annotation.Nullable Boolean oauthEnabled) { - this.oauthEnabled = oauthEnabled; + public void setSmsEnabled(@javax.annotation.Nullable Boolean smsEnabled) { + this.smsEnabled = smsEnabled; } @@ -138,51 +138,51 @@ public void setNotificationEnabled(@javax.annotation.Nullable Boolean notificati } - public FeaturesInfo twoFaEnabled(@javax.annotation.Nullable Boolean twoFaEnabled) { - this.twoFaEnabled = twoFaEnabled; + public FeaturesInfo oauthEnabled(@javax.annotation.Nullable Boolean oauthEnabled) { + this.oauthEnabled = oauthEnabled; return this; } /** - * Get twoFaEnabled - * @return twoFaEnabled + * Get oauthEnabled + * @return oauthEnabled */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TWO_FA_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_OAUTH_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTwoFaEnabled() { - return twoFaEnabled; + public Boolean getOauthEnabled() { + return oauthEnabled; } - @JsonProperty(value = JSON_PROPERTY_TWO_FA_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_OAUTH_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTwoFaEnabled(@javax.annotation.Nullable Boolean twoFaEnabled) { - this.twoFaEnabled = twoFaEnabled; + public void setOauthEnabled(@javax.annotation.Nullable Boolean oauthEnabled) { + this.oauthEnabled = oauthEnabled; } - public FeaturesInfo emailEnabled(@javax.annotation.Nullable Boolean emailEnabled) { - this.emailEnabled = emailEnabled; + public FeaturesInfo twoFaEnabled(@javax.annotation.Nullable Boolean twoFaEnabled) { + this.twoFaEnabled = twoFaEnabled; return this; } /** - * Get emailEnabled - * @return emailEnabled + * Get twoFaEnabled + * @return twoFaEnabled */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_EMAIL_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_TWO_FA_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEmailEnabled() { - return emailEnabled; + public Boolean getTwoFaEnabled() { + return twoFaEnabled; } - @JsonProperty(value = JSON_PROPERTY_EMAIL_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_TWO_FA_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailEnabled(@javax.annotation.Nullable Boolean emailEnabled) { - this.emailEnabled = emailEnabled; + public void setTwoFaEnabled(@javax.annotation.Nullable Boolean twoFaEnabled) { + this.twoFaEnabled = twoFaEnabled; } @@ -198,27 +198,27 @@ public boolean equals(Object o) { return false; } FeaturesInfo featuresInfo = (FeaturesInfo) o; - return Objects.equals(this.smsEnabled, featuresInfo.smsEnabled) && - Objects.equals(this.oauthEnabled, featuresInfo.oauthEnabled) && + return Objects.equals(this.emailEnabled, featuresInfo.emailEnabled) && + Objects.equals(this.smsEnabled, featuresInfo.smsEnabled) && Objects.equals(this.notificationEnabled, featuresInfo.notificationEnabled) && - Objects.equals(this.twoFaEnabled, featuresInfo.twoFaEnabled) && - Objects.equals(this.emailEnabled, featuresInfo.emailEnabled); + Objects.equals(this.oauthEnabled, featuresInfo.oauthEnabled) && + Objects.equals(this.twoFaEnabled, featuresInfo.twoFaEnabled); } @Override public int hashCode() { - return Objects.hash(smsEnabled, oauthEnabled, notificationEnabled, twoFaEnabled, emailEnabled); + return Objects.hash(emailEnabled, smsEnabled, notificationEnabled, oauthEnabled, twoFaEnabled); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FeaturesInfo {\n"); + sb.append(" emailEnabled: ").append(toIndentedString(emailEnabled)).append("\n"); sb.append(" smsEnabled: ").append(toIndentedString(smsEnabled)).append("\n"); - sb.append(" oauthEnabled: ").append(toIndentedString(oauthEnabled)).append("\n"); sb.append(" notificationEnabled: ").append(toIndentedString(notificationEnabled)).append("\n"); + sb.append(" oauthEnabled: ").append(toIndentedString(oauthEnabled)).append("\n"); sb.append(" twoFaEnabled: ").append(toIndentedString(twoFaEnabled)).append("\n"); - sb.append(" emailEnabled: ").append(toIndentedString(emailEnabled)).append("\n"); sb.append("}"); return sb.toString(); } @@ -266,31 +266,31 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); + // add `emailEnabled` to the URL query string + if (getEmailEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%semailEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmailEnabled())))); + } + // add `smsEnabled` to the URL query string if (getSmsEnabled() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%ssmsEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSmsEnabled())))); } - // add `oauthEnabled` to the URL query string - if (getOauthEnabled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%soauthEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOauthEnabled())))); - } - // add `notificationEnabled` to the URL query string if (getNotificationEnabled() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%snotificationEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotificationEnabled())))); } + // add `oauthEnabled` to the URL query string + if (getOauthEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%soauthEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOauthEnabled())))); + } + // add `twoFaEnabled` to the URL query string if (getTwoFaEnabled() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stwoFaEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTwoFaEnabled())))); } - // add `emailEnabled` to the URL query string - if (getEmailEnabled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%semailEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmailEnabled())))); - } - return joiner.toString(); } } diff --git a/ce/src/main/java/org/thingsboard/client/model/JobId.java b/ce/src/main/java/org/thingsboard/client/model/JobId.java index 93be4634..3acdff31 100644 --- a/ce/src/main/java/org/thingsboard/client/model/JobId.java +++ b/ce/src/main/java/org/thingsboard/client/model/JobId.java @@ -55,14 +55,14 @@ public JobId() { } @Override - public JobId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public JobId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public JobId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public JobId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/MicrosoftTeamsNotificationTargetConfig.java b/ce/src/main/java/org/thingsboard/client/model/MicrosoftTeamsNotificationTargetConfig.java index bcb0bd69..8b371354 100644 --- a/ce/src/main/java/org/thingsboard/client/model/MicrosoftTeamsNotificationTargetConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/MicrosoftTeamsNotificationTargetConfig.java @@ -47,11 +47,11 @@ MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_WEBHOOK_URL, MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_CHANNEL_NAME, MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_USE_OLD_API, - MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_ID, - MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_TITLE, MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_EMAIL, MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_FIRST_NAME, - MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_LAST_NAME + MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_ID, + MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_LAST_NAME, + MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_TITLE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -73,13 +73,6 @@ public class MicrosoftTeamsNotificationTargetConfig extends NotificationTargetCo @javax.annotation.Nullable private Boolean useOldApi; - public static final String JSON_PROPERTY_ID = "id"; - private JsonNullable id = JsonNullable.of(null); - - public static final String JSON_PROPERTY_TITLE = "title"; - @javax.annotation.Nullable - private String title; - public static final String JSON_PROPERTY_EMAIL = "email"; @javax.annotation.Nullable private String email; @@ -88,10 +81,17 @@ public class MicrosoftTeamsNotificationTargetConfig extends NotificationTargetCo @javax.annotation.Nullable private String firstName; + public static final String JSON_PROPERTY_ID = "id"; + private JsonNullable id = JsonNullable.of(null); + public static final String JSON_PROPERTY_LAST_NAME = "lastName"; @javax.annotation.Nullable private String lastName; + public static final String JSON_PROPERTY_TITLE = "title"; + @javax.annotation.Nullable + private String title; + public MicrosoftTeamsNotificationTargetConfig() { } @@ -167,62 +167,6 @@ public void setUseOldApi(@javax.annotation.Nullable Boolean useOldApi) { } - public MicrosoftTeamsNotificationTargetConfig id(@javax.annotation.Nullable Object id) { - this.id = JsonNullable.of(id); - return this; - } - - /** - * Get id - * @return id - */ - @javax.annotation.Nullable - @JsonIgnore - public Object getId() { - return id.orElse(null); - } - - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getId_JsonNullable() { - return id; - } - - @JsonProperty(JSON_PROPERTY_ID) - public void setId_JsonNullable(JsonNullable id) { - this.id = id; - } - - public void setId(@javax.annotation.Nullable Object id) { - this.id = JsonNullable.of(id); - } - - - public MicrosoftTeamsNotificationTargetConfig title(@javax.annotation.Nullable String title) { - this.title = title; - return this; - } - - /** - * Get title - * @return title - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(@javax.annotation.Nullable String title) { - this.title = title; - } - - public MicrosoftTeamsNotificationTargetConfig email(@javax.annotation.Nullable String email) { this.email = email; return this; @@ -271,6 +215,38 @@ public void setFirstName(@javax.annotation.Nullable String firstName) { } + public MicrosoftTeamsNotificationTargetConfig id(@javax.annotation.Nullable Object id) { + this.id = JsonNullable.of(id); + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonIgnore + public Object getId() { + return id.orElse(null); + } + + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getId_JsonNullable() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + public void setId_JsonNullable(JsonNullable id) { + this.id = id; + } + + public void setId(@javax.annotation.Nullable Object id) { + this.id = JsonNullable.of(id); + } + + public MicrosoftTeamsNotificationTargetConfig lastName(@javax.annotation.Nullable String lastName) { this.lastName = lastName; return this; @@ -295,6 +271,30 @@ public void setLastName(@javax.annotation.Nullable String lastName) { } + public MicrosoftTeamsNotificationTargetConfig title(@javax.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * Get title + * @return title + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } + + + @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTitle(@javax.annotation.Nullable String title) { + this.title = title; + } + + @Override public MicrosoftTeamsNotificationTargetConfig description(@javax.annotation.Nullable String description) { this.setDescription(description); @@ -322,11 +322,11 @@ public boolean equals(Object o) { return Objects.equals(this.webhookUrl, microsoftTeamsNotificationTargetConfig.webhookUrl) && Objects.equals(this.channelName, microsoftTeamsNotificationTargetConfig.channelName) && Objects.equals(this.useOldApi, microsoftTeamsNotificationTargetConfig.useOldApi) && - equalsNullable(this.id, microsoftTeamsNotificationTargetConfig.id) && - Objects.equals(this.title, microsoftTeamsNotificationTargetConfig.title) && Objects.equals(this.email, microsoftTeamsNotificationTargetConfig.email) && Objects.equals(this.firstName, microsoftTeamsNotificationTargetConfig.firstName) && + equalsNullable(this.id, microsoftTeamsNotificationTargetConfig.id) && Objects.equals(this.lastName, microsoftTeamsNotificationTargetConfig.lastName) && + Objects.equals(this.title, microsoftTeamsNotificationTargetConfig.title) && super.equals(o); } @@ -336,7 +336,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(webhookUrl, channelName, useOldApi, hashCodeNullable(id), title, email, firstName, lastName, super.hashCode()); + return Objects.hash(webhookUrl, channelName, useOldApi, email, firstName, hashCodeNullable(id), lastName, title, super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -354,11 +354,11 @@ public String toString() { sb.append(" webhookUrl: ").append(toIndentedString(webhookUrl)).append("\n"); sb.append(" channelName: ").append(toIndentedString(channelName)).append("\n"); sb.append(" useOldApi: ").append(toIndentedString(useOldApi)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append("}"); return sb.toString(); } @@ -431,16 +431,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%suseOldApi%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUseOldApi())))); } - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - - // add `title` to the URL query string - if (getTitle() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); - } - // add `email` to the URL query string if (getEmail() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%semail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmail())))); @@ -451,11 +441,21 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sfirstName%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFirstName())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + // add `lastName` to the URL query string if (getLastName() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%slastName%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLastName())))); } + // add `title` to the URL query string + if (getTitle() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java b/ce/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java index 9b4735e5..4408e4aa 100644 --- a/ce/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java +++ b/ce/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java @@ -55,14 +55,14 @@ public MobileAppBundleId() { } @Override - public MobileAppBundleId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public MobileAppBundleId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public MobileAppBundleId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public MobileAppBundleId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/MobileAppId.java b/ce/src/main/java/org/thingsboard/client/model/MobileAppId.java index c4325164..7e7080d8 100644 --- a/ce/src/main/java/org/thingsboard/client/model/MobileAppId.java +++ b/ce/src/main/java/org/thingsboard/client/model/MobileAppId.java @@ -55,14 +55,14 @@ public MobileAppId() { } @Override - public MobileAppId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public MobileAppId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public MobileAppId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public MobileAppId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationId.java b/ce/src/main/java/org/thingsboard/client/model/NotificationId.java index 453f31fb..957b265c 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationId.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationId.java @@ -55,14 +55,14 @@ public NotificationId() { } @Override - public NotificationId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public NotificationId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public NotificationId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public NotificationId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationRequestId.java b/ce/src/main/java/org/thingsboard/client/model/NotificationRequestId.java index e2706589..674fee70 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationRequestId.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationRequestId.java @@ -55,14 +55,14 @@ public NotificationRequestId() { } @Override - public NotificationRequestId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public NotificationRequestId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public NotificationRequestId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public NotificationRequestId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationRuleId.java b/ce/src/main/java/org/thingsboard/client/model/NotificationRuleId.java index c9f1bb8e..20ecb2cb 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationRuleId.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationRuleId.java @@ -55,14 +55,14 @@ public NotificationRuleId() { } @Override - public NotificationRuleId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public NotificationRuleId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public NotificationRuleId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public NotificationRuleId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationTargetId.java b/ce/src/main/java/org/thingsboard/client/model/NotificationTargetId.java index 3a6d606a..16450120 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationTargetId.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationTargetId.java @@ -55,14 +55,14 @@ public NotificationTargetId() { } @Override - public NotificationTargetId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public NotificationTargetId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public NotificationTargetId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public NotificationTargetId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java b/ce/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java index 7e564198..13686d26 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java @@ -55,14 +55,14 @@ public NotificationTemplateId() { } @Override - public NotificationTemplateId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public NotificationTemplateId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public NotificationTemplateId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public NotificationTemplateId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java b/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java index cea44821..f54d94ac 100644 --- a/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java +++ b/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java @@ -55,14 +55,14 @@ public OAuth2ClientId() { } @Override - public OAuth2ClientId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public OAuth2ClientId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public OAuth2ClientId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public OAuth2ClientId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientRegistrationTemplateId.java b/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientRegistrationTemplateId.java index d5a7576f..d4cc32b8 100644 --- a/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientRegistrationTemplateId.java +++ b/ce/src/main/java/org/thingsboard/client/model/OAuth2ClientRegistrationTemplateId.java @@ -41,32 +41,32 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class OAuth2ClientRegistrationTemplateId { public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nullable + @javax.annotation.Nonnull private UUID id; public OAuth2ClientRegistrationTemplateId() { } - public OAuth2ClientRegistrationTemplateId id(@javax.annotation.Nullable UUID id) { + public OAuth2ClientRegistrationTemplateId id(@javax.annotation.Nonnull UUID id) { this.id = id; return this; } /** - * Get id + * string * @return id */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public UUID getId() { return id; } - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(@javax.annotation.Nullable UUID id) { + @JsonProperty(value = JSON_PROPERTY_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { this.id = id; } diff --git a/ce/src/main/java/org/thingsboard/client/model/OtaPackageData.java b/ce/src/main/java/org/thingsboard/client/model/OtaPackageData.java index 8cfce7f9..8cb07905 100644 --- a/ce/src/main/java/org/thingsboard/client/model/OtaPackageData.java +++ b/ce/src/main/java/org/thingsboard/client/model/OtaPackageData.java @@ -35,76 +35,52 @@ * OtaPackageData */ @JsonPropertyOrder({ - OtaPackageData.JSON_PROPERTY_SHORT, OtaPackageData.JSON_PROPERTY_CHAR, + OtaPackageData.JSON_PROPERTY_DIRECT, + OtaPackageData.JSON_PROPERTY_DOUBLE, + OtaPackageData.JSON_PROPERTY_FLOAT, OtaPackageData.JSON_PROPERTY_INT, OtaPackageData.JSON_PROPERTY_LONG, - OtaPackageData.JSON_PROPERTY_FLOAT, - OtaPackageData.JSON_PROPERTY_DOUBLE, - OtaPackageData.JSON_PROPERTY_DIRECT, - OtaPackageData.JSON_PROPERTY_READ_ONLY + OtaPackageData.JSON_PROPERTY_READ_ONLY, + OtaPackageData.JSON_PROPERTY_SHORT }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class OtaPackageData { - public static final String JSON_PROPERTY_SHORT = "short"; - @javax.annotation.Nullable - private Integer _short; - public static final String JSON_PROPERTY_CHAR = "char"; @javax.annotation.Nullable private String _char; - public static final String JSON_PROPERTY_INT = "int"; + public static final String JSON_PROPERTY_DIRECT = "direct"; @javax.annotation.Nullable - private Integer _int; + private Boolean direct; - public static final String JSON_PROPERTY_LONG = "long"; + public static final String JSON_PROPERTY_DOUBLE = "double"; @javax.annotation.Nullable - private Long _long; + private Double _double; public static final String JSON_PROPERTY_FLOAT = "float"; @javax.annotation.Nullable private Float _float; - public static final String JSON_PROPERTY_DOUBLE = "double"; + public static final String JSON_PROPERTY_INT = "int"; @javax.annotation.Nullable - private Double _double; + private Integer _int; - public static final String JSON_PROPERTY_DIRECT = "direct"; + public static final String JSON_PROPERTY_LONG = "long"; @javax.annotation.Nullable - private Boolean direct; + private Long _long; public static final String JSON_PROPERTY_READ_ONLY = "readOnly"; @javax.annotation.Nullable private Boolean readOnly; - public OtaPackageData() { - } - - public OtaPackageData _short(@javax.annotation.Nullable Integer _short) { - this._short = _short; - return this; - } - - /** - * Get _short - * @return _short - */ + public static final String JSON_PROPERTY_SHORT = "short"; @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SHORT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getShort() { - return _short; - } - + private Integer _short; - @JsonProperty(value = JSON_PROPERTY_SHORT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShort(@javax.annotation.Nullable Integer _short) { - this._short = _short; + public OtaPackageData() { } - public OtaPackageData _char(@javax.annotation.Nullable String _char) { this._char = _char; return this; @@ -129,51 +105,51 @@ public void setChar(@javax.annotation.Nullable String _char) { } - public OtaPackageData _int(@javax.annotation.Nullable Integer _int) { - this._int = _int; + public OtaPackageData direct(@javax.annotation.Nullable Boolean direct) { + this.direct = direct; return this; } /** - * Get _int - * @return _int + * Get direct + * @return direct */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_INT, required = false) + @JsonProperty(value = JSON_PROPERTY_DIRECT, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getInt() { - return _int; + public Boolean getDirect() { + return direct; } - @JsonProperty(value = JSON_PROPERTY_INT, required = false) + @JsonProperty(value = JSON_PROPERTY_DIRECT, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInt(@javax.annotation.Nullable Integer _int) { - this._int = _int; + public void setDirect(@javax.annotation.Nullable Boolean direct) { + this.direct = direct; } - public OtaPackageData _long(@javax.annotation.Nullable Long _long) { - this._long = _long; + public OtaPackageData _double(@javax.annotation.Nullable Double _double) { + this._double = _double; return this; } /** - * Get _long - * @return _long + * Get _double + * @return _double */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LONG, required = false) + @JsonProperty(value = JSON_PROPERTY_DOUBLE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLong() { - return _long; + public Double getDouble() { + return _double; } - @JsonProperty(value = JSON_PROPERTY_LONG, required = false) + @JsonProperty(value = JSON_PROPERTY_DOUBLE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLong(@javax.annotation.Nullable Long _long) { - this._long = _long; + public void setDouble(@javax.annotation.Nullable Double _double) { + this._double = _double; } @@ -201,51 +177,51 @@ public void setFloat(@javax.annotation.Nullable Float _float) { } - public OtaPackageData _double(@javax.annotation.Nullable Double _double) { - this._double = _double; + public OtaPackageData _int(@javax.annotation.Nullable Integer _int) { + this._int = _int; return this; } /** - * Get _double - * @return _double + * Get _int + * @return _int */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DOUBLE, required = false) + @JsonProperty(value = JSON_PROPERTY_INT, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDouble() { - return _double; + public Integer getInt() { + return _int; } - @JsonProperty(value = JSON_PROPERTY_DOUBLE, required = false) + @JsonProperty(value = JSON_PROPERTY_INT, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDouble(@javax.annotation.Nullable Double _double) { - this._double = _double; + public void setInt(@javax.annotation.Nullable Integer _int) { + this._int = _int; } - public OtaPackageData direct(@javax.annotation.Nullable Boolean direct) { - this.direct = direct; + public OtaPackageData _long(@javax.annotation.Nullable Long _long) { + this._long = _long; return this; } /** - * Get direct - * @return direct + * Get _long + * @return _long */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DIRECT, required = false) + @JsonProperty(value = JSON_PROPERTY_LONG, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDirect() { - return direct; + public Long getLong() { + return _long; } - @JsonProperty(value = JSON_PROPERTY_DIRECT, required = false) + @JsonProperty(value = JSON_PROPERTY_LONG, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDirect(@javax.annotation.Nullable Boolean direct) { - this.direct = direct; + public void setLong(@javax.annotation.Nullable Long _long) { + this._long = _long; } @@ -273,6 +249,30 @@ public void setReadOnly(@javax.annotation.Nullable Boolean readOnly) { } + public OtaPackageData _short(@javax.annotation.Nullable Integer _short) { + this._short = _short; + return this; + } + + /** + * Get _short + * @return _short + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_SHORT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getShort() { + return _short; + } + + + @JsonProperty(value = JSON_PROPERTY_SHORT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShort(@javax.annotation.Nullable Integer _short) { + this._short = _short; + } + + /** * Return true if this OtaPackage_data object is equal to o. */ @@ -285,33 +285,33 @@ public boolean equals(Object o) { return false; } OtaPackageData otaPackageData = (OtaPackageData) o; - return Objects.equals(this._short, otaPackageData._short) && - Objects.equals(this._char, otaPackageData._char) && + return Objects.equals(this._char, otaPackageData._char) && + Objects.equals(this.direct, otaPackageData.direct) && + Objects.equals(this._double, otaPackageData._double) && + Objects.equals(this._float, otaPackageData._float) && Objects.equals(this._int, otaPackageData._int) && Objects.equals(this._long, otaPackageData._long) && - Objects.equals(this._float, otaPackageData._float) && - Objects.equals(this._double, otaPackageData._double) && - Objects.equals(this.direct, otaPackageData.direct) && - Objects.equals(this.readOnly, otaPackageData.readOnly); + Objects.equals(this.readOnly, otaPackageData.readOnly) && + Objects.equals(this._short, otaPackageData._short); } @Override public int hashCode() { - return Objects.hash(_short, _char, _int, _long, _float, _double, direct, readOnly); + return Objects.hash(_char, direct, _double, _float, _int, _long, readOnly, _short); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OtaPackageData {\n"); - sb.append(" _short: ").append(toIndentedString(_short)).append("\n"); sb.append(" _char: ").append(toIndentedString(_char)).append("\n"); + sb.append(" direct: ").append(toIndentedString(direct)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); sb.append(" _int: ").append(toIndentedString(_int)).append("\n"); sb.append(" _long: ").append(toIndentedString(_long)).append("\n"); - sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); - sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); - sb.append(" direct: ").append(toIndentedString(direct)).append("\n"); sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" _short: ").append(toIndentedString(_short)).append("\n"); sb.append("}"); return sb.toString(); } @@ -359,24 +359,19 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `short` to the URL query string - if (getShort() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sshort%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShort())))); - } - // add `char` to the URL query string if (getChar() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%schar%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getChar())))); } - // add `int` to the URL query string - if (getInt() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sint%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInt())))); + // add `direct` to the URL query string + if (getDirect() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sdirect%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDirect())))); } - // add `long` to the URL query string - if (getLong() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%slong%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLong())))); + // add `double` to the URL query string + if (getDouble() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sdouble%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDouble())))); } // add `float` to the URL query string @@ -384,14 +379,14 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sfloat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFloat())))); } - // add `double` to the URL query string - if (getDouble() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdouble%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDouble())))); + // add `int` to the URL query string + if (getInt() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sint%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInt())))); } - // add `direct` to the URL query string - if (getDirect() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdirect%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDirect())))); + // add `long` to the URL query string + if (getLong() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%slong%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLong())))); } // add `readOnly` to the URL query string @@ -399,6 +394,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sreadOnly%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReadOnly())))); } + // add `short` to the URL query string + if (getShort() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sshort%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShort())))); + } + return joiner.toString(); } } diff --git a/ce/src/main/java/org/thingsboard/client/model/OtaPackageId.java b/ce/src/main/java/org/thingsboard/client/model/OtaPackageId.java index 73f2ce14..e40c90be 100644 --- a/ce/src/main/java/org/thingsboard/client/model/OtaPackageId.java +++ b/ce/src/main/java/org/thingsboard/client/model/OtaPackageId.java @@ -55,14 +55,14 @@ public OtaPackageId() { } @Override - public OtaPackageId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public OtaPackageId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public OtaPackageId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public OtaPackageId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/QrCodeSettingsId.java b/ce/src/main/java/org/thingsboard/client/model/QrCodeSettingsId.java index 8e88fbb6..6671f4aa 100644 --- a/ce/src/main/java/org/thingsboard/client/model/QrCodeSettingsId.java +++ b/ce/src/main/java/org/thingsboard/client/model/QrCodeSettingsId.java @@ -53,7 +53,7 @@ public QrCodeSettingsId id(@javax.annotation.Nonnull UUID id) { } /** - * ID of the entity, time-based UUID v1 + * string * @return id */ @javax.annotation.Nonnull diff --git a/ce/src/main/java/org/thingsboard/client/model/QueueId.java b/ce/src/main/java/org/thingsboard/client/model/QueueId.java index c1c979b3..db6f5206 100644 --- a/ce/src/main/java/org/thingsboard/client/model/QueueId.java +++ b/ce/src/main/java/org/thingsboard/client/model/QueueId.java @@ -55,14 +55,14 @@ public QueueId() { } @Override - public QueueId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public QueueId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public QueueId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public QueueId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/QueueStatsId.java b/ce/src/main/java/org/thingsboard/client/model/QueueStatsId.java index 1aceba74..9d2ec67d 100644 --- a/ce/src/main/java/org/thingsboard/client/model/QueueStatsId.java +++ b/ce/src/main/java/org/thingsboard/client/model/QueueStatsId.java @@ -55,14 +55,14 @@ public QueueStatsId() { } @Override - public QueueStatsId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public QueueStatsId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public QueueStatsId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public QueueStatsId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/RpcId.java b/ce/src/main/java/org/thingsboard/client/model/RpcId.java index fd1aeb41..f5787cd7 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RpcId.java +++ b/ce/src/main/java/org/thingsboard/client/model/RpcId.java @@ -55,14 +55,14 @@ public RpcId() { } @Override - public RpcId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public RpcId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public RpcId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public RpcId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java b/ce/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java index 833de14b..fb6e8069 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java +++ b/ce/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java @@ -44,8 +44,8 @@ RuleChainDebugEventFilter.JSON_PROPERTY_SERVER, RuleChainDebugEventFilter.JSON_PROPERTY_ERROR_STR, RuleChainDebugEventFilter.JSON_PROPERTY_MESSAGE, - RuleChainDebugEventFilter.JSON_PROPERTY_IS_ERROR, - RuleChainDebugEventFilter.JSON_PROPERTY_ERROR + RuleChainDebugEventFilter.JSON_PROPERTY_ERROR, + RuleChainDebugEventFilter.JSON_PROPERTY_IS_ERROR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -67,14 +67,14 @@ public class RuleChainDebugEventFilter extends EventFilter { @javax.annotation.Nullable private String message; - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public static final String JSON_PROPERTY_ERROR = "error"; @javax.annotation.Nullable private Boolean error; + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private Boolean isError; + public RuleChainDebugEventFilter() { } @@ -150,51 +150,51 @@ public void setMessage(@javax.annotation.Nullable String message) { } - public RuleChainDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public RuleChainDebugEventFilter error(@javax.annotation.Nullable Boolean error) { + this.error = error; return this; } /** - * Get isError - * @return isError + * Get error + * @return error */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; + public Boolean getError() { + return error; } - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public void setError(@javax.annotation.Nullable Boolean error) { + this.error = error; } - public RuleChainDebugEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; + public RuleChainDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; return this; } /** - * Get error - * @return error + * Get isError + * @return isError */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; + public Boolean getIsError() { + return isError; } - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; + public void setIsError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; } @@ -225,14 +225,14 @@ public boolean equals(Object o) { return Objects.equals(this.server, ruleChainDebugEventFilter.server) && Objects.equals(this.errorStr, ruleChainDebugEventFilter.errorStr) && Objects.equals(this.message, ruleChainDebugEventFilter.message) && - Objects.equals(this.isError, ruleChainDebugEventFilter.isError) && Objects.equals(this.error, ruleChainDebugEventFilter.error) && + Objects.equals(this.isError, ruleChainDebugEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, message, isError, error, super.hashCode()); + return Objects.hash(server, errorStr, message, error, isError, super.hashCode()); } @Override @@ -243,8 +243,8 @@ public String toString() { sb.append(" server: ").append(toIndentedString(server)).append("\n"); sb.append(" errorStr: ").append(toIndentedString(errorStr)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -317,16 +317,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); } - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - // add `error` to the URL query string if (getError() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleChainId.java b/ce/src/main/java/org/thingsboard/client/model/RuleChainId.java index 7299e140..1969b175 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RuleChainId.java +++ b/ce/src/main/java/org/thingsboard/client/model/RuleChainId.java @@ -55,14 +55,14 @@ public RuleChainId() { } @Override - public RuleChainId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public RuleChainId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public RuleChainId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public RuleChainId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java b/ce/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java index 2bb03d17..3ce2fe1f 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java +++ b/ce/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java @@ -51,8 +51,8 @@ RuleNodeDebugEventFilter.JSON_PROPERTY_RELATION_TYPE, RuleNodeDebugEventFilter.JSON_PROPERTY_DATA_SEARCH, RuleNodeDebugEventFilter.JSON_PROPERTY_METADATA_SEARCH, - RuleNodeDebugEventFilter.JSON_PROPERTY_IS_ERROR, - RuleNodeDebugEventFilter.JSON_PROPERTY_ERROR + RuleNodeDebugEventFilter.JSON_PROPERTY_ERROR, + RuleNodeDebugEventFilter.JSON_PROPERTY_IS_ERROR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -170,14 +170,14 @@ public static EntityTypeEnum fromValue(String value) { @javax.annotation.Nullable private String metadataSearch; - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public static final String JSON_PROPERTY_ERROR = "error"; @javax.annotation.Nullable private Boolean error; + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private Boolean isError; + public RuleNodeDebugEventFilter() { } @@ -421,51 +421,51 @@ public void setMetadataSearch(@javax.annotation.Nullable String metadataSearch) } - public RuleNodeDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public RuleNodeDebugEventFilter error(@javax.annotation.Nullable Boolean error) { + this.error = error; return this; } /** - * Get isError - * @return isError + * Get error + * @return error */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; + public Boolean getError() { + return error; } - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public void setError(@javax.annotation.Nullable Boolean error) { + this.error = error; } - public RuleNodeDebugEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; + public RuleNodeDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; return this; } /** - * Get error - * @return error + * Get isError + * @return isError */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; + public Boolean getIsError() { + return isError; } - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; + public void setIsError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; } @@ -503,14 +503,14 @@ public boolean equals(Object o) { Objects.equals(this.relationType, ruleNodeDebugEventFilter.relationType) && Objects.equals(this.dataSearch, ruleNodeDebugEventFilter.dataSearch) && Objects.equals(this.metadataSearch, ruleNodeDebugEventFilter.metadataSearch) && - Objects.equals(this.isError, ruleNodeDebugEventFilter.isError) && Objects.equals(this.error, ruleNodeDebugEventFilter.error) && + Objects.equals(this.isError, ruleNodeDebugEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, msgDirectionType, entityId, entityType, msgId, msgType, relationType, dataSearch, metadataSearch, isError, error, super.hashCode()); + return Objects.hash(server, errorStr, msgDirectionType, entityId, entityType, msgId, msgType, relationType, dataSearch, metadataSearch, error, isError, super.hashCode()); } @Override @@ -528,8 +528,8 @@ public String toString() { sb.append(" relationType: ").append(toIndentedString(relationType)).append("\n"); sb.append(" dataSearch: ").append(toIndentedString(dataSearch)).append("\n"); sb.append(" metadataSearch: ").append(toIndentedString(metadataSearch)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -637,16 +637,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smetadataSearch%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMetadataSearch())))); } - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - // add `error` to the URL query string if (getError() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleNodeId.java b/ce/src/main/java/org/thingsboard/client/model/RuleNodeId.java index 4f370578..0bc30bed 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RuleNodeId.java +++ b/ce/src/main/java/org/thingsboard/client/model/RuleNodeId.java @@ -55,14 +55,14 @@ public RuleNodeId() { } @Override - public RuleNodeId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public RuleNodeId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public RuleNodeId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public RuleNodeId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/TbResource.java b/ce/src/main/java/org/thingsboard/client/model/TbResource.java index 55c80c42..c7038ad5 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TbResource.java +++ b/ce/src/main/java/org/thingsboard/client/model/TbResource.java @@ -54,8 +54,8 @@ TbResource.JSON_PROPERTY_PREVIEW, TbResource.JSON_PROPERTY_NAME, TbResource.JSON_PROPERTY_PUBLIC, - TbResource.JSON_PROPERTY_PUBLIC_LINK, - TbResource.JSON_PROPERTY_LINK + TbResource.JSON_PROPERTY_LINK, + TbResource.JSON_PROPERTY_PUBLIC_LINK }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class TbResource { @@ -119,14 +119,14 @@ public class TbResource { @javax.annotation.Nullable private Boolean _public; - public static final String JSON_PROPERTY_PUBLIC_LINK = "publicLink"; - @javax.annotation.Nullable - private String publicLink; - public static final String JSON_PROPERTY_LINK = "link"; @javax.annotation.Nullable private String link; + public static final String JSON_PROPERTY_PUBLIC_LINK = "publicLink"; + @javax.annotation.Nullable + private String publicLink; + public TbResource() { } @@ -136,16 +136,16 @@ public TbResource( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_ETAG) String etag, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink, - @JsonProperty(JSON_PROPERTY_LINK) String link + @JsonProperty(JSON_PROPERTY_LINK) String link, + @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.etag = etag; this.name = name; - this.publicLink = publicLink; this.link = link; + this.publicLink = publicLink; } public TbResource id(@javax.annotation.Nullable TbResourceId id) { @@ -469,28 +469,28 @@ public void setPublic(@javax.annotation.Nullable Boolean _public) { /** - * Get publicLink - * @return publicLink + * Get link + * @return link */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicLink() { - return publicLink; + public String getLink() { + return link; } /** - * Get link - * @return link + * Get publicLink + * @return publicLink */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLink() { - return link; + public String getPublicLink() { + return publicLink; } @@ -523,13 +523,13 @@ public boolean equals(Object o) { Objects.equals(this.preview, tbResource.preview) && Objects.equals(this.name, tbResource.name) && Objects.equals(this._public, tbResource._public) && - Objects.equals(this.publicLink, tbResource.publicLink) && - Objects.equals(this.link, tbResource.link); + Objects.equals(this.link, tbResource.link) && + Objects.equals(this.publicLink, tbResource.publicLink); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, data, preview, name, _public, publicLink, link); + return Objects.hash(id, createdTime, tenantId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, data, preview, name, _public, link, publicLink); } @Override @@ -551,8 +551,8 @@ public String toString() { sb.append(" preview: ").append(toIndentedString(preview)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); - sb.append(" publicLink: ").append(toIndentedString(publicLink)).append("\n"); sb.append(" link: ").append(toIndentedString(link)).append("\n"); + sb.append(" publicLink: ").append(toIndentedString(publicLink)).append("\n"); sb.append("}"); return sb.toString(); } @@ -675,16 +675,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%spublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublic())))); } - // add `publicLink` to the URL query string - if (getPublicLink() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%spublicLink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublicLink())))); - } - // add `link` to the URL query string if (getLink() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%slink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLink())))); } + // add `publicLink` to the URL query string + if (getPublicLink() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%spublicLink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublicLink())))); + } + return joiner.toString(); } } diff --git a/ce/src/main/java/org/thingsboard/client/model/TbResourceId.java b/ce/src/main/java/org/thingsboard/client/model/TbResourceId.java index a7e675f0..45387033 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TbResourceId.java +++ b/ce/src/main/java/org/thingsboard/client/model/TbResourceId.java @@ -55,14 +55,14 @@ public TbResourceId() { } @Override - public TbResourceId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public TbResourceId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public TbResourceId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public TbResourceId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/TbResourceInfo.java b/ce/src/main/java/org/thingsboard/client/model/TbResourceInfo.java index cd300caa..2e666e3d 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TbResourceInfo.java +++ b/ce/src/main/java/org/thingsboard/client/model/TbResourceInfo.java @@ -52,8 +52,8 @@ TbResourceInfo.JSON_PROPERTY_DESCRIPTOR, TbResourceInfo.JSON_PROPERTY_NAME, TbResourceInfo.JSON_PROPERTY_PUBLIC, - TbResourceInfo.JSON_PROPERTY_PUBLIC_LINK, - TbResourceInfo.JSON_PROPERTY_LINK + TbResourceInfo.JSON_PROPERTY_LINK, + TbResourceInfo.JSON_PROPERTY_PUBLIC_LINK }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class TbResourceInfo { @@ -109,14 +109,14 @@ public class TbResourceInfo { @javax.annotation.Nullable private Boolean _public; - public static final String JSON_PROPERTY_PUBLIC_LINK = "publicLink"; - @javax.annotation.Nullable - private String publicLink; - public static final String JSON_PROPERTY_LINK = "link"; @javax.annotation.Nullable private String link; + public static final String JSON_PROPERTY_PUBLIC_LINK = "publicLink"; + @javax.annotation.Nullable + private String publicLink; + public TbResourceInfo() { } @@ -126,16 +126,16 @@ public TbResourceInfo( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_ETAG) String etag, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink, - @JsonProperty(JSON_PROPERTY_LINK) String link + @JsonProperty(JSON_PROPERTY_LINK) String link, + @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.etag = etag; this.name = name; - this.publicLink = publicLink; this.link = link; + this.publicLink = publicLink; } public TbResourceInfo id(@javax.annotation.Nullable TbResourceId id) { @@ -411,28 +411,28 @@ public void setPublic(@javax.annotation.Nullable Boolean _public) { /** - * Get publicLink - * @return publicLink + * Get link + * @return link */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicLink() { - return publicLink; + public String getLink() { + return link; } /** - * Get link - * @return link + * Get publicLink + * @return publicLink */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLink() { - return link; + public String getPublicLink() { + return publicLink; } @@ -463,13 +463,13 @@ public boolean equals(Object o) { Objects.equals(this.descriptor, tbResourceInfo.descriptor) && Objects.equals(this.name, tbResourceInfo.name) && Objects.equals(this._public, tbResourceInfo._public) && - Objects.equals(this.publicLink, tbResourceInfo.publicLink) && - Objects.equals(this.link, tbResourceInfo.link); + Objects.equals(this.link, tbResourceInfo.link) && + Objects.equals(this.publicLink, tbResourceInfo.publicLink); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, name, _public, publicLink, link); + return Objects.hash(id, createdTime, tenantId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, name, _public, link, publicLink); } @Override @@ -489,8 +489,8 @@ public String toString() { sb.append(" descriptor: ").append(toIndentedString(descriptor)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); - sb.append(" publicLink: ").append(toIndentedString(publicLink)).append("\n"); sb.append(" link: ").append(toIndentedString(link)).append("\n"); + sb.append(" publicLink: ").append(toIndentedString(publicLink)).append("\n"); sb.append("}"); return sb.toString(); } @@ -603,16 +603,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%spublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublic())))); } - // add `publicLink` to the URL query string - if (getPublicLink() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%spublicLink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublicLink())))); - } - // add `link` to the URL query string if (getLink() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%slink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLink())))); } + // add `publicLink` to the URL query string + if (getPublicLink() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%spublicLink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublicLink())))); + } + return joiner.toString(); } } diff --git a/ce/src/main/java/org/thingsboard/client/model/TenantId.java b/ce/src/main/java/org/thingsboard/client/model/TenantId.java index ef7de97d..1401c020 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TenantId.java +++ b/ce/src/main/java/org/thingsboard/client/model/TenantId.java @@ -55,14 +55,14 @@ public TenantId() { } @Override - public TenantId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public TenantId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public TenantId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public TenantId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/TenantProfileId.java b/ce/src/main/java/org/thingsboard/client/model/TenantProfileId.java index 55e6ec28..59d81a60 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TenantProfileId.java +++ b/ce/src/main/java/org/thingsboard/client/model/TenantProfileId.java @@ -55,14 +55,14 @@ public TenantProfileId() { } @Override - public TenantProfileId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public TenantProfileId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public TenantProfileId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public TenantProfileId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/UserId.java b/ce/src/main/java/org/thingsboard/client/model/UserId.java index fc9a13b4..331fb64c 100644 --- a/ce/src/main/java/org/thingsboard/client/model/UserId.java +++ b/ce/src/main/java/org/thingsboard/client/model/UserId.java @@ -55,14 +55,14 @@ public UserId() { } @Override - public UserId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public UserId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public UserId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public UserId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/WidgetTypeId.java b/ce/src/main/java/org/thingsboard/client/model/WidgetTypeId.java index 5d027764..9b6b46b7 100644 --- a/ce/src/main/java/org/thingsboard/client/model/WidgetTypeId.java +++ b/ce/src/main/java/org/thingsboard/client/model/WidgetTypeId.java @@ -55,14 +55,14 @@ public WidgetTypeId() { } @Override - public WidgetTypeId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public WidgetTypeId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public WidgetTypeId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public WidgetTypeId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java b/ce/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java index 88750984..e5a753a0 100644 --- a/ce/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java +++ b/ce/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java @@ -55,14 +55,14 @@ public WidgetsBundleId() { } @Override - public WidgetsBundleId id(@javax.annotation.Nonnull UUID id) { - this.setId(id); + public WidgetsBundleId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); return this; } @Override - public WidgetsBundleId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.setEntityType(entityType); + public WidgetsBundleId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); return this; } @@ -137,16 +137,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - // add `entityType` to the URL query string if (getEntityType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + return joiner.toString(); } static { diff --git a/paas/docs/AdminSettingsId.md b/paas/docs/AdminSettingsId.md index 873cea5a..973867ee 100644 --- a/paas/docs/AdminSettingsId.md +++ b/paas/docs/AdminSettingsId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.AdminSettingsId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/AiModelId.md b/paas/docs/AiModelId.md index 18147752..43b28eca 100644 --- a/paas/docs/AiModelId.md +++ b/paas/docs/AiModelId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.AiModelId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | Entity type of the AI model | | diff --git a/paas/docs/AlarmCalculatedFieldConfiguration.md b/paas/docs/AlarmCalculatedFieldConfiguration.md index 38ae7b20..9b2c7afb 100644 --- a/paas/docs/AlarmCalculatedFieldConfiguration.md +++ b/paas/docs/AlarmCalculatedFieldConfiguration.md @@ -10,13 +10,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **arguments** | **Map\** | | | -| **createRules** | **Map\** | | | | **clearRule** | **AlarmRuleDefinition** | | [optional] | +| **createRules** | **Map\** | | | | **propagate** | **Boolean** | | [optional] | +| **propagateRelationTypes** | **List\** | | [optional] | | **propagateToOwner** | **Boolean** | | [optional] | | **propagateToOwnerHierarchy** | **Boolean** | | [optional] | | **propagateToTenant** | **Boolean** | | [optional] | -| **propagateRelationTypes** | **List\** | | [optional] | diff --git a/paas/docs/AlarmId.md b/paas/docs/AlarmId.md index f8b26b96..b09db2e3 100644 --- a/paas/docs/AlarmId.md +++ b/paas/docs/AlarmId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.AlarmId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/ApiKeyId.md b/paas/docs/ApiKeyId.md index bd96b4b7..b7485104 100644 --- a/paas/docs/ApiKeyId.md +++ b/paas/docs/ApiKeyId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.ApiKeyId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/ApiUsageStateId.md b/paas/docs/ApiUsageStateId.md new file mode 100644 index 00000000..b3c83b2b --- /dev/null +++ b/paas/docs/ApiUsageStateId.md @@ -0,0 +1,23 @@ + +# ApiUsageStateId + +`org.thingsboard.client.model.ApiUsageStateId` + +**Extends:** **EntityId** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/Asset.md b/paas/docs/Asset.md index 4428f683..6cd508e0 100644 --- a/paas/docs/Asset.md +++ b/paas/docs/Asset.md @@ -16,7 +16,7 @@ | **label** | **String** | Label that may be used in widgets | [optional] | | **assetProfileId** | **AssetProfileId** | JSON object with Asset Profile Id. | [optional] | | **version** | **Long** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the asset. May include: 'description' (string). | [optional] | diff --git a/paas/docs/AssetId.md b/paas/docs/AssetId.md index 3b5d5d84..181eab53 100644 --- a/paas/docs/AssetId.md +++ b/paas/docs/AssetId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.AssetId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/AssetInfo.md b/paas/docs/AssetInfo.md index 7ca3bde2..0b74d04f 100644 --- a/paas/docs/AssetInfo.md +++ b/paas/docs/AssetInfo.md @@ -18,7 +18,7 @@ | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the asset. May include: 'description' (string). | [optional] | diff --git a/paas/docs/AssetProfileId.md b/paas/docs/AssetProfileId.md index 3033f4e6..ca31e5db 100644 --- a/paas/docs/AssetProfileId.md +++ b/paas/docs/AssetProfileId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.AssetProfileId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/AttributesOutput.md b/paas/docs/AttributesOutput.md index b6af683b..61add930 100644 --- a/paas/docs/AttributesOutput.md +++ b/paas/docs/AttributesOutput.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **strategy** | **AttributesOutputStrategy** | | [optional] | diff --git a/paas/docs/AuditLog.md b/paas/docs/AuditLog.md index 06d9da33..27d4f603 100644 --- a/paas/docs/AuditLog.md +++ b/paas/docs/AuditLog.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the auditLog creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **entityId** | **EntityId** | JSON object with Entity id | [optional] [readonly] | +| **entityId** | **EntityId** | JSON object with Entity id | [optional] | | **entityName** | **String** | Name of the logged entity | [optional] [readonly] | | **userId** | **UserId** | JSON object with User id. | [optional] [readonly] | | **userName** | **String** | Unique user name(email) of the user that performed some action on logged entity | [optional] [readonly] | diff --git a/paas/docs/BaseReadTsKvQuery.md b/paas/docs/BaseReadTsKvQuery.md index a1ef1e93..37c29fde 100644 --- a/paas/docs/BaseReadTsKvQuery.md +++ b/paas/docs/BaseReadTsKvQuery.md @@ -14,8 +14,8 @@ | **aggParameters** | **AggregationParams** | | [optional] | | **limit** | **Integer** | | [optional] | | **order** | **String** | | [optional] | -| **interval** | **Long** | | [optional] | | **aggregation** | **Aggregation** | | [optional] | +| **interval** | **Long** | | [optional] | diff --git a/paas/docs/BlobEntityId.md b/paas/docs/BlobEntityId.md index 23dd1746..13b959da 100644 --- a/paas/docs/BlobEntityId.md +++ b/paas/docs/BlobEntityId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.BlobEntityId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/BlobEntityInfo.md b/paas/docs/BlobEntityInfo.md index c22a2b18..095cb632 100644 --- a/paas/docs/BlobEntityInfo.md +++ b/paas/docs/BlobEntityInfo.md @@ -14,7 +14,7 @@ | **name** | **String** | blob entity name | [optional] [readonly] | | **type** | **String** | blob entity type | [optional] [readonly] | | **contentType** | **ContentTypeEnum** | blob content type | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the blob entity | [optional] | diff --git a/paas/docs/BlobEntityWithCustomerInfo.md b/paas/docs/BlobEntityWithCustomerInfo.md index 69a842e9..54bcd2a7 100644 --- a/paas/docs/BlobEntityWithCustomerInfo.md +++ b/paas/docs/BlobEntityWithCustomerInfo.md @@ -16,7 +16,7 @@ | **contentType** | **ContentTypeEnum** | blob content type | [optional] [readonly] | | **customerTitle** | **String** | Title of the customer | [optional] | | **customerIsPublic** | **Boolean** | Parameter that specifies if customer is public | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the blob entity | [optional] | diff --git a/paas/docs/CalculatedFieldConfiguration.md b/paas/docs/CalculatedFieldConfiguration.md index c7e141ee..32469e36 100644 --- a/paas/docs/CalculatedFieldConfiguration.md +++ b/paas/docs/CalculatedFieldConfiguration.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **aiGenerated** | **Boolean** | | [optional] | | **output** | **Output** | | [optional] | +| **aiGenerated** | **Boolean** | | [optional] | | **type** | **String** | | | diff --git a/paas/docs/CalculatedFieldDebugEventFilter.md b/paas/docs/CalculatedFieldDebugEventFilter.md index e31ffb23..4654cee1 100644 --- a/paas/docs/CalculatedFieldDebugEventFilter.md +++ b/paas/docs/CalculatedFieldDebugEventFilter.md @@ -17,8 +17,8 @@ | **msgType** | **String** | String value representing the message type | [optional] | | **arguments** | **String** | String value representing the arguments that were used in the calculation performed | [optional] | | **result** | **String** | String value representing the result of a calculation | [optional] | -| **isError** | **Boolean** | | [optional] | | **error** | **Boolean** | | [optional] | +| **isError** | **Boolean** | | [optional] | ### Enum: EntityTypeEnum diff --git a/paas/docs/CalculatedFieldId.md b/paas/docs/CalculatedFieldId.md index 3ef8e84f..b3288aa3 100644 --- a/paas/docs/CalculatedFieldId.md +++ b/paas/docs/CalculatedFieldId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.CalculatedFieldId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/ConverterId.md b/paas/docs/ConverterId.md index b1b18162..6c34b6b2 100644 --- a/paas/docs/ConverterId.md +++ b/paas/docs/ConverterId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.ConverterId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/CustomMenuItem.md b/paas/docs/CustomMenuItem.md index 22a36355..bd084c21 100644 --- a/paas/docs/CustomMenuItem.md +++ b/paas/docs/CustomMenuItem.md @@ -17,7 +17,6 @@ | **hideDashboardToolbar** | **Boolean** | Hide the dashboard toolbar | [optional] | | **url** | **String** | URL to open in the iframe, when user clicks the menu item | [optional] | | **setAccessToken** | **Boolean** | Set the access token of the current user to a new dashboard | [optional] | -| **visible** | **Boolean** | Mark if menu item is visible for user | [optional] | | **pages** | **List\** | List of child menu items | [optional] | diff --git a/paas/docs/CustomMobilePage.md b/paas/docs/CustomMobilePage.md index b90633e7..47ec52e8 100644 --- a/paas/docs/CustomMobilePage.md +++ b/paas/docs/CustomMobilePage.md @@ -10,7 +10,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **label** | **String** | Page label | [optional] | -| **visible** | **Boolean** | Indicates if page is visible | | | **icon** | **String** | URL of the page icon | [optional] | | **path** | **String** | Path to custom page | [optional] | diff --git a/paas/docs/Customer.md b/paas/docs/Customer.md index c14dd4b5..f95d97e1 100644 --- a/paas/docs/Customer.md +++ b/paas/docs/Customer.md @@ -24,7 +24,7 @@ | **customMenuId** | **CustomMenuId** | | [optional] | | **name** | **String** | Name of the customer. Read-only, duplicated from title for backward compatibility | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with parent Customer Id | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the customer. May include: 'description' (string), 'homeDashboardId' (string, UUID of the home dashboard), 'homeDashboardHideToolbar' (boolean, whether to hide the dashboard toolbar), 'isPublic' (boolean, whether this is a public customer). | [optional] | diff --git a/paas/docs/CustomerId.md b/paas/docs/CustomerId.md index bccf998e..9e077e20 100644 --- a/paas/docs/CustomerId.md +++ b/paas/docs/CustomerId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.CustomerId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/CustomerInfo.md b/paas/docs/CustomerInfo.md index 24c2bf3d..f69f84df 100644 --- a/paas/docs/CustomerInfo.md +++ b/paas/docs/CustomerInfo.md @@ -26,7 +26,7 @@ | **groups** | **List\** | Groups | [optional] | | **name** | **String** | Name of the customer. Read-only, duplicated from title for backward compatibility | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with parent Customer Id | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the customer. May include: 'description' (string), 'homeDashboardId' (string, UUID of the home dashboard), 'homeDashboardHideToolbar' (boolean, whether to hide the dashboard toolbar), 'isPublic' (boolean, whether this is a public customer). | [optional] | diff --git a/paas/docs/Dashboard.md b/paas/docs/Dashboard.md index 7c81d175..76572b33 100644 --- a/paas/docs/Dashboard.md +++ b/paas/docs/Dashboard.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **DashboardId** | JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. | [optional] | -| **createdTime** | **Long** | Timestamp of the dashboard creation, in milliseconds | [optional] [readonly] | -| **tenantId** | **TenantId** | JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id. | [optional] | | **title** | **String** | Title of the dashboard. | [optional] | | **image** | **String** | Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. | [optional] [readonly] | -| **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | | **mobileHide** | **Boolean** | Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. | [optional] [readonly] | | **mobileOrder** | **Integer** | Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications | [optional] [readonly] | -| **version** | **Long** | | [optional] | -| **resources** | **List\** | | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | | **name** | **String** | Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **resources** | **List\** | | [optional] | +| **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | +| **createdTime** | **Long** | Timestamp of the dashboard creation, in milliseconds | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. | [optional] | +| **id** | **DashboardId** | JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **tenantId** | **TenantId** | JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. | [optional] [readonly] | +| **version** | **Long** | | [optional] | diff --git a/paas/docs/DashboardId.md b/paas/docs/DashboardId.md index 0cdebef3..c75a60c9 100644 --- a/paas/docs/DashboardId.md +++ b/paas/docs/DashboardId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.DashboardId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/DashboardInfo.md b/paas/docs/DashboardInfo.md index 40a0b93b..e11ce9cf 100644 --- a/paas/docs/DashboardInfo.md +++ b/paas/docs/DashboardInfo.md @@ -22,7 +22,7 @@ | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | diff --git a/paas/docs/DashboardPage.md b/paas/docs/DashboardPage.md index 446481be..c714b734 100644 --- a/paas/docs/DashboardPage.md +++ b/paas/docs/DashboardPage.md @@ -10,7 +10,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **label** | **String** | Page label | [optional] | -| **visible** | **Boolean** | Indicates if page is visible | | | **icon** | **String** | URL of the page icon | [optional] | | **dashboardId** | **String** | Dashboard id | [optional] | diff --git a/paas/docs/DebugConverterEventFilter.md b/paas/docs/DebugConverterEventFilter.md index 7915aa69..abf7db4a 100644 --- a/paas/docs/DebugConverterEventFilter.md +++ b/paas/docs/DebugConverterEventFilter.md @@ -15,8 +15,8 @@ | **in** | **String** | | [optional] | | **out** | **String** | | [optional] | | **metadata** | **String** | | [optional] | -| **isError** | **Boolean** | | [optional] | | **error** | **Boolean** | | [optional] | +| **isError** | **Boolean** | | [optional] | diff --git a/paas/docs/DebugIntegrationEventFilter.md b/paas/docs/DebugIntegrationEventFilter.md index 3800a894..c9b6d8d6 100644 --- a/paas/docs/DebugIntegrationEventFilter.md +++ b/paas/docs/DebugIntegrationEventFilter.md @@ -14,8 +14,8 @@ | **type** | **String** | | [optional] | | **message** | **String** | | [optional] | | **statusIntegration** | **String** | | [optional] | -| **isError** | **Boolean** | | [optional] | | **error** | **Boolean** | | [optional] | +| **isError** | **Boolean** | | [optional] | diff --git a/paas/docs/DefaultMenuItem.md b/paas/docs/DefaultMenuItem.md index 2791a1e2..39580834 100644 --- a/paas/docs/DefaultMenuItem.md +++ b/paas/docs/DefaultMenuItem.md @@ -12,7 +12,6 @@ | **id** | **String** | Unique identifier for predefined menu items | [optional] [readonly] | | **name** | **String** | Name of the menu item | [optional] | | **icon** | **String** | URL of the menu item icon. Overrides 'materialIcon' | [optional] | -| **visible** | **Boolean** | Mark if menu item is visible for user | [optional] | | **pages** | **List\** | List of child menu items | [optional] | diff --git a/paas/docs/DefaultMobilePage.md b/paas/docs/DefaultMobilePage.md index 561f744e..f3ddbeca 100644 --- a/paas/docs/DefaultMobilePage.md +++ b/paas/docs/DefaultMobilePage.md @@ -10,7 +10,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **label** | **String** | Page label | [optional] | -| **visible** | **Boolean** | Indicates if page is visible | | | **icon** | **String** | URL of the page icon | [optional] | | **id** | **DefaultPageId** | Identifier for default page | [optional] | diff --git a/paas/docs/Device.md b/paas/docs/Device.md index 0b00f936..a3dbab50 100644 --- a/paas/docs/Device.md +++ b/paas/docs/Device.md @@ -19,7 +19,7 @@ | **softwareId** | **OtaPackageId** | JSON object with Ota Package Id. | [optional] | | **version** | **Long** | | [optional] | | **deviceData** | **DeviceData** | JSON object with content specific to type of transport in the device profile. | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | 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] | diff --git a/paas/docs/DeviceApiControllerApi.md b/paas/docs/DeviceApiControllerApi.md new file mode 100644 index 00000000..ad70f8db --- /dev/null +++ b/paas/docs/DeviceApiControllerApi.md @@ -0,0 +1,300 @@ +# DeviceApiControllerApi + +`ThingsboardClient` methods: + +``` +String getDeviceAttributes(@Nonnull String deviceToken, @Nonnull String clientKeys, @Nonnull String sharedKeys) // Get attributes (getDeviceAttributes) +String getFirmware(@Nonnull String deviceToken, @Nonnull String title, @Nonnull String version, @Nullable Integer size, @Nullable Integer chunk) // Get Device Firmware (getFirmware) +String getSoftware(@Nonnull String deviceToken, @Nonnull String title, @Nonnull String version, @Nullable Integer size, @Nullable Integer chunk) // Get Device Software (getSoftware) +String postDeviceAttributes(@Nonnull String deviceToken, @Nonnull String body) // Post attributes (postDeviceAttributes) +String postRpcRequest(@Nonnull String deviceToken, @Nonnull String body) // Send the RPC command (postRpcRequest) +String postTelemetry(@Nonnull String deviceToken, @Nonnull String body) // Post time series data (postTelemetry) +String provisionDevice(@Nonnull String body) // Provision new device (provisionDevice) +String replyToCommand(@Nonnull String deviceToken, @Nonnull String requestId, @Nonnull String body) // Reply to RPC commands (replyToCommand) +String saveClaimingInfo(@Nonnull String deviceToken, @Nullable String body) // Save claiming information (saveClaimingInfo) +String subscribeToAttributes(@Nonnull String deviceToken, @Nullable Long timeout) // Subscribe to attribute updates (subscribeToAttributes) (Deprecated) +String subscribeToCommands(@Nonnull String deviceToken, @Nullable Long timeout) // Subscribe to RPC commands (subscribeToCommands) (Deprecated) +``` + + +## getDeviceAttributes + +``` +String getDeviceAttributes(@Nonnull String deviceToken, @Nonnull String clientKeys, @Nonnull String sharedKeys) +``` + +**GET** `/api/v1/{deviceToken}/attributes` + +Get attributes (getDeviceAttributes) + +Returns all attributes that belong to device. Use optional 'clientKeys' and/or 'sharedKeys' parameter to return specific attributes. Example of the result: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **clientKeys** | **String** | Comma separated key names for attribute with client scope | | +| **sharedKeys** | **String** | Comma separated key names for attribute with shared scope | | + +### Return type + +**String** + + +## getFirmware + +``` +String getFirmware(@Nonnull String deviceToken, @Nonnull String title, @Nonnull String version, @Nullable Integer size, @Nullable Integer chunk) +``` + +**GET** `/api/v1/{deviceToken}/firmware` + +Get Device Firmware (getFirmware) + +Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **title** | **String** | Title of the firmware, corresponds to the value of 'fw_title' attribute. | | +| **version** | **String** | Version of the firmware, corresponds to the value of 'fw_version' attribute. | | +| **size** | **Integer** | Size of the chunk. Optional. Omit to download the entire file without chunks. | [optional] [default to 0] | +| **chunk** | **Integer** | Index of the chunk. Optional. Omit to download the entire file without chunks. | [optional] [default to 0] | + +### Return type + +**String** + + +## getSoftware + +``` +String getSoftware(@Nonnull String deviceToken, @Nonnull String title, @Nonnull String version, @Nullable Integer size, @Nullable Integer chunk) +``` + +**GET** `/api/v1/{deviceToken}/software` + +Get Device Software (getSoftware) + +Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **title** | **String** | Title of the software, corresponds to the value of 'sw_title' attribute. | | +| **version** | **String** | Version of the software, corresponds to the value of 'sw_version' attribute. | | +| **size** | **Integer** | Size of the chunk. Optional. Omit to download the entire file without using chunks. | [optional] [default to 0] | +| **chunk** | **Integer** | Index of the chunk. Optional. Omit to download the entire file without using chunks. | [optional] [default to 0] | + +### Return type + +**String** + + +## postDeviceAttributes + +``` +String postDeviceAttributes(@Nonnull String deviceToken, @Nonnull String body) +``` + +**POST** `/api/v1/{deviceToken}/attributes` + +Post attributes (postDeviceAttributes) + +Post client attribute updates on behalf of device. Example of the request: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **body** | **String** | JSON with attribute key-value pairs. See API call description for example. | | + +### Return type + +**String** + + +## postRpcRequest + +``` +String postRpcRequest(@Nonnull String deviceToken, @Nonnull String body) +``` + +**POST** `/api/v1/{deviceToken}/rpc` + +Send the RPC command (postRpcRequest) + +Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **body** | **String** | The RPC request JSON | | + +### Return type + +**String** + + +## postTelemetry + +``` +String postTelemetry(@Nonnull String deviceToken, @Nonnull String body) +``` + +**POST** `/api/v1/{deviceToken}/telemetry` + +Post time series data (postTelemetry) + +Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **body** | **String** | | | + +### Return type + +**String** + + +## provisionDevice + +``` +String provisionDevice(@Nonnull String body) +``` + +**POST** `/api/v1/provision` + +Provision new device (provisionDevice) + +Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String** | JSON with provision request. See API call description for example. | | + +### Return type + +**String** + + +## replyToCommand + +``` +String replyToCommand(@Nonnull String deviceToken, @Nonnull String requestId, @Nonnull String body) +``` + +**POST** `/api/v1/{deviceToken}/rpc/{requestId}` + +Reply to RPC commands (replyToCommand) + +Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **requestId** | **String** | RPC request id from the incoming RPC request | | +| **body** | **String** | Reply to the RPC request, JSON. For example: {\"status\":\"success\"} | | + +### Return type + +**String** + + +## saveClaimingInfo + +``` +String saveClaimingInfo(@Nonnull String deviceToken, @Nullable String body) +``` + +**POST** `/api/v1/{deviceToken}/claim` + +Save claiming information (saveClaimingInfo) + +Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **body** | **String** | | [optional] | + +### Return type + +**String** + + +## subscribeToAttributes + +``` +String subscribeToAttributes(@Nonnull String deviceToken, @Nullable Long timeout) +``` + +**GET** `/api/v1/{deviceToken}/attributes/updates` + +Subscribe to attribute updates (subscribeToAttributes) (Deprecated) + +Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **timeout** | **Long** | Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. | [optional] [default to 0] | + +### Return type + +**String** + + +## subscribeToCommands + +``` +String subscribeToCommands(@Nonnull String deviceToken, @Nullable Long timeout) +``` + +**GET** `/api/v1/{deviceToken}/rpc` + +Subscribe to RPC commands (subscribeToCommands) (Deprecated) + +Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **timeout** | **Long** | Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. | [optional] [default to 0] | + +### Return type + +**String** + diff --git a/paas/docs/DeviceId.md b/paas/docs/DeviceId.md index b282757b..ba885a3a 100644 --- a/paas/docs/DeviceId.md +++ b/paas/docs/DeviceId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.DeviceId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/DeviceInfo.md b/paas/docs/DeviceInfo.md index 9db5a77e..7f772f34 100644 --- a/paas/docs/DeviceInfo.md +++ b/paas/docs/DeviceInfo.md @@ -22,7 +22,7 @@ | **groups** | **List\** | Groups | [optional] | | **active** | **Boolean** | Device active flag. | [optional] [readonly] | | **deviceData** | **DeviceData** | JSON object with content specific to type of transport in the device profile. | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | 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] | diff --git a/paas/docs/DeviceProfileId.md b/paas/docs/DeviceProfileId.md index 6d554c70..6927dd30 100644 --- a/paas/docs/DeviceProfileId.md +++ b/paas/docs/DeviceProfileId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.DeviceProfileId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/Domain.md b/paas/docs/Domain.md index 07c5e8de..646bed33 100644 --- a/paas/docs/Domain.md +++ b/paas/docs/Domain.md @@ -16,7 +16,7 @@ A JSON value representing the Domain. | **name** | **String** | Domain name. Cannot be empty | | | **oauth2Enabled** | **Boolean** | Whether OAuth2 settings are enabled or not | [optional] | | **propagateToEdge** | **Boolean** | Whether OAuth2 settings are enabled on Edge or not | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | diff --git a/paas/docs/DomainId.md b/paas/docs/DomainId.md index a7406eb1..b831e844 100644 --- a/paas/docs/DomainId.md +++ b/paas/docs/DomainId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.DomainId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | | | diff --git a/paas/docs/DomainInfo.md b/paas/docs/DomainInfo.md index c6c36df6..72168f73 100644 --- a/paas/docs/DomainInfo.md +++ b/paas/docs/DomainInfo.md @@ -15,7 +15,7 @@ | **oauth2Enabled** | **Boolean** | Whether OAuth2 settings are enabled or not | [optional] | | **propagateToEdge** | **Boolean** | Whether OAuth2 settings are enabled on Edge or not | [optional] | | **oauth2ClientInfos** | **List\** | List of available oauth2 clients | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | diff --git a/paas/docs/Edge.md b/paas/docs/Edge.md index a701d20f..68d4ae39 100644 --- a/paas/docs/Edge.md +++ b/paas/docs/Edge.md @@ -23,7 +23,7 @@ A JSON value representing the edge. | **cloudEndpoint** | **String** | Edge uses this cloud URL to activate and periodically check it's license | | | **edgeLicenseType** | **EdgeLicenseType** | | [optional] | | **version** | **Long** | | [optional] | -| **ownerId** | **EntityId** | | [optional] [readonly] | +| **ownerId** | **EntityId** | | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the edge. May include: 'description' (string). | [optional] | diff --git a/paas/docs/EdgeId.md b/paas/docs/EdgeId.md index 6cb962d7..f04c5af9 100644 --- a/paas/docs/EdgeId.md +++ b/paas/docs/EdgeId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.EdgeId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/EdgeInfo.md b/paas/docs/EdgeInfo.md index a0e7115d..18742074 100644 --- a/paas/docs/EdgeInfo.md +++ b/paas/docs/EdgeInfo.md @@ -23,7 +23,7 @@ | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | -| **ownerId** | **EntityId** | | [optional] [readonly] | +| **ownerId** | **EntityId** | | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the edge. May include: 'description' (string). | [optional] | diff --git a/paas/docs/EntityAggregationCalculatedFieldConfiguration.md b/paas/docs/EntityAggregationCalculatedFieldConfiguration.md index cc2587ba..3077b949 100644 --- a/paas/docs/EntityAggregationCalculatedFieldConfiguration.md +++ b/paas/docs/EntityAggregationCalculatedFieldConfiguration.md @@ -10,10 +10,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **arguments** | **Map\** | | | -| **metrics** | **Map\** | | | | **interval** | **AggInterval** | | | -| **watermark** | **Watermark** | | [optional] | +| **metrics** | **Map\** | | | | **produceIntermediateResult** | **Boolean** | | [optional] | +| **watermark** | **Watermark** | | [optional] | diff --git a/paas/docs/EntityGroupId.md b/paas/docs/EntityGroupId.md index c4e56ecb..53d3ab43 100644 --- a/paas/docs/EntityGroupId.md +++ b/paas/docs/EntityGroupId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.EntityGroupId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/EntityGroupInfo.md b/paas/docs/EntityGroupInfo.md index e2eb0fc0..7557e71b 100644 --- a/paas/docs/EntityGroupInfo.md +++ b/paas/docs/EntityGroupInfo.md @@ -15,7 +15,7 @@ | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the entity group. May include: 'description' (string), 'isPublic' (boolean, whether this group is shared publicly), 'publicCustomerId' (string, UUID of the public customer associated with this group). | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | JSON with the configuration for UI components: list of columns, settings, actions, etc | [optional] | | **version** | **Long** | | [optional] | -| **ownerIds** | **Set\** | List of the entity group owners. | | +| **ownerIds** | **Set\** | List of the entity group owners. | | | **groupAll** | **Boolean** | Indicates special group 'All' that contains all entities and can't be deleted. | [optional] | | **edgeGroupAll** | **Boolean** | Indicates special edge group 'All' that contains all entities and can't be deleted. | [optional] [readonly] | | **tenantId** | **TenantId** | | [optional] | diff --git a/paas/docs/EntityGroupInfoOwnerIdsInner.md b/paas/docs/EntityGroupInfoOwnerIdsInner.md new file mode 100644 index 00000000..44097d33 --- /dev/null +++ b/paas/docs/EntityGroupInfoOwnerIdsInner.md @@ -0,0 +1,23 @@ + +# EntityGroupInfoOwnerIdsInner + +`org.thingsboard.client.model.EntityGroupInfoOwnerIdsInner` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **id** | **UUID** | ID of the entity, time-based UUID v1 | | +| **entityType** | **EntityType** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/EntityView.md b/paas/docs/EntityView.md index 986d862e..c6b98988 100644 --- a/paas/docs/EntityView.md +++ b/paas/docs/EntityView.md @@ -20,7 +20,7 @@ A JSON object representing the entity view. | **version** | **Long** | | [optional] | | **id** | **EntityViewId** | JSON object with the Entity View Id. Specify this field to update the Entity View. Referencing non-existing Entity View Id will cause error. Omit this field to create new Entity View. | [optional] | | **createdTime** | **Long** | Timestamp of the Entity View creation, in milliseconds | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the entity view. May include: 'description' (string). | [optional] | diff --git a/paas/docs/EntityViewId.md b/paas/docs/EntityViewId.md index 2ac79613..48cd0b85 100644 --- a/paas/docs/EntityViewId.md +++ b/paas/docs/EntityViewId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.EntityViewId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/EntityViewInfo.md b/paas/docs/EntityViewInfo.md index 05a6f669..ee0cec48 100644 --- a/paas/docs/EntityViewInfo.md +++ b/paas/docs/EntityViewInfo.md @@ -20,7 +20,7 @@ | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the entity view. May include: 'description' (string). | [optional] | diff --git a/paas/docs/ErrorComponentAllOfException.md b/paas/docs/ErrorComponentAllOfException.md index b2bb494b..20724da9 100644 --- a/paas/docs/ErrorComponentAllOfException.md +++ b/paas/docs/ErrorComponentAllOfException.md @@ -9,9 +9,9 @@ |------------ | ------------- | ------------- | -------------| | **cause** | **ErrorComponentAllOfExceptionCause** | | [optional] | | **stackTrace** | **List\** | | [optional] | +| **localizedMessage** | **String** | | [optional] | | **message** | **String** | | [optional] | | **suppressed** | **List\** | | [optional] | -| **localizedMessage** | **String** | | [optional] | diff --git a/paas/docs/ErrorComponentAllOfExceptionCause.md b/paas/docs/ErrorComponentAllOfExceptionCause.md index fb802cb2..1fa1012e 100644 --- a/paas/docs/ErrorComponentAllOfExceptionCause.md +++ b/paas/docs/ErrorComponentAllOfExceptionCause.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **stackTrace** | **List\** | | [optional] | -| **message** | **String** | | [optional] | | **localizedMessage** | **String** | | [optional] | +| **message** | **String** | | [optional] | diff --git a/paas/docs/EventInfo.md b/paas/docs/EventInfo.md index 2af98e01..f9940f61 100644 --- a/paas/docs/EventInfo.md +++ b/paas/docs/EventInfo.md @@ -12,7 +12,7 @@ | **tenantId** | **TenantId** | JSON object with Tenant Id. | [optional] [readonly] | | **type** | **String** | Event type | [optional] | | **uid** | **String** | string | [optional] | -| **entityId** | **EntityId** | JSON object with Entity Id for which event is created. | [optional] [readonly] | +| **entityId** | **EntityId** | JSON object with Entity Id for which event is created. | [optional] | | **body** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | diff --git a/paas/docs/Failure.md b/paas/docs/Failure.md index af15d929..a4ce140d 100644 --- a/paas/docs/Failure.md +++ b/paas/docs/Failure.md @@ -10,7 +10,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **errorDetails** | **String** | A string containing details about the failure | [optional] | -| **status** | **String** | | [optional] | diff --git a/paas/docs/FeaturesInfo.md b/paas/docs/FeaturesInfo.md index 106d56cb..861ec778 100644 --- a/paas/docs/FeaturesInfo.md +++ b/paas/docs/FeaturesInfo.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **whiteLabelingEnabled** | **Boolean** | | [optional] | +| **emailEnabled** | **Boolean** | | [optional] | | **smsEnabled** | **Boolean** | | [optional] | -| **oauthEnabled** | **Boolean** | | [optional] | | **notificationEnabled** | **Boolean** | | [optional] | -| **whiteLabelingEnabled** | **Boolean** | | [optional] | +| **oauthEnabled** | **Boolean** | | [optional] | | **twoFaEnabled** | **Boolean** | | [optional] | -| **emailEnabled** | **Boolean** | | [optional] | diff --git a/paas/docs/GeofencingCalculatedFieldConfiguration.md b/paas/docs/GeofencingCalculatedFieldConfiguration.md index fd783aaf..0555bc44 100644 --- a/paas/docs/GeofencingCalculatedFieldConfiguration.md +++ b/paas/docs/GeofencingCalculatedFieldConfiguration.md @@ -10,9 +10,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **entityCoordinates** | **EntityCoordinates** | | | -| **zoneGroups** | **Map\** | | | | **scheduledUpdateEnabled** | **Boolean** | | [optional] | | **scheduledUpdateInterval** | **Integer** | | [optional] | +| **zoneGroups** | **Map\** | | | diff --git a/paas/docs/GroupPermissionId.md b/paas/docs/GroupPermissionId.md index f8b2f4c4..6cb91b73 100644 --- a/paas/docs/GroupPermissionId.md +++ b/paas/docs/GroupPermissionId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.GroupPermissionId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/HomeMenuItem.md b/paas/docs/HomeMenuItem.md index 9042cddc..e0a5af6d 100644 --- a/paas/docs/HomeMenuItem.md +++ b/paas/docs/HomeMenuItem.md @@ -12,7 +12,6 @@ | **id** | **String** | Unique identifier for predefined menu items | [optional] [readonly] | | **name** | **String** | Name of the menu item | [optional] | | **icon** | **String** | URL of the menu item icon. Overrides 'materialIcon' | [optional] | -| **visible** | **Boolean** | Mark if menu item is visible for user | [optional] | | **pages** | **List\** | List of child menu items | [optional] | | **homeType** | **HomeMenuItemType** | DEFAULT or DASHBOARD. DASHBOARD means default home page presentation changed to refer to dashboard | [optional] | | **dashboardId** | **String** | Id of the Dashboard to open, when user clicks the menu item | [optional] | diff --git a/paas/docs/Integration.md b/paas/docs/Integration.md index c09e562f..d05e4d3e 100644 --- a/paas/docs/Integration.md +++ b/paas/docs/Integration.md @@ -18,6 +18,7 @@ A JSON value representing the integration. | **debugSettings** | **DebugSettings** | Debug settings object. | [optional] | | **enabled** | **Boolean** | Boolean flag to enable/disable the integration | [optional] | | **allowCreateDevicesOrAssets** | **Boolean** | Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet | [optional] | +| **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | | **version** | **Long** | | [optional] | | **defaultConverterId** | **ConverterId** | JSON object with the Uplink Converter Id | | | **downlinkConverterId** | **ConverterId** | JSON object with the Downlink Converter Id | [optional] | @@ -25,7 +26,6 @@ A JSON value representing the integration. | **secret** | **String** | String value used by the remote integrations. Remote integration uses this value along with the 'routingKey' for kind of security and validation to be able to connect to the platform using Grpc | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | JSON object representing integration configuration. Each integration type has specific configuration with the connectivity parameters (like 'host' and 'port' for MQTT type or 'baseUrl' for HTTP based type, etc.) and other important parameters dependent on the integration type | | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the integration | [optional] | -| **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | | **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | diff --git a/paas/docs/IntegrationId.md b/paas/docs/IntegrationId.md index 1617fa64..abe382db 100644 --- a/paas/docs/IntegrationId.md +++ b/paas/docs/IntegrationId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.IntegrationId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/IntegrationInfo.md b/paas/docs/IntegrationInfo.md index a6e9964f..34ec8280 100644 --- a/paas/docs/IntegrationInfo.md +++ b/paas/docs/IntegrationInfo.md @@ -16,10 +16,10 @@ | **debugSettings** | **DebugSettings** | Debug settings object. | [optional] | | **enabled** | **Boolean** | Boolean flag to enable/disable the integration | [optional] | | **allowCreateDevicesOrAssets** | **Boolean** | Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet | [optional] | +| **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | | **version** | **Long** | | [optional] | | **status** | **Object** | | [optional] | | **stats** | **Object** | | [optional] | -| **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | | **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | diff --git a/paas/docs/JobId.md b/paas/docs/JobId.md index 6b5e3cb4..81852d83 100644 --- a/paas/docs/JobId.md +++ b/paas/docs/JobId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.JobId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/MicrosoftTeamsNotificationTargetConfig.md b/paas/docs/MicrosoftTeamsNotificationTargetConfig.md index b39ff995..f6abb253 100644 --- a/paas/docs/MicrosoftTeamsNotificationTargetConfig.md +++ b/paas/docs/MicrosoftTeamsNotificationTargetConfig.md @@ -12,11 +12,11 @@ | **webhookUrl** | **String** | | | | **channelName** | **String** | | | | **useOldApi** | **Boolean** | | [optional] | -| **id** | **Object** | | [optional] | -| **title** | **String** | | [optional] | | **email** | **String** | | [optional] | | **firstName** | **String** | | [optional] | +| **id** | **Object** | | [optional] | | **lastName** | **String** | | [optional] | +| **title** | **String** | | [optional] | diff --git a/paas/docs/MobileAppBundleId.md b/paas/docs/MobileAppBundleId.md index bfa901f8..7c10daa1 100644 --- a/paas/docs/MobileAppBundleId.md +++ b/paas/docs/MobileAppBundleId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.MobileAppBundleId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | | | diff --git a/paas/docs/MobileAppId.md b/paas/docs/MobileAppId.md index 4b205e54..aee59bc3 100644 --- a/paas/docs/MobileAppId.md +++ b/paas/docs/MobileAppId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.MobileAppId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | | | diff --git a/paas/docs/MobileSelfRegistrationParams.md b/paas/docs/MobileSelfRegistrationParams.md index f2c8f3ff..d3be9c67 100644 --- a/paas/docs/MobileSelfRegistrationParams.md +++ b/paas/docs/MobileSelfRegistrationParams.md @@ -9,22 +9,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **enabled** | **Boolean** | Indicates if self-registration is allowed via sign-up form | [optional] | -| **title** | **String** | The text message to appear on login form | | -| **captcha** | **CaptchaParams** | Captcha site key for 'I'm not a robot' validation | | -| **signUpFields** | **List\** | List of sign-up form fields | | -| **showPrivacyPolicy** | **Boolean** | Show or hide 'Privacy Policy' | [optional] | -| **showTermsOfUse** | **Boolean** | Show or hide 'Terms of Use' | [optional] | -| **notificationRecipient** | **NotificationTargetId** | Recipient to use for notifications when new user self-registered. | [optional] | -| **customerTitlePrefix** | **String** | Prefix to add to created customer | [optional] | -| **customerGroupId** | **EntityGroupId** | Id of the customer group customer wil be added to. | [optional] | -| **permissions** | **List\** | Group Permissions to assign for the new customer user. | | -| **defaultDashboard** | **DefaultDashboardParams** | Default dashboard params | [optional] | -| **homeDashboard** | **HomeDashboardParams** | Home dashboard params | [optional] | -| **customMenuId** | **CustomMenuId** | Custom menu id | [optional] | | **privacyPolicy** | **String** | Privacy policy text. Supports HTML. | [optional] | -| **termsOfUse** | **String** | Terms of User text. Supports HTML. | [optional] | | **redirect** | **MobileRedirectParams** | Mobile redirect params. | | +| **termsOfUse** | **String** | Terms of User text. Supports HTML. | [optional] | diff --git a/paas/docs/NotificationId.md b/paas/docs/NotificationId.md index c3fa9b64..dd34b7eb 100644 --- a/paas/docs/NotificationId.md +++ b/paas/docs/NotificationId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.NotificationId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/NotificationRequestId.md b/paas/docs/NotificationRequestId.md index d532018f..c873ed0a 100644 --- a/paas/docs/NotificationRequestId.md +++ b/paas/docs/NotificationRequestId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.NotificationRequestId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/NotificationRuleId.md b/paas/docs/NotificationRuleId.md index ed79e89b..c54af744 100644 --- a/paas/docs/NotificationRuleId.md +++ b/paas/docs/NotificationRuleId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.NotificationRuleId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/NotificationRuleRecipientsConfig.md b/paas/docs/NotificationRuleRecipientsConfig.md index 14e18a09..84f99173 100644 --- a/paas/docs/NotificationRuleRecipientsConfig.md +++ b/paas/docs/NotificationRuleRecipientsConfig.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **triggerType** | **NotificationRuleTriggerType** | | | +| **triggerType** | **NotificationRuleTriggerType** | | [optional] | diff --git a/paas/docs/NotificationTargetId.md b/paas/docs/NotificationTargetId.md index 4863df8b..3d02acee 100644 --- a/paas/docs/NotificationTargetId.md +++ b/paas/docs/NotificationTargetId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.NotificationTargetId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/NotificationTemplateId.md b/paas/docs/NotificationTemplateId.md index fce9b549..8f4d00ce 100644 --- a/paas/docs/NotificationTemplateId.md +++ b/paas/docs/NotificationTemplateId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.NotificationTemplateId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/OAuth2Client.md b/paas/docs/OAuth2Client.md index e910032b..6d5f3b9b 100644 --- a/paas/docs/OAuth2Client.md +++ b/paas/docs/OAuth2Client.md @@ -27,7 +27,7 @@ | **loginButtonIcon** | **String** | Log in button icon for OAuth2 provider | [optional] | | **platforms** | **List\** | List of platforms for which usage of the OAuth2 client is allowed (empty for all allowed) | [optional] | | **name** | **String** | | [optional] [readonly] | -| **ownerId** | **EntityId** | | [optional] [readonly] | +| **ownerId** | **EntityId** | | [optional] | diff --git a/paas/docs/OAuth2ClientId.md b/paas/docs/OAuth2ClientId.md index 67682a4f..d553e524 100644 --- a/paas/docs/OAuth2ClientId.md +++ b/paas/docs/OAuth2ClientId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.OAuth2ClientId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | | | diff --git a/paas/docs/OtaPackageData.md b/paas/docs/OtaPackageData.md index ef21853b..1acf91c1 100644 --- a/paas/docs/OtaPackageData.md +++ b/paas/docs/OtaPackageData.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **_short** | **Integer** | | [optional] | | **_char** | **String** | | [optional] | +| **direct** | **Boolean** | | [optional] | +| **_double** | **Double** | | [optional] | +| **_float** | **Float** | | [optional] | | **_int** | **Integer** | | [optional] | | **_long** | **Long** | | [optional] | -| **_float** | **Float** | | [optional] | -| **_double** | **Double** | | [optional] | -| **direct** | **Boolean** | | [optional] | | **readOnly** | **Boolean** | | [optional] | +| **_short** | **Integer** | | [optional] | diff --git a/paas/docs/OtaPackageId.md b/paas/docs/OtaPackageId.md index a8f7df30..94de5cc9 100644 --- a/paas/docs/OtaPackageId.md +++ b/paas/docs/OtaPackageId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.OtaPackageId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/PropagationCalculatedFieldConfiguration.md b/paas/docs/PropagationCalculatedFieldConfiguration.md index 18dbbf32..d306f690 100644 --- a/paas/docs/PropagationCalculatedFieldConfiguration.md +++ b/paas/docs/PropagationCalculatedFieldConfiguration.md @@ -9,10 +9,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **applyExpressionToResolvedArguments** | **Boolean** | | [optional] | | **arguments** | **Map\** | | | | **expression** | **String** | | [optional] | | **relation** | **RelationPathLevel** | | | -| **applyExpressionToResolvedArguments** | **Boolean** | | [optional] | diff --git a/paas/docs/QueueId.md b/paas/docs/QueueId.md index 8b3e898c..2b52656a 100644 --- a/paas/docs/QueueId.md +++ b/paas/docs/QueueId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.QueueId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/QueueStatsId.md b/paas/docs/QueueStatsId.md index 9d169464..78bce8bc 100644 --- a/paas/docs/QueueStatsId.md +++ b/paas/docs/QueueStatsId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.QueueStatsId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/RelatedEntitiesAggregationCalculatedFieldConfiguration.md b/paas/docs/RelatedEntitiesAggregationCalculatedFieldConfiguration.md index 34a018e8..7d0b9dc2 100644 --- a/paas/docs/RelatedEntitiesAggregationCalculatedFieldConfiguration.md +++ b/paas/docs/RelatedEntitiesAggregationCalculatedFieldConfiguration.md @@ -9,13 +9,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **relation** | **RelationPathLevel** | | | | **arguments** | **Map\** | | | | **deduplicationIntervalInSec** | **Long** | | [optional] | | **metrics** | **Map\** | | | -| **useLatestTs** | **Boolean** | | [optional] | -| **scheduledUpdateInterval** | **Integer** | | [optional] | +| **relation** | **RelationPathLevel** | | | | **scheduledUpdateEnabled** | **Boolean** | | [optional] | +| **scheduledUpdateInterval** | **Integer** | | [optional] | +| **useLatestTs** | **Boolean** | | [optional] | diff --git a/paas/docs/Report.md b/paas/docs/Report.md index 8b087b5e..ccd6f3c4 100644 --- a/paas/docs/Report.md +++ b/paas/docs/Report.md @@ -15,7 +15,7 @@ | **format** | **TbReportFormat** | | | | **name** | **String** | | | | **userId** | **UserId** | | | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | diff --git a/paas/docs/ReportId.md b/paas/docs/ReportId.md index 63550140..db659bef 100644 --- a/paas/docs/ReportId.md +++ b/paas/docs/ReportId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.ReportId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/ReportInfo.md b/paas/docs/ReportInfo.md index ab63b44b..989831f3 100644 --- a/paas/docs/ReportInfo.md +++ b/paas/docs/ReportInfo.md @@ -18,7 +18,7 @@ | **templateInfo** | **EntityInfo** | | [optional] | | **customerTitle** | **String** | | [optional] | | **userName** | **String** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | diff --git a/paas/docs/ReportTemplate.md b/paas/docs/ReportTemplate.md index ddb4f161..12ea7594 100644 --- a/paas/docs/ReportTemplate.md +++ b/paas/docs/ReportTemplate.md @@ -19,7 +19,7 @@ A JSON value representing the Report Template. | **description** | **String** | Description | [optional] | | **version** | **Long** | | [optional] | | **_configuration** | **ReportTemplateConfig** | a JSON value with report template configuration | | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | diff --git a/paas/docs/ReportTemplateConfig.md b/paas/docs/ReportTemplateConfig.md index 53571dfc..0c4cda14 100644 --- a/paas/docs/ReportTemplateConfig.md +++ b/paas/docs/ReportTemplateConfig.md @@ -8,11 +8,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **format** | **TbReportFormat** | Report format | | -| **entityAliases** | **List\** | | [optional] | | **filters** | **List\** | | [optional] | | **namePattern** | **String** | | [optional] | | **components** | **List\** | | [optional] | | **timeDataPattern** | **String** | | [optional] | +| **entityAliases** | **List\** | | [optional] | diff --git a/paas/docs/ReportTemplateId.md b/paas/docs/ReportTemplateId.md index f2dd6733..1cc0f169 100644 --- a/paas/docs/ReportTemplateId.md +++ b/paas/docs/ReportTemplateId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.ReportTemplateId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/ReportTemplateInfo.md b/paas/docs/ReportTemplateInfo.md index a0c905a5..00b4fbe3 100644 --- a/paas/docs/ReportTemplateInfo.md +++ b/paas/docs/ReportTemplateInfo.md @@ -17,7 +17,7 @@ | **description** | **String** | Description | [optional] | | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | diff --git a/paas/docs/ReportTimeSeriesChartSettings.md b/paas/docs/ReportTimeSeriesChartSettings.md index 939a0353..7b9dcfc9 100644 --- a/paas/docs/ReportTimeSeriesChartSettings.md +++ b/paas/docs/ReportTimeSeriesChartSettings.md @@ -23,8 +23,8 @@ | **legendLabelColor** | **String** | | [optional] | | **legendValueFont** | **Font** | | [optional] | | **legendValueColor** | **String** | | [optional] | -| **xaxis** | **TimeSeriesChartXAxisSettings** | | [optional] | | **yaxes** | **Map\** | | [optional] | +| **xaxis** | **TimeSeriesChartXAxisSettings** | | [optional] | | **thresholds** | **List\** | | [optional] | | **grid** | **TimeSeriesChartGridSettings** | | [optional] | | **yAxes** | **Map\** | | [optional] | diff --git a/paas/docs/Role.md b/paas/docs/Role.md index 6f6976df..45734ca7 100644 --- a/paas/docs/Role.md +++ b/paas/docs/Role.md @@ -17,7 +17,7 @@ A JSON value representing the role. | **version** | **Long** | | [optional] | | **id** | **RoleId** | JSON object with the Role Id. Specify this field to update the Role. Referencing non-existing Role Id will cause error. Omit this field to create new Role. | [optional] | | **createdTime** | **Long** | Timestamp of the role creation, in milliseconds | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the role. May include: 'description' (string). | [optional] | diff --git a/paas/docs/RoleId.md b/paas/docs/RoleId.md index 82750128..bf727b59 100644 --- a/paas/docs/RoleId.md +++ b/paas/docs/RoleId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.RoleId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/RpcId.md b/paas/docs/RpcId.md index 1cf525b7..d092145b 100644 --- a/paas/docs/RpcId.md +++ b/paas/docs/RpcId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.RpcId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/RuleChainDebugEventFilter.md b/paas/docs/RuleChainDebugEventFilter.md index 6f9e9e0e..9ace52e2 100644 --- a/paas/docs/RuleChainDebugEventFilter.md +++ b/paas/docs/RuleChainDebugEventFilter.md @@ -12,8 +12,8 @@ | **server** | **String** | String value representing the server name, identifier or ip address where the platform is running | [optional] | | **errorStr** | **String** | The case insensitive 'contains' filter based on error message | [optional] | | **message** | **String** | String value representing the message | [optional] | -| **isError** | **Boolean** | | [optional] | | **error** | **Boolean** | | [optional] | +| **isError** | **Boolean** | | [optional] | diff --git a/paas/docs/RuleChainId.md b/paas/docs/RuleChainId.md index 80204725..c807f0e9 100644 --- a/paas/docs/RuleChainId.md +++ b/paas/docs/RuleChainId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.RuleChainId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/RuleNodeDebugEventFilter.md b/paas/docs/RuleNodeDebugEventFilter.md index 16baea68..6791375f 100644 --- a/paas/docs/RuleNodeDebugEventFilter.md +++ b/paas/docs/RuleNodeDebugEventFilter.md @@ -19,8 +19,8 @@ | **relationType** | **String** | String value representing the type of message routing | [optional] | | **dataSearch** | **String** | The case insensitive 'contains' filter based on data (key and value) for the message. | [optional] | | **metadataSearch** | **String** | The case insensitive 'contains' filter based on metadata (key and value) for the message. | [optional] | -| **isError** | **Boolean** | | [optional] | | **error** | **Boolean** | | [optional] | +| **isError** | **Boolean** | | [optional] | ### Enum: MsgDirectionTypeEnum diff --git a/paas/docs/RuleNodeId.md b/paas/docs/RuleNodeId.md index 910349c1..dd9399c5 100644 --- a/paas/docs/RuleNodeId.md +++ b/paas/docs/RuleNodeId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.RuleNodeId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/ScheduledReportInfo.md b/paas/docs/ScheduledReportInfo.md index b7d81e9f..8bfedc8b 100644 --- a/paas/docs/ScheduledReportInfo.md +++ b/paas/docs/ScheduledReportInfo.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | +| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | | **schedule** | **com.fasterxml.jackson.databind.JsonNode** | a JSON value with schedule time configuration | [optional] | @@ -20,7 +20,7 @@ | **templateInfo** | **EntityInfo** | Report template info | [optional] [readonly] | | **customerTitle** | **String** | Customer title | [optional] [readonly] | | **userName** | **String** | Report user name | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | diff --git a/paas/docs/SchedulerEvent.md b/paas/docs/SchedulerEvent.md index 528b1b11..e35ec3a1 100644 --- a/paas/docs/SchedulerEvent.md +++ b/paas/docs/SchedulerEvent.md @@ -13,14 +13,14 @@ A JSON value representing the Scheduler Event. | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | +| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | | **schedule** | **com.fasterxml.jackson.databind.JsonNode** | a JSON value with schedule time configuration | [optional] | | **enabled** | **Boolean** | Enable/disable scheduler | [optional] | | **version** | **Long** | | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | diff --git a/paas/docs/SchedulerEventId.md b/paas/docs/SchedulerEventId.md index 9561d8e0..597ab2ba 100644 --- a/paas/docs/SchedulerEventId.md +++ b/paas/docs/SchedulerEventId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.SchedulerEventId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/SchedulerEventInfo.md b/paas/docs/SchedulerEventInfo.md index 24ac6c4c..8ddc8760 100644 --- a/paas/docs/SchedulerEventInfo.md +++ b/paas/docs/SchedulerEventInfo.md @@ -11,13 +11,13 @@ | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | +| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | | **schedule** | **com.fasterxml.jackson.databind.JsonNode** | a JSON value with schedule time configuration | [optional] | | **enabled** | **Boolean** | Enable/disable scheduler | [optional] | | **version** | **Long** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | diff --git a/paas/docs/SchedulerEventWithCustomerInfo.md b/paas/docs/SchedulerEventWithCustomerInfo.md index 84b5295b..ba679df0 100644 --- a/paas/docs/SchedulerEventWithCustomerInfo.md +++ b/paas/docs/SchedulerEventWithCustomerInfo.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | +| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | | **schedule** | **com.fasterxml.jackson.databind.JsonNode** | a JSON value with schedule time configuration | [optional] | @@ -20,7 +20,7 @@ | **customerTitle** | **String** | Title of the customer | [optional] | | **customerIsPublic** | **Boolean** | Parameter that specifies if customer is public | [optional] [readonly] | | **timestamps** | **List\** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | diff --git a/paas/docs/SecretId.md b/paas/docs/SecretId.md index 47aa34fa..93863653 100644 --- a/paas/docs/SecretId.md +++ b/paas/docs/SecretId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.SecretId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/SelfRegistrationParams.md b/paas/docs/SelfRegistrationParams.md index a67a0180..4ba790dc 100644 --- a/paas/docs/SelfRegistrationParams.md +++ b/paas/docs/SelfRegistrationParams.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **permissions** | **List\** | | [optional] | | **type** | **SelfRegistrationType** | | | -| **showPrivacyPolicy** | **Boolean** | | [optional] | -| **showTermsOfUse** | **Boolean** | | [optional] | -| **title** | **String** | | [optional] | | **enabled** | **Boolean** | | [optional] | -| **homeDashboard** | **HomeDashboardParams** | | [optional] | -| **notificationRecipient** | **NotificationTargetId** | | [optional] | +| **title** | **String** | | [optional] | | **captcha** | **CaptchaParams** | | [optional] | +| **permissions** | **List\** | | [optional] | +| **notificationRecipient** | **NotificationTargetId** | | [optional] | | **signUpFields** | **List\** | | [optional] | -| **defaultDashboard** | **DefaultDashboardParams** | | [optional] | | **customerTitlePrefix** | **String** | | [optional] | -| **customMenuId** | **CustomMenuId** | | [optional] | +| **showPrivacyPolicy** | **Boolean** | | [optional] | +| **showTermsOfUse** | **Boolean** | | [optional] | +| **defaultDashboard** | **DefaultDashboardParams** | | [optional] | +| **homeDashboard** | **HomeDashboardParams** | | [optional] | | **customerGroupId** | **EntityGroupId** | | [optional] | +| **customMenuId** | **CustomMenuId** | | [optional] | diff --git a/paas/docs/ShortEntityView.md b/paas/docs/ShortEntityView.md index d4b7e211..6a69e94f 100644 --- a/paas/docs/ShortEntityView.md +++ b/paas/docs/ShortEntityView.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **EntityId** | Entity Id object | [readonly] | +| **id** | **EntityId** | Entity Id object | | | **name** | **String** | Name of the entity | [readonly] | diff --git a/paas/docs/Success.md b/paas/docs/Success.md index 9b3a48e7..238387cf 100644 --- a/paas/docs/Success.md +++ b/paas/docs/Success.md @@ -10,7 +10,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **generatedContent** | **String** | The text content generated by the model | [optional] | -| **status** | **String** | | [optional] | diff --git a/paas/docs/TbResourceId.md b/paas/docs/TbResourceId.md index f0463682..8e007b5c 100644 --- a/paas/docs/TbResourceId.md +++ b/paas/docs/TbResourceId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.TbResourceId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/TenantId.md b/paas/docs/TenantId.md index 40a30843..126fd3fb 100644 --- a/paas/docs/TenantId.md +++ b/paas/docs/TenantId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.TenantId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/TenantProfileId.md b/paas/docs/TenantProfileId.md index 828eb872..b60cca4e 100644 --- a/paas/docs/TenantProfileId.md +++ b/paas/docs/TenantProfileId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.TenantProfileId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/TimeSeriesOutput.md b/paas/docs/TimeSeriesOutput.md index 6407c70c..80699000 100644 --- a/paas/docs/TimeSeriesOutput.md +++ b/paas/docs/TimeSeriesOutput.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **strategy** | **TimeSeriesOutputStrategy** | | [optional] | diff --git a/paas/docs/TsKvEntry.md b/paas/docs/TsKvEntry.md index a9a8b78c..89ae6c19 100644 --- a/paas/docs/TsKvEntry.md +++ b/paas/docs/TsKvEntry.md @@ -10,10 +10,10 @@ | **ts** | **Long** | | [optional] | | **value** | **Object** | | [optional] | | **key** | **String** | | [optional] | +| **doubleValue** | **Double** | | [optional] | +| **longValue** | **Long** | | [optional] | | **booleanValue** | **Boolean** | | [optional] | | **valueAsString** | **String** | | [optional] | -| **longValue** | **Long** | | [optional] | -| **doubleValue** | **Double** | | [optional] | | **dataType** | **DataType** | | [optional] | | **jsonValue** | **String** | | [optional] | | **strValue** | **String** | | [optional] | diff --git a/paas/docs/User.md b/paas/docs/User.md index bf29719b..749c3a6f 100644 --- a/paas/docs/User.md +++ b/paas/docs/User.md @@ -21,7 +21,7 @@ A JSON value representing the User. | **customMenuId** | **CustomMenuId** | | [optional] | | **version** | **Long** | | [optional] | | **name** | **String** | Duplicates the email of the user, readonly | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the user. May include: 'defaultDashboardId' (string, UUID of the default dashboard), 'defaultDashboardFullscreen' (boolean), 'homeDashboardId' (string, UUID of the home dashboard), 'homeDashboardHideToolbar' (boolean), 'lang' (string, user locale, e.g. 'en_US'), 'authProviderName' (string, name of the authentication provider). | [optional] | diff --git a/paas/docs/UserId.md b/paas/docs/UserId.md index 8cca6337..f46eeb29 100644 --- a/paas/docs/UserId.md +++ b/paas/docs/UserId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.UserId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/UserInfo.md b/paas/docs/UserInfo.md index 05343c56..85a5b5a3 100644 --- a/paas/docs/UserInfo.md +++ b/paas/docs/UserInfo.md @@ -21,7 +21,7 @@ | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | | **name** | **String** | Duplicates the email of the user, readonly | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the user. May include: 'defaultDashboardId' (string, UUID of the default dashboard), 'defaultDashboardFullscreen' (boolean), 'homeDashboardId' (string, UUID of the home dashboard), 'homeDashboardHideToolbar' (boolean), 'lang' (string, user locale, e.g. 'en_US'), 'authProviderName' (string, name of the authentication provider). | [optional] | diff --git a/paas/docs/WebSelfRegistrationParams.md b/paas/docs/WebSelfRegistrationParams.md index cd848086..54b71f2a 100644 --- a/paas/docs/WebSelfRegistrationParams.md +++ b/paas/docs/WebSelfRegistrationParams.md @@ -9,22 +9,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **enabled** | **Boolean** | Indicates if self-registration is allowed via sign-up form | [optional] | -| **title** | **String** | The text message to appear on login form | | -| **captcha** | **CaptchaParams** | Captcha site key for 'I'm not a robot' validation | | -| **signUpFields** | **List\** | List of sign-up form fields | | -| **showPrivacyPolicy** | **Boolean** | Show or hide 'Privacy Policy' | [optional] | -| **showTermsOfUse** | **Boolean** | Show or hide 'Terms of Use' | [optional] | -| **notificationRecipient** | **NotificationTargetId** | Recipient to use for notifications when new user self-registered. | [optional] | -| **customerTitlePrefix** | **String** | Prefix to add to created customer | [optional] | -| **customerGroupId** | **EntityGroupId** | Id of the customer group customer wil be added to. | [optional] | -| **permissions** | **List\** | Group Permissions to assign for the new customer user. | | -| **defaultDashboard** | **DefaultDashboardParams** | Default dashboard params | [optional] | -| **homeDashboard** | **HomeDashboardParams** | Home dashboard params | [optional] | -| **customMenuId** | **CustomMenuId** | Custom menu id | [optional] | +| **domainId** | **DomainId** | Domain name for self registration URL. Typically this matches the domain name from the Login White Labeling page. | | | **privacyPolicy** | **String** | Privacy policy text. Supports HTML. | [optional] | | **termsOfUse** | **String** | Terms of User text. Supports HTML. | [optional] | -| **domainId** | **DomainId** | Domain name for self registration URL. Typically this matches the domain name from the Login White Labeling page. | | diff --git a/paas/docs/WebViewPage.md b/paas/docs/WebViewPage.md index 02e60f05..cf4e6bf8 100644 --- a/paas/docs/WebViewPage.md +++ b/paas/docs/WebViewPage.md @@ -10,7 +10,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **label** | **String** | Page label | [optional] | -| **visible** | **Boolean** | Indicates if page is visible | | | **icon** | **String** | URL of the page icon | [optional] | | **url** | **String** | Url | [optional] | diff --git a/paas/docs/WidgetTypeId.md b/paas/docs/WidgetTypeId.md index 0e778035..b69ab18f 100644 --- a/paas/docs/WidgetTypeId.md +++ b/paas/docs/WidgetTypeId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.WidgetTypeId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/docs/WidgetsBundleId.md b/paas/docs/WidgetsBundleId.md index b798823e..68f16a48 100644 --- a/paas/docs/WidgetsBundleId.md +++ b/paas/docs/WidgetsBundleId.md @@ -3,12 +3,12 @@ `org.thingsboard.client.model.WidgetsBundleId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | -| **entityType** | **EntityType** | string | | diff --git a/paas/spec/openapi.json b/paas/spec/openapi.json index fd4b298b..944dec72 100644 --- a/paas/spec/openapi.json +++ b/paas/spec/openapi.json @@ -113,6 +113,10 @@ "name": "dashboard-report-controller", "description": "Dashboard Report Controller" }, + { + "name": "device-api-controller", + "description": "Device Api Controller" + }, { "name": "device-connectivity-controller", "description": "Device Connectivity Controller" @@ -9575,7 +9579,7 @@ "api-key-controller" ], "summary": "Save API key for user (saveApiKey)", - "description": "Creates an API key for the given user and returns the token ONCE as 'ApiKey '.\n\nAvailable for any authorized user. ", + "description": "Creates an API key for the given user and returns the token ONCE as 'ApiKey \u003Cvalue\u003E'.\n\nAvailable for any authorized user. ", "operationId": "saveApiKey", "requestBody": { "content": { @@ -35751,19 +35755,190 @@ ] } }, - "/api/device-connectivity/gateway-launch/{deviceId}/docker-compose/download": { + "/api/v1/provision": { + "post": { + "tags": [ + "device-api-controller" + ], + "summary": "Provision new device (provisionDevice)", + "description": "Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: \n\n```json\n{\n \"deviceName\": \"NEW_DEVICE_NAME\",\n \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\",\n \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\"\n}\n```\n\nWhere 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials:\n\n```json\n{\n \"credentialsType\":\"ACCESS_TOKEN\",\n \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\",\n \"status\":\"SUCCESS\"\n}\n```\n\n", + "operationId": "provisionDevice", + "requestBody": { + "description": "JSON with provision request. See API call description for example.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + } + } + }, + "/api/v1/{deviceToken}/attributes": { "get": { "tags": [ - "device-connectivity-controller" + "device-api-controller" ], - "summary": "Download generated docker-compose.yml file for gateway (downloadGatewayDockerCompose)", - "description": "Download generated docker-compose.yml for gateway.", - "operationId": "downloadGatewayDockerCompose", + "summary": "Get attributes (getDeviceAttributes)", + "description": "Returns all attributes that belong to device. Use optional 'clientKeys' and/or 'sharedKeys' parameter to return specific attributes. \n Example of the result: \n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "getDeviceAttributes", "parameters": [ { - "name": "deviceId", + "name": "deviceToken", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Your device access token.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "clientKeys", + "in": "query", + "description": "Comma separated key names for attribute with client scope", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sharedKeys", + "in": "query", + "description": "Comma separated key names for attribute with shared scope", "required": true, "schema": { "type": "string" @@ -35774,10 +35949,9 @@ "200": { "description": "OK", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "string" } } } @@ -35902,57 +36076,44 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/device-connectivity/{deviceId}": { - "get": { + } + }, + "post": { "tags": [ - "device-connectivity-controller" + "device-api-controller" ], - "summary": "Get commands to publish device telemetry (getDevicePublishTelemetryCommands)", - "description": "Fetch the list of commands to publish device telemetry based on device profile If the user has the authority of 'Tenant Administrator', the server checks that the device is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the device is assigned to the same customer. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDevicePublishTelemetryCommands", + "summary": "Post attributes (postDeviceAttributes)", + "description": "Post client attribute updates on behalf of device. \n Example of the request: \n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "postDeviceAttributes", "parameters": [ { - "name": "deviceId", + "name": "deviceToken", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Your device access token.", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "description": "JSON with attribute key-value pairs. See API call description for example.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" - }, - "examples": { - "http": { - "description": "http", - "value": "curl -v -X POST http://localhost:8080/api/v1/0ySs4FTOn5WU15XLmal8/telemetry --header Content-Type:application/json --data {temperature:25}" - }, - "mqtt": { - "description": "mqtt", - "value": "mosquitto_pub -d -q 1 -h localhost -t v1/devices/me/telemetry -i myClient1 -u myUsername1 -P myPassword -m {temperature:25}" - }, - "coap": { - "description": "coap", - "value": "coap-client -m POST coap://localhost:5683/api/v1/0ySs4FTOn5WU15XLmal8/telemetry -t json -e {temperature:25}" - } + "type": "string" } } } @@ -35968,7 +36129,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -36077,44 +36238,46 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/device-connectivity/{protocol}/certificate/download": { + "/api/v1/{deviceToken}/attributes/updates": { "get": { "tags": [ - "device-connectivity-controller" + "device-api-controller" ], - "summary": "Download server certificate using file path defined in device.connectivity properties (downloadServerCertificate)", - "description": "Download server certificate.", - "operationId": "downloadServerCertificate", + "summary": "Subscribe to attribute updates (subscribeToAttributes) (Deprecated)", + "description": "Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. \n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "subscribeToAttributes", "parameters": [ { - "name": "protocol", + "name": "deviceToken", "in": "path", - "description": "A string value representing the device connectivity protocol. Possible values: 'mqtt', 'mqtts', 'http', 'https', 'coap', 'coaps'", + "description": "Your device access token.", "required": true, "schema": { "type": "string" } + }, + { + "name": "timeout", + "in": "query", + "description": "Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side.", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } } ], "responses": { "200": { "description": "OK", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "string" } } } @@ -36239,49 +36402,33 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/customer/device/{deviceName}/claim": { + "/api/v1/{deviceToken}/claim": { "post": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Claim device (claimDevice)", - "description": "Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. \nIn order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. \nSee official documentation for more details regarding claiming.\n\nAvailable for users with 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", - "operationId": "claimDevice", + "summary": "Save claiming information (saveClaimingInfo)", + "description": "Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation.\n Example of the request payload: \n\n```json\n{\"secretKey\":\"value\", \"durationMs\":60000}\n```\n\nNote: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used.\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "saveClaimingInfo", "parameters": [ { - "name": "deviceName", + "name": "deviceToken", "in": "path", - "description": "Unique name of the device which is going to be claimed", + "description": "Your device access token.", "required": true, "schema": { "type": "string" } - }, - { - "name": "subCustomerId", - "in": "query", - "required": false, - "schema": { - "type": "string" - } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ClaimRequest" + "type": "string" } } } @@ -36417,32 +36564,66 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - }, - "delete": { + } + } + }, + "/api/v1/{deviceToken}/firmware": { + "get": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Reclaim device (reClaimDevice)", - "description": "Reclaiming means the device will be unassigned from the customer and the device will be available for claiming again.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", - "operationId": "reClaimDevice", + "summary": "Get Device Firmware (getFirmware)", + "description": "Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. \n\nOptional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. \n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "getFirmware", "parameters": [ { - "name": "deviceName", + "name": "deviceToken", "in": "path", - "description": "Unique name of the device which is going to be reclaimed", + "description": "Your device access token.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "title", + "in": "query", + "description": "Title of the firmware, corresponds to the value of 'fw_title' attribute.", "required": true, "schema": { "type": "string" } + }, + { + "name": "version", + "in": "query", + "description": "Version of the firmware, corresponds to the value of 'fw_version' attribute.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "size", + "in": "query", + "description": "Size of the chunk. Optional. Omit to download the entire file without chunks.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "name": "chunk", + "in": "query", + "description": "Index of the chunk. Optional. Omit to download the entire file without chunks.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } } ], "responses": { @@ -36576,118 +36757,36 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/customer/{customerId}/deviceInfos": { + "/api/v1/{deviceToken}/rpc": { "get": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Get Customer Device Infos (getCustomerDeviceInfos)", - "description": "Returns a page of device info objects owned by the specified customer. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerDeviceInfos", + "summary": "Subscribe to RPC commands (subscribeToCommands) (Deprecated)", + "description": "Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. \n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "subscribeToCommands", "parameters": [ { - "name": "customerId", + "name": "deviceToken", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Your device access token.", "required": true, "schema": { "type": "string" } }, { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "active", - "in": "query", - "description": "A boolean value representing the device active flag.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", + "name": "timeout", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side.", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "integer", + "format": "int64", + "default": 0 } } ], @@ -36697,7 +36796,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceInfo" + "type": "string" } } } @@ -36822,134 +36921,64 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/customer/{customerId}/devices": { - "get": { + } + }, + "post": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Get Customer Devices (getCustomerDevices)", - "description": "Returns a page of devices objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerDevices", + "summary": "Send the RPC command (postRpcRequest)", + "description": "Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example:\n\n```json\n{\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}}\n```\n\nThe response contains arbitrary JSON with the RPC reply. For example: \n\n```json\n{\"result\": 4}\n```\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "postRpcRequest", "parameters": [ { - "name": "customerId", + "name": "deviceToken", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Your device access token.", "required": true, "schema": { "type": "string" } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "Device type as the name of the device profile", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], + "requestBody": { + "description": "The RPC request JSON", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "OK", + "description": "RPC request to server was sent to Rule Engine.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "type": "string" } } } }, "400": { - "description": "Bad Request", + "description": "Invalid structure of the request.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } + "type": "string" + } + } + } + }, + "413": { + "description": "Request payload too large.", + "content": { + "application/json": { + "schema": { + "type": "string" } } } @@ -37050,92 +37079,43 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/device": { + "/api/v1/{deviceToken}/rpc/{requestId}": { "post": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Create Or Update Device (saveDevice)", - "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error.\n\nDevice name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveDevice", + "summary": "Reply to RPC commands (replyToCommand)", + "description": "Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON.\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "replyToCommand", "parameters": [ { - "name": "accessToken", - "in": "query", - "description": "Optional value of the device credentials to be used during device creation. If omitted, access token will be auto-generated.", - "required": false, + "name": "deviceToken", + "in": "path", + "description": "Your device access token.", + "required": true, "schema": { "type": "string" } }, { - "name": "entityGroupId", - "in": "query", - "required": false, + "name": "requestId", + "in": "path", + "description": "RPC request id from the incoming RPC request", + "required": true, "schema": { "type": "string" } - }, - { - "name": "entityGroupIds", - "in": "query", - "description": "A list of entity group ids, separated by comma ','", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "nameConflictPolicy", - "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", - "required": false, - "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" - } - }, - { - "name": "uniquifySeparator", - "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", - "required": false, - "schema": { - "type": "string", - "default": "_" - } - }, - { - "name": "uniquifyStrategy", - "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", - "required": false, - "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" - } } ], "requestBody": { - "description": "A JSON value representing the device.", + "description": "Reply to the RPC request, JSON. For example: {\"status\":\"success\"}", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "string" } } }, @@ -37143,35 +37123,31 @@ }, "responses": { "200": { - "description": "OK", + "description": "RPC reply to command request was sent to Core.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "string" } } } }, "400": { - "description": "Bad Request", + "description": "Invalid structure of the request.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid request body", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } + "type": "string" + } + } + } + }, + "413": { + "description": "Request payload is too large.", + "content": { + "application/json": { + "schema": { + "type": "string" } } } @@ -37272,94 +37248,75 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/device-with-credentials": { - "post": { + "/api/v1/{deviceToken}/software": { + "get": { "tags": [ - "device-controller" + "device-api-controller" ], - "summary": "Create Device (saveDevice) with credentials ", - "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \"Access token\" with device profile ID below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: \"Access token\" with device profile default below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: \"X509\" with device profile ID below: \n\nNote: credentialsId - format Sha3Hash, certificateValue - format PEM (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: \"MQTT_BASIC\" with device profile ID below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of LwM2M device and RPK credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveDeviceWithCredentials", + "summary": "Get Device Software (getSoftware)", + "description": "Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. \n\nOptional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. \n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "getSoftware", "parameters": [ { - "name": "entityGroupId", - "in": "query", - "required": false, + "name": "deviceToken", + "in": "path", + "description": "Your device access token.", + "required": true, "schema": { "type": "string" } }, { - "name": "entityGroupIds", + "name": "title", "in": "query", - "description": "A list of entity group ids, separated by comma ','", - "required": false, + "description": "Title of the software, corresponds to the value of 'sw_title' attribute.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } }, { - "name": "nameConflictPolicy", + "name": "version", "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", - "required": false, + "description": "Version of the software, corresponds to the value of 'sw_version' attribute.", + "required": true, "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" + "type": "string" } }, { - "name": "uniquifySeparator", + "name": "size", "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", + "description": "Size of the chunk. Optional. Omit to download the entire file without using chunks.", "required": false, "schema": { - "type": "string", - "default": "_" + "type": "integer", + "format": "int32", + "default": 0 } }, { - "name": "uniquifyStrategy", + "name": "chunk", "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "description": "Index of the chunk. Optional. Omit to download the entire file without using chunks.", "required": false, "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" + "type": "integer", + "format": "int32", + "default": 0 } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SaveDeviceWithCredentialsRequest" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "string" } } } @@ -37375,7 +37332,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -37484,30 +37441,33 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/device/bulk_import": { + "/api/v1/{deviceToken}/telemetry": { "post": { "tags": [ - "device-controller" + "device-api-controller" + ], + "summary": "Post time series data (postTelemetry)", + "description": "Post time series data on behalf of device. \n Example of the request: The request payload is a JSON document with three possible formats:\n\nSimple format without timestamp. In such a case, current server time will be used: \n\n\n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\n\n\n\n Single JSON object with timestamp: \n\n\n\n```json\n{\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}\n```\n\n\n\n JSON array with timestamps: \n\n\n\n```json\n[\n{\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, \n{\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}}\n]\n```\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", + "operationId": "postTelemetry", + "parameters": [ + { + "name": "deviceToken", + "in": "path", + "description": "Your device access token.", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Import the bulk of devices (processDevicesBulkImport)", - "description": "There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "processDevicesBulkImport", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkImportRequest" + "type": "string" } } }, @@ -37519,7 +37479,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkImportResultDevice" + "type": "string" } } } @@ -37644,42 +37604,36 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/device/credentials": { - "post": { + "/api/device-connectivity/gateway-launch/{deviceId}/docker-compose/download": { + "get": { "tags": [ - "device-controller" + "device-connectivity-controller" ], - "summary": "Update device credentials (updateDeviceCredentials)", - "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials.\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \"Access token\" with device ID and with device ID below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: \"X509\" with device profile ID below: \n\nNote: credentialsId - format Sha3Hash, certificateValue - format PEM (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: \"MQTT_BASIC\" with device profile ID below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of LwM2M device and RPK credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "updateDeviceCredentials", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceCredentials" - } + "summary": "Download generated docker-compose.yml file for gateway (downloadGatewayDockerCompose)", + "description": "Download generated docker-compose.yml for gateway.", + "operationId": "downloadGatewayDockerCompose", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "$ref": "#/components/schemas/DeviceCredentials" + "type": "string", + "format": "binary" } } } @@ -37695,7 +37649,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -37815,14 +37769,14 @@ ] } }, - "/api/device/info/{deviceId}": { + "/api/device-connectivity/{deviceId}": { "get": { "tags": [ - "device-controller" + "device-connectivity-controller" ], - "summary": "Get Device (getDeviceInfoById)", - "description": "Fetch the Device info object based on the provided Device Id. Device Info is an extension of the default Device object that contains information about the owner name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getDeviceInfoById", + "summary": "Get commands to publish device telemetry (getDevicePublishTelemetryCommands)", + "description": "Fetch the list of commands to publish device telemetry based on device profile If the user has the authority of 'Tenant Administrator', the server checks that the device is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the device is assigned to the same customer. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDevicePublishTelemetryCommands", "parameters": [ { "name": "deviceId", @@ -37840,7 +37794,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceInfo" + "$ref": "#/components/schemas/JsonNode" + }, + "examples": { + "http": { + "description": "http", + "value": "curl -v -X POST http://localhost:8080/api/v1/0ySs4FTOn5WU15XLmal8/telemetry --header Content-Type:application/json --data {temperature:25}" + }, + "mqtt": { + "description": "mqtt", + "value": "mosquitto_pub -d -q 1 -h localhost -t v1/devices/me/telemetry -i myClient1 -u myUsername1 -P myPassword -m {temperature:25}" + }, + "coap": { + "description": "coap", + "value": "coap-client -m POST coap://localhost:5683/api/v1/0ySs4FTOn5WU15XLmal8/telemetry -t json -e {temperature:25}" + } } } } @@ -37976,24 +37944,33 @@ ] } }, - "/api/device/types": { + "/api/device-connectivity/{protocol}/certificate/download": { "get": { "tags": [ - "device-controller" + "device-connectivity-controller" + ], + "summary": "Download server certificate using file path defined in device.connectivity properties (downloadServerCertificate)", + "description": "Download server certificate.", + "operationId": "downloadServerCertificate", + "parameters": [ + { + "name": "protocol", + "in": "path", + "description": "A string value representing the device connectivity protocol. Possible values: 'mqtt', 'mqtts', 'http', 'https', 'coap', 'coaps'", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Get Device Types (getDeviceTypes)", - "description": "Deprecated. See 'getDeviceProfileNames' API from Device Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceTypes", "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitySubtype" - } + "type": "string", + "format": "binary" } } } @@ -38119,7 +38096,6 @@ } } }, - "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -38130,32 +38106,49 @@ ] } }, - "/api/device/{deviceId}": { - "get": { + "/api/customer/device/{deviceName}/claim": { + "post": { "tags": [ "device-controller" ], - "summary": "Get Device (getDeviceById)", - "description": "Fetch the Device object based on the provided Device Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getDeviceById", + "summary": "Claim device (claimDevice)", + "description": "Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. \nIn order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. \nSee official documentation for more details regarding claiming.\n\nAvailable for users with 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", + "operationId": "claimDevice", "parameters": [ { - "name": "deviceId", + "name": "deviceName", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Unique name of the device which is going to be claimed", "required": true, "schema": { "type": "string" } + }, + { + "name": "subCustomerId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClaimRequest" + } + } + } + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "string" } } } @@ -38171,7 +38164,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -38294,14 +38287,14 @@ "tags": [ "device-controller" ], - "summary": "Delete device (deleteDevice)", - "description": "Deletes the device, it's credentials and all the relations (from and to the device). Referencing non-existing device Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteDevice", + "summary": "Reclaim device (reClaimDevice)", + "description": "Reclaiming means the device will be unassigned from the customer and the device will be available for claiming again.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", + "operationId": "reClaimDevice", "parameters": [ { - "name": "deviceId", + "name": "deviceName", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Unique name of the device which is going to be reclaimed", "required": true, "schema": { "type": "string" @@ -38310,7 +38303,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } }, "400": { "description": "Bad Request", @@ -38443,23 +38443,108 @@ ] } }, - "/api/device/{deviceId}/credentials": { + "/api/customer/{customerId}/deviceInfos": { "get": { "tags": [ "device-controller" ], - "summary": "Get Device Credentials (getDeviceCredentialsByDeviceId)", - "description": "If during device creation there wasn't specified any credentials, platform generates random 'ACCESS_TOKEN' credentials.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ_CREDENTIALS' permission for the entity (entities).", - "operationId": "getDeviceCredentialsByDeviceId", + "summary": "Get Customer Device Infos (getCustomerDeviceInfos)", + "description": "Returns a page of device info objects owned by the specified customer. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerDeviceInfos", "parameters": [ { - "name": "deviceId", + "name": "customerId", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, "schema": { "type": "string" } + }, + { + "name": "active", + "in": "query", + "description": "A boolean value representing the device active flag.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -38468,7 +38553,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceCredentials" + "$ref": "#/components/schemas/PageDataDeviceInfo" } } } @@ -38604,15 +38689,24 @@ ] } }, - "/api/deviceInfos/all": { + "/api/customer/{customerId}/devices": { "get": { "tags": [ "device-controller" ], - "summary": "Get All Device Infos for current user (getAllDeviceInfos)", - "description": "Returns a page of device info objects owned by the tenant or the customer of a current user. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllDeviceInfos", + "summary": "Get Customer Devices (getCustomerDevices)", + "description": "Returns a page of devices objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerDevices", "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "pageSize", "in": "query", @@ -38634,32 +38728,14 @@ } }, { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "deviceProfileId", + "name": "type", "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Device type as the name of the device profile", "required": false, "schema": { "type": "string" } }, - { - "name": "active", - "in": "query", - "description": "A boolean value representing the device active flag.", - "required": false, - "schema": { - "type": "boolean" - } - }, { "name": "textSearch", "in": "query", @@ -38705,7 +38781,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceInfo" + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -38841,38 +38917,93 @@ ] } }, - "/api/devices": { - "get": { + "/api/device": { + "post": { "tags": [ "device-controller" ], - "summary": "Get Devices By Ids (getDevicesByIds)", - "description": "Requested devices must be owned by tenant or assigned to customer which user is performing the request. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getDevicesByIds", + "summary": "Create Or Update Device (saveDevice)", + "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error.\n\nDevice name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveDevice", "parameters": [ { - "name": "deviceIds", + "name": "accessToken", "in": "query", - "description": "A list of devices ids, separated by comma ','", - "required": true, + "description": "Optional value of the device credentials to be used during device creation. If omitted, access token will be auto-generated.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "entityGroupId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "entityGroupIds", + "in": "query", + "description": "A list of entity group ids, separated by comma ','", + "required": false, "schema": { "type": "array", "items": { "type": "string" } } + }, + { + "name": "nameConflictPolicy", + "in": "query", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", + "required": false, + "schema": { + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" + } + }, + { + "name": "uniquifySeparator", + "in": "query", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", + "required": false, + "schema": { + "type": "string", + "default": "_" + } + }, + { + "name": "uniquifyStrategy", + "in": "query", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "required": false, + "schema": { + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" + } } ], + "requestBody": { + "description": "A JSON value representing the device.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } + "$ref": "#/components/schemas/Device" } } } @@ -38888,7 +39019,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -39006,19 +39137,73 @@ "ApiKeyForm": [] } ] - }, + } + }, + "/api/device-with-credentials": { "post": { "tags": [ "device-controller" ], - "summary": "Find related devices (findDevicesByQuery)", - "description": "Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "findDevicesByQuery", + "summary": "Create Device (saveDevice) with credentials ", + "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile default\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"X509\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\nNote: \u003Cb\u003EcredentialsId\u003C/b\u003E - format \u003Cb\u003ESha3Hash\u003C/b\u003E, \u003Cb\u003EcertificateValue\u003C/b\u003E - format \u003Cb\u003EPEM\u003C/b\u003E (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"MQTT_BASIC\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of \u003Cb\u003ELwM2M\u003C/b\u003E device and \u003Cb\u003ERPK\u003C/b\u003E credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveDeviceWithCredentials", + "parameters": [ + { + "name": "entityGroupId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "entityGroupIds", + "in": "query", + "description": "A list of entity group ids, separated by comma ','", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "nameConflictPolicy", + "in": "query", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", + "required": false, + "schema": { + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" + } + }, + { + "name": "uniquifySeparator", + "in": "query", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", + "required": false, + "schema": { + "type": "string", + "default": "_" + } + }, + { + "name": "uniquifyStrategy", + "in": "query", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "required": false, + "schema": { + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceSearchQuery" + "$ref": "#/components/schemas/SaveDeviceWithCredentialsRequest" } } }, @@ -39030,10 +39215,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } + "$ref": "#/components/schemas/Device" } } } @@ -39169,46 +39351,31 @@ ] } }, - "/api/devices/count/{otaPackageType}/{deviceProfileId}": { - "get": { + "/api/device/bulk_import": { + "post": { "tags": [ "device-controller" ], - "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", - "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "countByDeviceProfileAndEmptyOtaPackage", - "parameters": [ - { - "name": "otaPackageType", - "in": "path", - "description": "OTA package type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "FIRMWARE", - "SOFTWARE" - ] + "summary": "Import the bulk of devices (processDevicesBulkImport)", + "description": "There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "processDevicesBulkImport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkImportRequest" + } } }, - { - "name": "deviceProfileId", - "in": "path", - "description": "Device Profile Id. I.g. '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/BulkImportResultDevice" } } } @@ -39224,7 +39391,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -39344,53 +39511,31 @@ ] } }, - "/api/devices/count/{otaPackageType}/{otaPackageId}/{entityGroupId}": { - "get": { + "/api/device/credentials": { + "post": { "tags": [ "device-controller" ], - "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", - "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "countByDeviceGroupAndEmptyOtaPackage", - "parameters": [ - { - "name": "otaPackageType", - "in": "path", - "description": "OTA package type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "FIRMWARE", - "SOFTWARE" - ] - } - }, - { - "name": "otaPackageId", - "in": "path", - "required": true, - "schema": { - "type": "string" + "summary": "Update device credentials (updateDeviceCredentials)", + "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials.\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice ID\u003C/b\u003E and with \u003Cb\u003Edevice ID\u003C/b\u003E below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: \u003Cb\u003E\"X509\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\nNote: \u003Cb\u003EcredentialsId\u003C/b\u003E - format \u003Cb\u003ESha3Hash\u003C/b\u003E, \u003Cb\u003EcertificateValue\u003C/b\u003E - format \u003Cb\u003EPEM\u003C/b\u003E (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: \u003Cb\u003E\"MQTT_BASIC\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of \u003Cb\u003ELwM2M\u003C/b\u003E device and \u003Cb\u003ERPK\u003C/b\u003E credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -\u003E \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "updateDeviceCredentials", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceCredentials" + } } }, - { - "name": "entityGroupId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/DeviceCredentials" } } } @@ -39406,7 +39551,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -39526,81 +39671,23 @@ ] } }, - "/api/entityGroup/{entityGroupId}/devices": { + "/api/device/info/{deviceId}": { "get": { "tags": [ "device-controller" ], - "summary": "Get devices by Entity Group Id (getDevicesByEntityGroupId)", - "description": "Returns a page of Device objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getDevicesByEntityGroupId", + "summary": "Get Device (getDeviceInfoById)", + "description": "Fetch the Device info object based on the provided Device Id. Device Info is an extension of the default Device object that contains information about the owner name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getDeviceInfoById", "parameters": [ { - "name": "entityGroupId", + "name": "deviceId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -39609,7 +39696,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "$ref": "#/components/schemas/DeviceInfo" } } } @@ -39745,32 +39832,24 @@ ] } }, - "/api/tenant/device": { + "/api/device/types": { "get": { "tags": [ "device-controller" ], - "summary": "Get Tenant Device (getTenantDevice)", - "description": "Requested device must be owned by tenant that the user belongs to. Device name is an unique property of device. So it can be used to identify the device.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getTenantDeviceByName", - "parameters": [ - { - "name": "deviceName", - "in": "query", - "description": "A string value representing the Device name.", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Get Device Types (getDeviceTypes)", + "description": "Deprecated. See 'getDeviceProfileNames' API from Device Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -39896,6 +39975,7 @@ } } }, + "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -39906,81 +39986,23 @@ ] } }, - "/api/tenant/devices": { + "/api/device/{deviceId}": { "get": { "tags": [ "device-controller" ], - "summary": "Get Tenant Devices (getTenantDevices)", - "description": "Returns a page of devices owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getTenantDevices", + "summary": "Get Device (getDeviceById)", + "description": "Fetch the Device object based on the provided Device Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getDeviceById", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "Device type as the name of the device profile", - "required": false, "schema": { "type": "string" } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -39989,7 +40011,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "$ref": "#/components/schemas/Device" } } } @@ -40123,26 +40145,169 @@ "ApiKeyForm": [] } ] - } - }, - "/api/tenant/{tenantId}/device/{deviceId}": { - "post": { + }, + "delete": { "tags": [ "device-controller" ], - "summary": "Assign device to tenant (assignDeviceToTenant)", - "description": "Creates assignment of the device to tenant. Thereafter tenant will be able to reassign the device to a customer.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'ASSIGN_TO_TENANT' permission for the entity (entities).", - "operationId": "assignDeviceToTenant", + "summary": "Delete device (deleteDevice)", + "description": "Deletes the device, it's credentials and all the relations (from and to the device). Referencing non-existing device Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteDevice", "parameters": [ { - "name": "tenantId", + "name": "deviceId", "in": "path", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/device/{deviceId}/credentials": { + "get": { + "tags": [ + "device-controller" + ], + "summary": "Get Device Credentials (getDeviceCredentialsByDeviceId)", + "description": "If during device creation there wasn't specified any credentials, platform generates random 'ACCESS_TOKEN' credentials.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ_CREDENTIALS' permission for the entity (entities).", + "operationId": "getDeviceCredentialsByDeviceId", + "parameters": [ { "name": "deviceId", "in": "path", @@ -40159,7 +40324,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "$ref": "#/components/schemas/DeviceCredentials" } } } @@ -40175,7 +40340,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -40295,14 +40460,14 @@ ] } }, - "/api/user/devices": { + "/api/deviceInfos/all": { "get": { "tags": [ "device-controller" ], - "summary": "Get Devices (getUserDevices)", - "description": "Returns a page of devices that are available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUserDevices", + "summary": "Get All Device Infos for current user (getAllDeviceInfos)", + "description": "Returns a page of device info objects owned by the tenant or the customer of a current user. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllDeviceInfos", "parameters": [ { "name": "pageSize", @@ -40310,8 +40475,8 @@ "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string", - "minimum": 1 + "type": "integer", + "format": "int32" } }, { @@ -40320,19 +40485,37 @@ "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string", - "minimum": 0 + "type": "integer", + "format": "int32" } }, { - "name": "type", + "name": "includeCustomers", "in": "query", - "description": "Device type as the name of the device profile", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": false, "schema": { "type": "string" } }, + { + "name": "active", + "in": "query", + "description": "A boolean value representing the device active flag.", + "required": false, + "schema": { + "type": "boolean" + } + }, { "name": "textSearch", "in": "query", @@ -40378,7 +40561,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "$ref": "#/components/schemas/PageDataDeviceInfo" } } } @@ -40514,30 +40697,38 @@ ] } }, - "/api/deviceGroupOtaPackage": { - "post": { + "/api/devices": { + "get": { "tags": [ - "device-group-ota-package-controller" + "device-controller" ], - "summary": "saveDeviceGroupOtaPackage", - "operationId": "saveDeviceGroupOtaPackage", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceGroupOtaPackage" + "summary": "Get Devices By Ids (getDevicesByIds)", + "description": "Requested devices must be owned by tenant or assigned to customer which user is performing the request. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getDevicesByIds", + "parameters": [ + { + "name": "deviceIds", + "in": "query", + "description": "A list of devices ids, separated by comma ','", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" } } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceGroupOtaPackage" + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } } } } @@ -40553,7 +40744,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -40671,40 +40862,34 @@ "ApiKeyForm": [] } ] - } - }, - "/api/deviceGroupOtaPackage/{groupId}/{firmwareType}": { - "get": { + }, + "post": { "tags": [ - "device-group-ota-package-controller" + "device-controller" ], - "summary": "getFirmwareById", - "operationId": "getFirmwareById", - "parameters": [ - { - "name": "groupId", - "in": "path", - "required": true, - "schema": { - "type": "string" + "summary": "Find related devices (findDevicesByQuery)", + "description": "Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "findDevicesByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceSearchQuery" + } } }, - { - "name": "firmwareType", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceGroupOtaPackage" + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } } } } @@ -40720,7 +40905,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -40840,17 +41025,32 @@ ] } }, - "/api/deviceGroupOtaPackage/{id}": { - "delete": { + "/api/devices/count/{otaPackageType}/{deviceProfileId}": { + "get": { "tags": [ - "device-group-ota-package-controller" + "device-controller" ], - "summary": "deleteDeviceGroupOtaPackage", - "operationId": "deleteDeviceGroupOtaPackage", + "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", + "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "countByDeviceProfileAndEmptyOtaPackage", "parameters": [ { - "name": "id", + "name": "otaPackageType", "in": "path", + "description": "OTA package type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] + } + }, + { + "name": "deviceProfileId", + "in": "path", + "description": "Device Profile Id. I.g. '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -40859,7 +41059,15 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } }, "400": { "description": "Bad Request", @@ -40992,31 +41200,53 @@ ] } }, - "/api/deviceProfile": { - "post": { + "/api/devices/count/{otaPackageType}/{otaPackageId}/{entityGroupId}": { + "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Create Or Update Device Profile (saveDeviceProfile)", - "description": "Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. \n\nDevice profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant.\n\n# Device profile data definition\n\nDevice profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. \n\n```json\n{\n \"alarms\":[\n ],\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"DISABLED\",\n \"provisionDeviceSecret\":null\n },\n \"transportConfiguration\":{\n \"type\":\"DEFAULT\"\n }\n}\n```\n\n```json\n{\n \"alarms\":[\n {\n \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\",\n \"alarmType\":\"Temperature Alarm\",\n \"clearRule\":{\n \"schedule\":null,\n \"condition\":{\n \"spec\":{\n \"type\":\"SIMPLE\"\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":30.0,\n \"dynamicValue\":null\n },\n \"operation\":\"LESS\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"propagate\":false,\n \"createRules\":{\n \"MAJOR\":{\n \"schedule\":{\n \"type\":\"SPECIFIC_TIME\",\n \"endsOn\":64800000,\n \"startsOn\":43200000,\n \"timezone\":\"Europe/Kiev\",\n \"daysOfWeek\":[\n 1,\n 3,\n 5\n ]\n },\n \"condition\":{\n \"spec\":{\n \"type\":\"DURATION\",\n \"unit\":\"MINUTES\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":30,\n \"dynamicValue\":null\n }\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"COMPLEX\",\n \"operation\":\"OR\",\n \"predicates\":[\n {\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":50.0,\n \"dynamicValue\":null\n },\n \"operation\":\"LESS_OR_EQUAL\"\n },\n {\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":30.0,\n \"dynamicValue\":null\n },\n \"operation\":\"GREATER\"\n }\n ]\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"WARNING\":{\n \"schedule\":{\n \"type\":\"CUSTOM\",\n \"items\":[\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":1\n },\n {\n \"endsOn\":64800000,\n \"enabled\":true,\n \"startsOn\":43200000,\n \"dayOfWeek\":2\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":3\n },\n {\n \"endsOn\":57600000,\n \"enabled\":true,\n \"startsOn\":36000000,\n \"dayOfWeek\":4\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":5\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":6\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":7\n }\n ],\n \"timezone\":\"Europe/Kiev\"\n },\n \"condition\":{\n \"spec\":{\n \"type\":\"REPEATING\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":5,\n \"dynamicValue\":null\n }\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"tempConstant\",\n \"type\":\"CONSTANT\"\n },\n \"value\":30,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":0.0,\n \"dynamicValue\":{\n \"inherit\":false,\n \"sourceType\":\"CURRENT_DEVICE\",\n \"sourceAttribute\":\"tempThreshold\"\n }\n },\n \"operation\":\"EQUAL\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"CRITICAL\":{\n \"schedule\":null,\n \"condition\":{\n \"spec\":{\n \"type\":\"SIMPLE\"\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":50.0,\n \"dynamicValue\":null\n },\n \"operation\":\"GREATER\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n }\n },\n \"propagateRelationTypes\":null\n }\n ],\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"ALLOW_CREATE_NEW_DEVICES\",\n \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\"\n },\n \"transportConfiguration\":{\n \"type\":\"MQTT\",\n \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\",\n \"deviceAttributesTopic\":\"v1/devices/me/attributes\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"PROTOBUF\",\n \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\",\n \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\",\n \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\",\n \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\"\n }\n }\n}\n```\n\nLet's review some specific objects examples related to the device profile configuration:\n\n# Alarm Schedule\n\nAlarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, \n\n```json\n\"schedule\": null\n```\n\nmeans alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week:\n\n## Specific Time Schedule\n\n```json\n{\n \"schedule\":{\n \"type\":\"SPECIFIC_TIME\",\n \"endsOn\":64800000,\n \"startsOn\":43200000,\n \"timezone\":\"Europe/Kiev\",\n \"daysOfWeek\":[\n 1,\n 3,\n 5\n ]\n }\n}\n```\n\n## Custom Schedule\n\n```json\n{\n \"schedule\":{\n \"type\":\"CUSTOM\",\n \"items\":[\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":1\n },\n {\n \"endsOn\":64800000,\n \"enabled\":true,\n \"startsOn\":43200000,\n \"dayOfWeek\":2\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":3\n },\n {\n \"endsOn\":57600000,\n \"enabled\":true,\n \"startsOn\":36000000,\n \"dayOfWeek\":4\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":5\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":6\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":7\n }\n ],\n \"timezone\":\"Europe/Kiev\"\n }\n}\n```\n\n# Alarm condition type (**'spec'**)\n\nAlarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes.\n\nNote, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent).\n\n**'sourceType'** of the **'sourceAttribute'** can be: \n * 'CURRENT_DEVICE';\n * 'CURRENT_CUSTOMER';\n * 'CURRENT_TENANT'.\n\n**'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER).\n\n## Repeating alarm condition\n\n```json\n{\n \"spec\":{\n \"type\":\"REPEATING\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":5,\n \"dynamicValue\":{\n \"inherit\":true,\n \"sourceType\":\"CURRENT_DEVICE\",\n \"sourceAttribute\":\"tempAttr\"\n }\n }\n }\n}\n```\n\n## Duration alarm condition\n\n```json\n{\n \"spec\":{\n \"type\":\"DURATION\",\n \"unit\":\"MINUTES\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":30,\n \"dynamicValue\":null\n }\n }\n}\n```\n\n**'unit'** can be: \n * 'SECONDS';\n * 'MINUTES';\n * 'HOURS';\n * 'DAYS'.\n\n# Key Filters\n\nKey filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object:\n\n## Alarm Filter Key\n\nFilter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported:\n * 'ATTRIBUTE' - used for attributes values;\n * 'TIME_SERIES' - used for time series values;\n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type;\n * 'CONSTANT' - constant value specified.\n\nLet's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value < 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value < 10 or value > 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\nYou may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below:\n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"inherit\": false,\n \"sourceType\": \"CURRENT_TENANT\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nNote that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true.\n\n# Provision Configuration\n\nThere are 3 types of device provision configuration for the device profile: \n * 'DISABLED';\n * 'ALLOW_CREATE_NEW_DEVICES';\n * 'CHECK_PRE_PROVISIONED_DEVICES'.\n\nPlease refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details.\n\n# Transport Configuration\n\n5 transport configuration types are available:\n * 'DEFAULT';\n * 'MQTT';\n * 'LWM2M';\n * 'COAP';\n * 'SNMP'.\n\nDefault type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types.\n\nSee another example of COAP transport configuration below:\n\n```json\n{\n \"type\":\"COAP\",\n \"clientSettings\":{\n \"edrxCycle\":null,\n \"powerMode\":\"DRX\",\n \"psmActivityTimer\":null,\n \"pagingTransmissionWindow\":null\n },\n \"coapDeviceTypeConfiguration\":{\n \"coapDeviceType\":\"DEFAULT\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"JSON\"\n }\n }\n}\n```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveDeviceProfile", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceProfile" - } + "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", + "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "countByDeviceGroupAndEmptyOtaPackage", + "parameters": [ + { + "name": "otaPackageType", + "in": "path", + "description": "OTA package type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] } }, - "required": true - }, + { + "name": "otaPackageId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityGroupId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfile" + "type": "integer", + "format": "int64" } } } @@ -41032,7 +41262,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -41152,23 +41382,81 @@ ] } }, - "/api/deviceProfile/devices/keys/attributes": { + "/api/entityGroup/{entityGroupId}/devices": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get attribute keys (getAttributesKeys)", - "description": "Get a set of unique attribute keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAttributesKeys", + "summary": "Get devices by Entity Group Id (getDevicesByEntityGroupId)", + "description": "Returns a page of Device objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getDevicesByEntityGroupId", "parameters": [ { - "name": "deviceProfileId", + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -41177,10 +41465,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -41316,20 +41601,20 @@ ] } }, - "/api/deviceProfile/devices/keys/timeseries": { + "/api/tenant/device": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get time series keys (getDeviceProfileTimeseriesKeys)", - "description": "Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getDeviceProfileTimeseriesKeys", + "summary": "Get Tenant Device (getTenantDevice)", + "description": "Requested device must be owned by tenant that the user belongs to. Device name is an unique property of device. So it can be used to identify the device.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getTenantDeviceByName", "parameters": [ { - "name": "deviceProfileId", + "name": "deviceName", "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, + "description": "A string value representing the Device name.", + "required": true, "schema": { "type": "string" } @@ -41341,10 +41626,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/Device" } } } @@ -41480,23 +41762,80 @@ ] } }, - "/api/deviceProfile/names": { + "/api/tenant/devices": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get Device Profile names (getDeviceProfileNames)", - "description": "Returns a set of unique device profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceProfileNames", + "summary": "Get Tenant Devices (getTenantDevices)", + "description": "Returns a page of devices owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getTenantDevices", "parameters": [ { - "name": "activeOnly", + "name": "pageSize", "in": "query", - "description": "Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices.", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "Device type as the name of the device profile", "required": false, "schema": { - "type": "boolean", - "default": false + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -41506,10 +41845,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityInfo" - } + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -41645,31 +41981,31 @@ ] } }, - "/api/deviceProfile/{deviceProfileId}": { - "get": { + "/api/tenant/{tenantId}/device/{deviceId}": { + "post": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get Device Profile (getDeviceProfileById)", - "description": "Fetch the Device Profile object based on the provided Device Profile Id. The server checks that the device profile is owned by the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getDeviceProfileById", + "summary": "Assign device to tenant (assignDeviceToTenant)", + "description": "Creates assignment of the device to tenant. Thereafter tenant will be able to reassign the device to a customer.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'ASSIGN_TO_TENANT' permission for the entity (entities).", + "operationId": "assignDeviceToTenant", "parameters": [ { - "name": "deviceProfileId", + "name": "tenantId", "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "inlineImages", - "in": "query", - "description": "Inline images as a data URL (Base64)", - "required": false, + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "boolean" + "type": "string" } } ], @@ -41679,7 +42015,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfile" + "$ref": "#/components/schemas/Device" } } } @@ -41695,7 +42031,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -41813,28 +42149,95 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/user/devices": { + "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Delete device profile (deleteDeviceProfile)", - "description": "Deletes the device profile. Referencing non-existing device profile Id will cause an error. Can't delete the device profile if it is referenced by existing devices.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteDeviceProfile", + "summary": "Get Devices (getUserDevices)", + "description": "Returns a page of devices that are available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserDevices", "parameters": [ { - "name": "deviceProfileId", - "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "type", + "in": "query", + "description": "Device type as the name of the device profile", + "required": false, "schema": { "type": "string" } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataDevice" + } + } + } }, "400": { "description": "Bad Request", @@ -41967,32 +42370,30 @@ ] } }, - "/api/deviceProfile/{deviceProfileId}/default": { + "/api/deviceGroupOtaPackage": { "post": { "tags": [ - "device-profile-controller" + "device-group-ota-package-controller" ], - "summary": "Make Device Profile Default (setDefaultDeviceProfile)", - "description": "Marks device profile as default within a tenant scope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setDefaultDeviceProfile", - "parameters": [ - { - "name": "deviceProfileId", - "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "saveDeviceGroupOtaPackage", + "operationId": "saveDeviceGroupOtaPackage", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceGroupOtaPackage" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfile" + "$ref": "#/components/schemas/DeviceGroupOtaPackage" } } } @@ -42128,21 +42529,38 @@ ] } }, - "/api/deviceProfileInfo/default": { + "/api/deviceGroupOtaPackage/{groupId}/{firmwareType}": { "get": { "tags": [ - "device-profile-controller" + "device-group-ota-package-controller" + ], + "summary": "getFirmwareById", + "operationId": "getFirmwareById", + "parameters": [ + { + "name": "groupId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "firmwareType", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Get Default Device Profile (getDefaultDeviceProfileInfo)", - "description": "Fetch the Default Device Profile Info object. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDefaultDeviceProfileInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfileInfo" + "$ref": "#/components/schemas/DeviceGroupOtaPackage" } } } @@ -42278,19 +42696,17 @@ ] } }, - "/api/deviceProfileInfo/{deviceProfileId}": { - "get": { + "/api/deviceGroupOtaPackage/{id}": { + "delete": { "tags": [ - "device-profile-controller" + "device-group-ota-package-controller" ], - "summary": "Get Device Profile Info (getDeviceProfileInfoById)", - "description": "Fetch the Device Profile Info object based on the provided Device Profile Id. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceProfileInfoById", + "summary": "deleteDeviceGroupOtaPackage", + "operationId": "deleteDeviceGroupOtaPackage", "parameters": [ { - "name": "deviceProfileId", + "name": "id", "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -42299,14 +42715,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceProfileInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -42439,98 +42848,31 @@ ] } }, - "/api/deviceProfileInfos": { - "get": { + "/api/deviceProfile": { + "post": { "tags": [ "device-profile-controller" ], - "summary": "Get Device Profiles for transport type (getDeviceProfileInfos)", - "description": "Returns a page of devices profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceProfileInfos", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device profile name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "transportType", - "description", - "isDefault" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "summary": "Create Or Update Device Profile (saveDeviceProfile)", + "description": "Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. \n\nDevice profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant.\n\n# Device profile data definition\n\nDevice profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. \n\n```json\n{\n \"alarms\":[\n ],\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"DISABLED\",\n \"provisionDeviceSecret\":null\n },\n \"transportConfiguration\":{\n \"type\":\"DEFAULT\"\n }\n}\n```\n\n```json\n{\n \"alarms\":[\n {\n \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\",\n \"alarmType\":\"Temperature Alarm\",\n \"clearRule\":{\n \"schedule\":null,\n \"condition\":{\n \"spec\":{\n \"type\":\"SIMPLE\"\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":30.0,\n \"dynamicValue\":null\n },\n \"operation\":\"LESS\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"propagate\":false,\n \"createRules\":{\n \"MAJOR\":{\n \"schedule\":{\n \"type\":\"SPECIFIC_TIME\",\n \"endsOn\":64800000,\n \"startsOn\":43200000,\n \"timezone\":\"Europe/Kiev\",\n \"daysOfWeek\":[\n 1,\n 3,\n 5\n ]\n },\n \"condition\":{\n \"spec\":{\n \"type\":\"DURATION\",\n \"unit\":\"MINUTES\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":30,\n \"dynamicValue\":null\n }\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"COMPLEX\",\n \"operation\":\"OR\",\n \"predicates\":[\n {\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":50.0,\n \"dynamicValue\":null\n },\n \"operation\":\"LESS_OR_EQUAL\"\n },\n {\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":30.0,\n \"dynamicValue\":null\n },\n \"operation\":\"GREATER\"\n }\n ]\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"WARNING\":{\n \"schedule\":{\n \"type\":\"CUSTOM\",\n \"items\":[\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":1\n },\n {\n \"endsOn\":64800000,\n \"enabled\":true,\n \"startsOn\":43200000,\n \"dayOfWeek\":2\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":3\n },\n {\n \"endsOn\":57600000,\n \"enabled\":true,\n \"startsOn\":36000000,\n \"dayOfWeek\":4\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":5\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":6\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":7\n }\n ],\n \"timezone\":\"Europe/Kiev\"\n },\n \"condition\":{\n \"spec\":{\n \"type\":\"REPEATING\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":5,\n \"dynamicValue\":null\n }\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"tempConstant\",\n \"type\":\"CONSTANT\"\n },\n \"value\":30,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":0.0,\n \"dynamicValue\":{\n \"inherit\":false,\n \"sourceType\":\"CURRENT_DEVICE\",\n \"sourceAttribute\":\"tempThreshold\"\n }\n },\n \"operation\":\"EQUAL\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"CRITICAL\":{\n \"schedule\":null,\n \"condition\":{\n \"spec\":{\n \"type\":\"SIMPLE\"\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":50.0,\n \"dynamicValue\":null\n },\n \"operation\":\"GREATER\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n }\n },\n \"propagateRelationTypes\":null\n }\n ],\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"ALLOW_CREATE_NEW_DEVICES\",\n \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\"\n },\n \"transportConfiguration\":{\n \"type\":\"MQTT\",\n \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\",\n \"deviceAttributesTopic\":\"v1/devices/me/attributes\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"PROTOBUF\",\n \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\",\n \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\",\n \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\",\n \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\"\n }\n }\n}\n```\n\nLet's review some specific objects examples related to the device profile configuration:\n\n# Alarm Schedule\n\nAlarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, \n\n```json\n\"schedule\": null\n```\n\nmeans alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week:\n\n## Specific Time Schedule\n\n```json\n{\n \"schedule\":{\n \"type\":\"SPECIFIC_TIME\",\n \"endsOn\":64800000,\n \"startsOn\":43200000,\n \"timezone\":\"Europe/Kiev\",\n \"daysOfWeek\":[\n 1,\n 3,\n 5\n ]\n }\n}\n```\n\n## Custom Schedule\n\n```json\n{\n \"schedule\":{\n \"type\":\"CUSTOM\",\n \"items\":[\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":1\n },\n {\n \"endsOn\":64800000,\n \"enabled\":true,\n \"startsOn\":43200000,\n \"dayOfWeek\":2\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":3\n },\n {\n \"endsOn\":57600000,\n \"enabled\":true,\n \"startsOn\":36000000,\n \"dayOfWeek\":4\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":5\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":6\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":7\n }\n ],\n \"timezone\":\"Europe/Kiev\"\n }\n}\n```\n\n# Alarm condition type (**'spec'**)\n\nAlarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes.\n\nNote, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent).\n\n**'sourceType'** of the **'sourceAttribute'** can be: \n * 'CURRENT_DEVICE';\n * 'CURRENT_CUSTOMER';\n * 'CURRENT_TENANT'.\n\n**'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER).\n\n## Repeating alarm condition\n\n```json\n{\n \"spec\":{\n \"type\":\"REPEATING\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":5,\n \"dynamicValue\":{\n \"inherit\":true,\n \"sourceType\":\"CURRENT_DEVICE\",\n \"sourceAttribute\":\"tempAttr\"\n }\n }\n }\n}\n```\n\n## Duration alarm condition\n\n```json\n{\n \"spec\":{\n \"type\":\"DURATION\",\n \"unit\":\"MINUTES\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":30,\n \"dynamicValue\":null\n }\n }\n}\n```\n\n**'unit'** can be: \n * 'SECONDS';\n * 'MINUTES';\n * 'HOURS';\n * 'DAYS'.\n\n# Key Filters\n\nKey filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object:\n\n## Alarm Filter Key\n\nFilter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported:\n * 'ATTRIBUTE' - used for attributes values;\n * 'TIME_SERIES' - used for time series values;\n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type;\n * 'CONSTANT' - constant value specified.\n\nLet's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value \u003C 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value \u003C 10 or value \u003E 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value \u003C 10 or (value \u003E 50 && value \u003C 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\nYou may also want to replace hardcoded values (for example, temperature \u003E 20) with the more dynamic expression (for example, temperature \u003E value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below:\n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"inherit\": false,\n \"sourceType\": \"CURRENT_TENANT\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nNote that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true.\n\n# Provision Configuration\n\nThere are 3 types of device provision configuration for the device profile: \n * 'DISABLED';\n * 'ALLOW_CREATE_NEW_DEVICES';\n * 'CHECK_PRE_PROVISIONED_DEVICES'.\n\nPlease refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details.\n\n# Transport Configuration\n\n5 transport configuration types are available:\n * 'DEFAULT';\n * 'MQTT';\n * 'LWM2M';\n * 'COAP';\n * 'SNMP'.\n\nDefault type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types.\n\nSee another example of COAP transport configuration below:\n\n```json\n{\n \"type\":\"COAP\",\n \"clientSettings\":{\n \"edrxCycle\":null,\n \"powerMode\":\"DRX\",\n \"psmActivityTimer\":null,\n \"pagingTransmissionWindow\":null\n },\n \"coapDeviceTypeConfiguration\":{\n \"coapDeviceType\":\"DEFAULT\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"JSON\"\n }\n }\n}\n```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveDeviceProfile", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceProfile" + } } }, - { - "name": "transportType", - "in": "query", - "description": "Type of the transport", - "required": false, - "schema": { - "type": "string", - "enum": [ - "DEFAULT", - "MQTT", - "COAP", - "LWM2M", - "SNMP" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceProfileInfo" + "$ref": "#/components/schemas/DeviceProfile" } } } @@ -42546,7 +42888,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -42666,25 +43008,22 @@ ] } }, - "/api/deviceProfileInfos/list": { + "/api/deviceProfile/devices/keys/attributes": { "get": { "tags": [ "device-profile-controller" ], - "summary": "Get Device Profile Infos By Ids (getDeviceProfileInfosByIds)", - "description": "Requested device profiles must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getDeviceProfileInfosByIds", + "summary": "Get attribute keys (getAttributesKeys)", + "description": "Get a set of unique attribute keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAttributesKeys", "parameters": [ { - "name": "deviceProfileIds", + "name": "deviceProfileId", "in": "query", - "description": "A list of device profile ids, separated by comma ','", - "required": true, + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -42696,7 +43035,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/DeviceProfileInfo" + "type": "string" } } } @@ -42833,73 +43172,23 @@ ] } }, - "/api/deviceProfiles": { + "/api/deviceProfile/devices/keys/timeseries": { "get": { "tags": [ "device-profile-controller" ], - "summary": "Get Device Profiles (getDeviceProfiles)", - "description": "Returns a page of devices profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getDeviceProfiles", + "summary": "Get time series keys (getDeviceProfileTimeseriesKeys)", + "description": "Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getDeviceProfileTimeseriesKeys", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", + "name": "deviceProfileId", "in": "query", - "description": "The case insensitive 'substring' filter based on the device profile name.", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "transportType", - "description", - "isDefault" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -42908,7 +43197,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceProfile" + "type": "array", + "items": { + "type": "string" + } } } } @@ -43044,45 +43336,36 @@ ] } }, - "/api/domain": { - "post": { + "/api/deviceProfile/names": { + "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Save or Update Domain (saveDomain)", - "description": "Create or update the Domain. When creating domain, platform generates Domain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Domain Id will be present in the response. Specify existing Domain Id to update the domain. Referencing non-existing Domain Id will cause 'Not Found' error.\n\nDomain name is unique for entire platform setup.\n\n\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveDomain", + "summary": "Get Device Profile names (getDeviceProfileNames)", + "description": "Returns a set of unique device profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileNames", "parameters": [ { - "name": "oauth2ClientIds", + "name": "activeOnly", "in": "query", - "description": "A list of oauth2 client registration ids, separated by comma ','", + "description": "Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices.", "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "boolean", + "default": false } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Domain" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Domain" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityInfo" + } } } } @@ -43098,7 +43381,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -43218,22 +43501,31 @@ ] } }, - "/api/domain/cloud/info/{id}": { + "/api/deviceProfile/{deviceProfileId}": { "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Get Domain info by Id (getCloudDomainInfoById)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCloudDomainInfoById", + "summary": "Get Device Profile (getDeviceProfileById)", + "description": "Fetch the Device Profile object based on the provided Device Profile Id. The server checks that the device profile is owned by the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getDeviceProfileById", "parameters": [ { - "name": "id", + "name": "deviceProfileId", "in": "path", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" + } + }, + { + "name": "inlineImages", + "in": "query", + "description": "Inline images as a data URL (Base64)", + "required": false, + "schema": { + "type": "boolean" } } ], @@ -43243,7 +43535,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DomainInfo" + "$ref": "#/components/schemas/DeviceProfile" } } } @@ -43377,37 +43669,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/domain/info/{id}": { - "get": { + }, + "delete": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Get Domain info by Id (getDomainInfoById)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDomainInfoById", + "summary": "Delete device profile (deleteDeviceProfile)", + "description": "Deletes the device profile. Referencing non-existing device profile Id will cause an error. Can't delete the device profile if it is referenced by existing devices.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteDeviceProfile", "parameters": [ { - "name": "id", + "name": "deviceProfileId", "in": "path", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DomainInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -43540,58 +43823,20 @@ ] } }, - "/api/domain/infos": { - "get": { + "/api/deviceProfile/{deviceProfileId}/default": { + "post": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Get Domain infos (getDomainInfos)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDomainInfos", + "summary": "Make Device Profile Default (setDefaultDeviceProfile)", + "description": "Marks device profile as default within a tenant scope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setDefaultDeviceProfile", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "deviceProfileId", + "in": "path", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on domain's name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, "schema": { "type": "string" } @@ -43603,7 +43848,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDomainInfo" + "$ref": "#/components/schemas/DeviceProfile" } } } @@ -43619,7 +43864,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -43739,28 +43984,24 @@ ] } }, - "/api/domain/{id}": { - "delete": { + "/api/deviceProfileInfo/default": { + "get": { "tags": [ - "domain-controller" - ], - "summary": "Delete Domain by ID (deleteDomain)", - "description": "Deletes Domain by ID. Referencing non-existing domain Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "deleteDomain", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "device-profile-controller" ], + "summary": "Get Default Device Profile (getDefaultDeviceProfileInfo)", + "description": "Fetch the Default Device Profile Info object. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDefaultDeviceProfileInfo", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceProfileInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -43893,43 +44134,36 @@ ] } }, - "/api/domain/{id}/oauth2Clients": { - "put": { + "/api/deviceProfileInfo/{deviceProfileId}": { + "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Update oauth2 clients (updateOauth2Clients)", - "description": "Update oauth2 clients for the specified domain. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "updateOauth2Clients", + "summary": "Get Device Profile Info (getDeviceProfileInfoById)", + "description": "Fetch the Device Profile Info object based on the provided Device Profile Id. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileInfoById", "parameters": [ { - "name": "id", + "name": "deviceProfileId", "in": "path", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceProfileInfo" } } } }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - }, "400": { "description": "Bad Request", "content": { @@ -44061,24 +44295,15 @@ ] } }, - "/api/customer/{customerId}/edgeInfos": { + "/api/deviceProfileInfos": { "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Get Customer Edge Infos (getCustomerEdgeInfos)", - "description": "Returns a page of edge info objects owned by the specified customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerEdgeInfos", + "summary": "Get Device Profiles for transport type (getDeviceProfileInfos)", + "description": "Returns a page of devices profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileInfos", "parameters": [ - { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pageSize", "in": "query", @@ -44099,28 +44324,10 @@ "format": "int32" } }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", + "description": "The case insensitive 'substring' filter based on the device profile name.", "required": false, "schema": { "type": "string" @@ -44137,8 +44344,9 @@ "createdTime", "name", "type", - "label", - "customerTitle" + "transportType", + "description", + "isDefault" ] } }, @@ -44154,6 +44362,22 @@ "DESC" ] } + }, + { + "name": "transportType", + "in": "query", + "description": "Type of the transport", + "required": false, + "schema": { + "type": "string", + "enum": [ + "DEFAULT", + "MQTT", + "COAP", + "LWM2M", + "SNMP" + ] + } } ], "responses": { @@ -44162,7 +44386,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdgeInfo" + "$ref": "#/components/schemas/PageDataDeviceProfileInfo" } } } @@ -44298,89 +44522,25 @@ ] } }, - "/api/customer/{customerId}/edges": { + "/api/deviceProfileInfos/list": { "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Get Customer Edges (getCustomerEdges)", - "description": "Returns a page of edges objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerEdges", + "summary": "Get Device Profile Infos By Ids (getDeviceProfileInfosByIds)", + "description": "Requested device profiles must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getDeviceProfileInfosByIds", "parameters": [ { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "deviceProfileIds", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A list of device profile ids, separated by comma ','", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "array", + "items": { + "type": "string" + } } } ], @@ -44390,7 +44550,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceProfileInfo" + } } } } @@ -44526,53 +44689,82 @@ ] } }, - "/api/edge": { - "post": { + "/api/deviceProfiles": { + "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Create Or Update Edge (saveEdge)", - "description": "Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error.\n\nEdge name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the edge names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Edge entity. ", - "operationId": "saveEdge", + "summary": "Get Device Profiles (getDeviceProfiles)", + "description": "Returns a page of devices profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getDeviceProfiles", "parameters": [ { - "name": "entityGroupId", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", "in": "query", + "description": "The case insensitive 'substring' filter based on the device profile name.", "required": false, "schema": { "type": "string" } }, { - "name": "entityGroupIds", + "name": "sortProperty", "in": "query", - "description": "A list of entity group ids, separated by comma ','", + "description": "Property of entity to sort by", "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "transportType", + "description", + "isDefault" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Edge" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/PageDataDeviceProfile" } } } @@ -44588,7 +44780,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -44708,19 +44900,33 @@ ] } }, - "/api/edge/bulk_import": { + "/api/domain": { "post": { "tags": [ - "edge-controller" + "domain-controller" + ], + "summary": "Save or Update Domain (saveDomain)", + "description": "Create or update the Domain. When creating domain, platform generates Domain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Domain Id will be present in the response. Specify existing Domain Id to update the domain. Referencing non-existing Domain Id will cause 'Not Found' error.\n\nDomain name is unique for entire platform setup.\n\n\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveDomain", + "parameters": [ + { + "name": "oauth2ClientIds", + "in": "query", + "description": "A list of oauth2 client registration ids, separated by comma ','", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } ], - "summary": "Import the bulk of edges (processEdgesBulkImport)", - "description": "There's an ability to import the bulk of edges using the only .csv file.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "processEdgesBulkImport", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkImportRequest" + "$ref": "#/components/schemas/Domain" } } }, @@ -44732,7 +44938,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkImportResultEdge" + "$ref": "#/components/schemas/Domain" } } } @@ -44868,22 +45074,22 @@ ] } }, - "/api/edge/info/{edgeId}": { + "/api/domain/cloud/info/{id}": { "get": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Get Edge Info (getEdgeInfoById)", - "description": "Get the Edge info object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeInfoById", + "summary": "Get Domain info by Id (getCloudDomainInfoById)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCloudDomainInfoById", "parameters": [ { - "name": "edgeId", + "name": "id", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], @@ -44893,7 +45099,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdgeInfo" + "$ref": "#/components/schemas/DomainInfo" } } } @@ -45029,36 +45235,22 @@ ] } }, - "/api/edge/instructions/install/{edgeId}/{method}": { + "/api/domain/info/{id}": { "get": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Get Edge Install Instructions (getEdgeInstallInstructions)", - "description": "Get an install instructions for provided edge id.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeInstallInstructions", + "summary": "Get Domain info by Id (getDomainInfoById)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDomainInfoById", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "method", + "name": "id", "in": "path", - "description": "Installation method ('docker', 'ubuntu' or 'centos')", "required": true, "schema": { "type": "string", - "enum": [ - "docker", - "ubuntu", - "centos" - ] + "format": "uuid" } } ], @@ -45068,7 +45260,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdgeInstructions" + "$ref": "#/components/schemas/DomainInfo" } } } @@ -45204,36 +45396,60 @@ ] } }, - "/api/edge/instructions/upgrade/{edgeVersion}/{method}": { + "/api/domain/infos": { "get": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Get Edge Upgrade Instructions (getEdgeUpgradeInstructions)", - "description": "Get an upgrade instructions for provided edge version.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeUpgradeInstructions", + "summary": "Get Domain infos (getDomainInfos)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDomainInfos", "parameters": [ { - "name": "edgeVersion", - "in": "path", - "description": "Edge version", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "method", - "in": "path", - "description": "Upgrade method ('docker', 'ubuntu' or 'centos')", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string", - "enum": [ - "docker", - "ubuntu", - "centos" - ] + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on domain's name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" } } ], @@ -45243,7 +45459,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdgeInstructions" + "$ref": "#/components/schemas/PageDataDomainInfo" } } } @@ -45379,35 +45595,28 @@ ] } }, - "/api/edge/missingToRelatedRuleChains/{edgeId}": { - "get": { + "/api/domain/{id}": { + "delete": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Find missing rule chains (findMissingToRelatedRuleChains)", - "description": "Returns list of rule chains ids that are not assigned to particular edge, but these rule chains are present in the already assigned rule chains to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "findMissingToRelatedRuleChains", + "summary": "Delete Domain by ID (deleteDomain)", + "description": "Deletes Domain by ID. Referencing non-existing domain Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteDomain", "parameters": [ { - "name": "edgeId", + "name": "id", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -45540,36 +45749,43 @@ ] } }, - "/api/edge/sync/{edgeId}": { - "post": { + "/api/domain/{id}/oauth2Clients": { + "put": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Sync edge (syncEdge)", - "description": "Starts synchronization process between edge and cloud. \nAll entities that are assigned to particular edge are going to be send to remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "syncEdge", + "summary": "Update oauth2 clients (updateOauth2Clients)", + "description": "Update oauth2 clients for the specified domain. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "updateOauth2Clients", "parameters": [ { - "name": "edgeId", + "name": "id", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" } } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -45581,7 +45797,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -45701,24 +45917,108 @@ ] } }, - "/api/edge/types": { + "/api/customer/{customerId}/edgeInfos": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Edge Types (getEdgeTypes)", - "description": "Returns a set of unique edge types based on edges that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeTypes", + "summary": "Get Customer Edge Infos (getCustomerEdgeInfos)", + "description": "Returns a page of edge info objects owned by the specified customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerEdgeInfos", + "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitySubtype" - } + "$ref": "#/components/schemas/PageDataEdgeInfo" } } } @@ -45854,23 +46154,90 @@ ] } }, - "/api/edge/{edgeId}": { + "/api/customer/{customerId}/edges": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Edge (getEdgeById)", - "description": "Get the Edge object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeById", + "summary": "Get Customer Edges (getCustomerEdges)", + "description": "Returns a page of edges objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerEdges", "parameters": [ { - "name": "edgeId", + "name": "customerId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -45879,7 +46246,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -46013,28 +46380,58 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/edge": { + "post": { "tags": [ "edge-controller" ], - "summary": "Delete edge (deleteEdge)", - "description": "Deletes the edge. Referencing non-existing edge Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteEdge", + "summary": "Create Or Update Edge (saveEdge)", + "description": "Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error.\n\nEdge name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the edge names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Edge entity. ", + "operationId": "saveEdge", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "entityGroupId", + "in": "query", + "required": false, "schema": { "type": "string" } + }, + { + "name": "entityGroupIds", + "in": "query", + "description": "A list of entity group ids, separated by comma ','", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Edge" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Edge" + } + } + } }, "400": { "description": "Bad Request", @@ -46047,7 +46444,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -46167,32 +46564,31 @@ ] } }, - "/api/edge/{edgeId}/upgrade/available": { - "get": { + "/api/edge/bulk_import": { + "post": { "tags": [ "edge-controller" ], - "summary": "Is edge upgrade enabled (isEdgeUpgradeAvailable)", - "description": "Returns 'true' if upgrade available for connected edge, 'false' - otherwise.", - "operationId": "isEdgeUpgradeAvailable", - "parameters": [ - { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Import the bulk of edges (processEdgesBulkImport)", + "description": "There's an ability to import the bulk of edges using the only .csv file.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "processEdgesBulkImport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkImportRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/BulkImportResultEdge" } } } @@ -46208,7 +46604,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -46328,14 +46724,14 @@ ] } }, - "/api/edge/{edgeId}/{ruleChainId}/root": { - "post": { + "/api/edge/info/{edgeId}": { + "get": { "tags": [ "edge-controller" ], - "summary": "Set root rule chain for provided edge (setEdgeRootRuleChain)", - "description": "Change root rule chain of the edge to the new provided rule chain. \nThis operation will send a notification to update root rule chain on remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setEdgeRootRuleChain", + "summary": "Get Edge Info (getEdgeInfoById)", + "description": "Get the Edge info object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeInfoById", "parameters": [ { "name": "edgeId", @@ -46345,15 +46741,6 @@ "schema": { "type": "string" } - }, - { - "name": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { @@ -46362,7 +46749,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/EdgeInfo" } } } @@ -46378,7 +46765,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -46498,88 +46885,35 @@ ] } }, - "/api/edgeInfos/all": { + "/api/edge/instructions/install/{edgeId}/{method}": { "get": { "tags": [ "edge-controller" ], - "summary": "Get All Edge Infos for current user (getAllEdgeInfos)", - "description": "Returns a page of edge info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllEdgeInfos", + "summary": "Get Edge Install Instructions (getEdgeInstallInstructions)", + "description": "Get an install instructions for provided edge id.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeInstallInstructions", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "name": "method", + "in": "path", + "description": "Installation method ('docker', 'ubuntu' or 'centos')", + "required": true, "schema": { "type": "string", "enum": [ - "ASC", - "DESC" + "docker", + "ubuntu", + "centos" ] } } @@ -46590,7 +46924,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdgeInfo" + "$ref": "#/components/schemas/EdgeInstructions" } } } @@ -46726,70 +47060,35 @@ ] } }, - "/api/edges": { + "/api/edge/instructions/upgrade/{edgeVersion}/{method}": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edges (getEdges)", - "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEdges", + "summary": "Get Edge Upgrade Instructions (getEdgeUpgradeInstructions)", + "description": "Get an upgrade instructions for provided edge version.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeUpgradeInstructions", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "edgeVersion", + "in": "path", + "description": "Edge version", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "name": "method", + "in": "path", + "description": "Upgrade method ('docker', 'ubuntu' or 'centos')", + "required": true, "schema": { "type": "string", "enum": [ - "ASC", - "DESC" + "docker", + "ubuntu", + "centos" ] } } @@ -46800,7 +47099,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "$ref": "#/components/schemas/EdgeInstructions" } } } @@ -46934,34 +47233,34 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/edge/missingToRelatedRuleChains/{edgeId}": { + "get": { "tags": [ "edge-controller" ], - "summary": "Find related edges (findEdgesByQuery)", - "description": "Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findEdgesByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EdgeSearchQuery" - } + "summary": "Find missing rule chains (findMissingToRelatedRuleChains)", + "description": "Returns list of rule chains ids that are not assigned to particular edge, but these rule chains are present in the already assigned rule chains to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "findMissingToRelatedRuleChains", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Edge" - } + "type": "string" } } } @@ -46977,7 +47276,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -47097,21 +47396,32 @@ ] } }, - "/api/edges/enabled": { - "get": { + "/api/edge/sync/{edgeId}": { + "post": { "tags": [ "edge-controller" ], - "summary": "Is edges support enabled (isEdgesSupportEnabled)", - "description": "Returns 'true' if edges support enabled on server, 'false' - otherwise.", - "operationId": "isEdgesSupportEnabled", + "summary": "Sync edge (syncEdge)", + "description": "Starts synchronization process between edge and cloud. \nAll entities that are assigned to particular edge are going to be send to remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "syncEdge", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "type": "string" } } } @@ -47127,7 +47437,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -47247,28 +47557,14 @@ ] } }, - "/api/edges/list": { + "/api/edge/types": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Edges By Ids (getEdgeList)", - "description": "Requested edges must be owned by tenant or assigned to customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeList", - "parameters": [ - { - "name": "edgeIds", - "in": "query", - "description": "A list of edges ids, separated by comma ','", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - ], + "summary": "Get Edge Types (getEdgeTypes)", + "description": "Returns a set of unique edge types based on edges that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeTypes", "responses": { "200": { "description": "OK", @@ -47277,7 +47573,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/EntitySubtype" } } } @@ -47414,81 +47710,23 @@ ] } }, - "/api/entityGroup/{entityGroupId}/edges": { + "/api/edge/{edgeId}": { "get": { "tags": [ "edge-controller" ], - "summary": "Get edges by Entity Group Id (getEdgesByEntityGroupId)", - "description": "Returns a page of Edge objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEdgesByEntityGroupId", + "summary": "Get Edge (getEdgeById)", + "description": "Get the Edge object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeById", "parameters": [ { - "name": "entityGroupId", + "name": "edgeId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -47497,7 +47735,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "$ref": "#/components/schemas/Edge" } } } @@ -47631,28 +47869,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/license/activateInstance": { - "post": { + }, + "delete": { "tags": [ "edge-controller" ], - "summary": "Activate edge instance (activateInstance)", - "description": "Activates edge license on license portal.", - "operationId": "activateInstance", + "summary": "Delete edge (deleteEdge)", + "description": "Deletes the edge. Referencing non-existing edge Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteEdge", "parameters": [ { - "name": "licenseSecret", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "releaseDate", - "in": "query", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -47661,14 +47890,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -47681,7 +47903,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -47801,31 +48023,32 @@ ] } }, - "/api/license/checkInstance": { - "post": { + "/api/edge/{edgeId}/upgrade/available": { + "get": { "tags": [ "edge-controller" ], - "summary": "Check edge license (checkInstance)", - "description": "Checks license request from edge service by forwarding request to license portal.", - "operationId": "checkInstance", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } + "summary": "Is edge upgrade enabled (isEdgeUpgradeAvailable)", + "description": "Returns 'true' if upgrade available for connected edge, 'false' - otherwise.", + "operationId": "isEdgeUpgradeAvailable", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "type": "boolean" } } } @@ -47841,7 +48064,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -47961,19 +48184,28 @@ ] } }, - "/api/tenant/edge": { - "get": { + "/api/edge/{edgeId}/{ruleChainId}/root": { + "post": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edge by name (getTenantEdgeByName)", - "description": "Requested edge must be owned by tenant or customer that the user belongs to. Edge name is an unique property of edge. So it can be used to identify the edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEdgeByName", + "summary": "Set root rule chain for provided edge (setEdgeRootRuleChain)", + "description": "Change root rule chain of the edge to the new provided rule chain. \nThis operation will send a notification to update root rule chain on remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setEdgeRootRuleChain", "parameters": [ { - "name": "edgeName", - "in": "query", - "description": "Unique name of the edge", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -48002,7 +48234,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -48122,14 +48354,14 @@ ] } }, - "/api/tenant/edges": { + "/api/edgeInfos/all": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edges (getTenantEdges)", - "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEdges", + "summary": "Get All Edge Infos for current user (getAllEdgeInfos)", + "description": "Returns a page of edge info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllEdgeInfos", "parameters": [ { "name": "pageSize", @@ -48151,6 +48383,15 @@ "format": "int32" } }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, { "name": "type", "in": "query", @@ -48205,7 +48446,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "$ref": "#/components/schemas/PageDataEdgeInfo" } } } @@ -48341,14 +48582,14 @@ ] } }, - "/api/user/edges": { + "/api/edges": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Edges (getUserEdges)", - "description": "Returns a page of edges available for current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUserEdges", + "summary": "Get Tenant Edges (getEdges)", + "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEdges", "parameters": [ { "name": "pageSize", @@ -48356,8 +48597,8 @@ "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string", - "minimum": 1 + "type": "integer", + "format": "int32" } }, { @@ -48366,17 +48607,8 @@ "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { @@ -48558,112 +48790,34 @@ "ApiKeyForm": [] } ] - } - }, - "/api/edge/{edgeId}/events": { - "get": { + }, + "post": { "tags": [ - "edge-event-controller" + "edge-controller" ], - "summary": "Get Edge Events (getEdgeEvents)", - "description": "Returns a page of edge events for the requested edge. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. ", - "operationId": "getEdgeEvents", - "parameters": [ - { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge event type name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Edge events with creation time before it won't be queried", - "required": false, - "schema": { - "type": "integer", - "format": "int64" + "summary": "Find related edges (findEdgesByQuery)", + "description": "Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findEdgesByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EdgeSearchQuery" + } } }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Edge events with creation time after it won't be queried", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdgeEvent" + "type": "array", + "items": { + "$ref": "#/components/schemas/Edge" + } } } } @@ -48679,7 +48833,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -48799,24 +48953,21 @@ ] } }, - "/api/entities/vc/branches": { + "/api/edges/enabled": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "List branches (listBranches)", - "description": "Lists branches available in the remote repository. \n\nResponse example: \n```json\n[\n {\n \"name\": \"master\",\n \"default\": true\n },\n {\n \"name\": \"dev\",\n \"default\": false\n },\n {\n \"name\": \"dev-2\",\n \"default\": false\n }\n]\n```", - "operationId": "listBranches", + "summary": "Is edges support enabled (isEdgesSupportEnabled)", + "description": "Returns 'true' if edges support enabled on server, 'false' - otherwise.", + "operationId": "isEdgesSupportEnabled", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BranchInfo" - } + "type": "boolean" } } } @@ -48952,41 +49103,25 @@ ] } }, - "/api/entities/vc/diff/{entityType}/{internalEntityUuid}": { + "/api/edges/list": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Compare entity data to version (compareEntityDataToVersion)", - "description": "Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "compareEntityDataToVersion", + "summary": "Get Edges By Ids (getEdgeList)", + "description": "Requested edges must be owned by tenant or assigned to customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeList", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "internalEntityUuid", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "versionId", + "name": "edgeIds", "in": "query", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "description": "A list of edges ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -48996,7 +49131,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityDataDiff" + "type": "array", + "items": { + "$ref": "#/components/schemas/Edge" + } } } } @@ -49132,32 +49270,90 @@ ] } }, - "/api/entities/vc/entity": { - "post": { + "/api/entityGroup/{entityGroupId}/edges": { + "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Load entities version (loadEntitiesVersion)", - "description": "Loads specific version of remote entities (or single entity) by request. Supported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are multiple types of request. Each of them requires branch name (`branch`) and version id (`versionId`). Request of type `SINGLE_ENTITY` is needed to restore a concrete version of a specific entity. It contains id of a remote entity (`externalEntityId`), internal entity id (`internalEntityId`) and additional configuration (`config`):\n- `loadRelations` - to update relations list (in case `saveRelations` option was enabled during version creation);\n- `loadAttributes` - to load entity attributes (if `saveAttributes` config option was enabled);\n- `loadCredentials` - to update device credentials (if `saveCredentials` option was enabled during version creation);\n- `loadPermissions` - when loading user group, to update group permission list;\n- `loadGroupEntities` - when loading an entity group, to load its entities as well;\n- `autoGenerateIntegrationKey` - if loading integration version, to autogenerate routing key.\n\nAn example of such request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n \n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n \n \"externalEntityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b7944123-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"loadRelations\": false,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n}\n```\n\nAnother request type (`ENTITY_TYPE`) is needed to load specific version of the whole entity types. It contains a structure with entity types to load and configs for each entity type (`entityTypes`). For each specified entity type, the method will load all remote entities of this type that are present at the version. A config for each entity type contains the same options as in `SINGLE_ENTITY` request type, and additionally contains following options:\n- `removeOtherEntities` - to remove local entities that are not present on the remote - basically to overwrite local entity type with the remote one;\n- `findExistingEntityByName` - when you are loading some remote entities that are not yet present at this tenant, try to find existing entity by name and update it rather than create new.\n\nHere is an example of the request to completely restore version of the whole device entity type:\n```json\n{\n \"type\": \"ENTITY_TYPE\",\n\n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n\n \"entityTypes\": {\n \"DEVICE\": {\n \"removeOtherEntities\": true,\n \"findExistingEntityByName\": false,\n \"loadRelations\": true,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n }\n}\n```\n\nThe response will contain generated request UUID that is to be used to check the status of operation via `getVersionLoadRequestStatus`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "loadEntitiesVersion", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionLoadRequest" - } + "summary": "Get edges by Entity Group Id (getEdgesByEntityGroupId)", + "description": "Returns a page of Edge objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEdgesByEntityGroupId", + "parameters": [ + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -49173,7 +49369,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -49293,28 +49489,26 @@ ] } }, - "/api/entities/vc/entity/{entityType}/{versionId}": { - "get": { + "/api/license/activateInstance": { + "post": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "List entities at version (listEntitiesAtVersion)", - "description": "Returns a list of remote entities of a specific entity type that are available at a concrete version. \nEach entity item in the result has `externalId` property. Entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listEntitiesAtVersion", + "summary": "Activate edge instance (activateInstance)", + "description": "Activates edge license on license portal.", + "operationId": "activateInstance", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "name": "licenseSecret", + "in": "query", "required": true, "schema": { - "$ref": "#/components/schemas/EntityType" + "type": "string" } }, { - "name": "versionId", - "in": "path", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "name": "releaseDate", + "in": "query", "required": true, "schema": { "type": "string" @@ -49327,10 +49521,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VersionedEntityInfo" - } + "$ref": "#/components/schemas/JsonNode" } } } @@ -49346,7 +49537,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -49466,33 +49657,31 @@ ] } }, - "/api/entities/vc/entity/{requestId}/status": { - "get": { + "/api/license/checkInstance": { + "post": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Get version load request status (getVersionLoadRequestStatus)", - "description": "Returns the status of previously made version load request. The structure contains following parameters:\n- `done` - if the request was successfully processed;\n- `result` - a list of load results for each entity type:\n - `created` - created entities count;\n - `updated` - updated entities count;\n - `deleted` - removed entities count;\n - `groupsCreated` - created entity groups count;\n - `groupsUpdated` - updated entity groups count;\n - `groupsDeleted` - removed entity groups count.\n- `error` - if an error occurred during processing, error info:\n - `type` - error type;\n - `source` - an external id of remote entity;\n - `target` - if failed to find referenced entity by external id - this external id;\n - `message` - error message.\n\nAn example of successfully processed request status:\n```json\n{\n \"done\": true,\n \"result\": [\n {\n \"entityType\": \"DEVICE\",\n \"created\": 10,\n \"updated\": 5,\n \"deleted\": 5,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 1,\n \"groupsDeleted\": 1\n },\n {\n \"entityType\": \"ASSET\",\n \"created\": 4,\n \"updated\": 0,\n \"deleted\": 8,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 0,\n \"groupsDeleted\": 2\n }\n ]\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getVersionLoadRequestStatus", - "parameters": [ - { - "name": "requestId", - "in": "path", - "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Check edge license (checkInstance)", + "description": "Checks license request from edge service by forwarding request to license portal.", + "operationId": "checkInstance", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VersionLoadResult" + "$ref": "#/components/schemas/JsonNode" } } } @@ -49508,7 +49697,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -49628,19 +49817,19 @@ ] } }, - "/api/entities/vc/entity/{versionId}": { + "/api/tenant/edge": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "List all entities at version (listAllEntitiesAtVersion)", - "description": "Returns a list of all remote entities available in a specific version. Response type is the same as for listAllEntitiesAtVersion API method. \nReturned entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listAllEntitiesAtVersion", + "summary": "Get Tenant Edge by name (getTenantEdgeByName)", + "description": "Requested edge must be owned by tenant or customer that the user belongs to. Edge name is an unique property of edge. So it can be used to identify the edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEdgeByName", "parameters": [ { - "name": "versionId", - "in": "path", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "name": "edgeName", + "in": "query", + "description": "Unique name of the edge", "required": true, "schema": { "type": "string" @@ -49653,10 +49842,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VersionedEntityInfo" - } + "$ref": "#/components/schemas/Edge" } } } @@ -49792,51 +49978,80 @@ ] } }, - "/api/entities/vc/info/{versionId}/{entityType}/{externalEntityUuid}": { + "/api/tenant/edges": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Get entity data info (getEntityDataInfo)", - "description": "Retrieves short info about the remote entity by external id at a concrete version. \nReturned entity data info contains following properties: `hasRelations` (whether stored entity data contains relations), `hasAttributes` (contains attributes), `hasCredentials` (whether stored device data has credentials), `hasPermissions` (user group data contains group permission list) and `hasGroupEntities` (entity group data contains group entities).\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEntityDataInfo", + "summary": "Get Tenant Edges (getTenantEdges)", + "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEdges", "parameters": [ { - "name": "versionId", - "in": "path", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "$ref": "#/components/schemas/EntityType" + "type": "integer", + "format": "int32" } }, { - "name": "externalEntityUuid", - "in": "path", - "description": "A string value representing external entity id", - "required": true, + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, "schema": { "type": "string", - "format": "uuid" + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] } }, { - "name": "internalEntityId", + "name": "sortOrder", "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { "type": "string", - "format": "uuid" + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -49846,7 +50061,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityDataInfo" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -49982,48 +50197,48 @@ ] } }, - "/api/entities/vc/version": { + "/api/user/edges": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "List all versions (listVersions)", - "description": "Lists all available versions in a branch for all entity types. \nIf specified branch does not exist - empty page data will be returned. The response format is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listVersions", + "summary": "Get Edges (getUserEdges)", + "description": "Returns a page of edges available for current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserEdges", "parameters": [ { - "name": "branch", + "name": "pageSize", "in": "query", - "description": "The name of the working branch, for example 'master'", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "string", + "minimum": 1 } }, { - "name": "pageSize", + "name": "page", "in": "query", - "description": "Maximum amount of entities in a one page", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "minimum": 0 } }, { - "name": "page", + "name": "type", "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, + "description": "A string value representing the edge type. For example, 'default'", + "required": false, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the entity version name.", + "description": "The case insensitive 'substring' filter based on the edge name.", "required": false, "schema": { "type": "string" @@ -50037,7 +50252,11 @@ "schema": { "type": "string", "enum": [ - "timestamp" + "createdTime", + "name", + "type", + "label", + "customerTitle" ] } }, @@ -50061,7 +50280,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityVersion" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -50195,32 +50414,112 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/edge/{edgeId}/events": { + "get": { "tags": [ - "entities-version-control-controller" + "edge-event-controller" ], - "summary": "Save entities version (saveEntitiesVersion)", - "description": "Creates a new version of entities (or a single entity) by request.\nSupported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are two available types of request: `SINGLE_ENTITY` and `COMPLEX`. Each of them contains version name (`versionName`) and name of a branch (`branch`) to create version (commit) in. If specified branch does not exists in a remote repo, then new empty branch will be created. Request of the `SINGLE_ENTITY` type has id of an entity (`entityId`) and additional configuration (`config`) which has following options: \n- `saveRelations` - whether to add inbound and outbound relations of type COMMON to created entity version;\n- `saveAttributes` - to save attributes of server scope (and also shared scope for devices);\n- `saveCredentials` - when saving a version of a device, to add its credentials to the version;\n- `savePermissions` - when saving a user group - to save group permission list;\n- `saveGroupEntities` - when saving an entity group - to save its entities as well.\n\nAn example of a `SINGLE_ENTITY` version create request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n\n \"versionName\": \"Version 1.0\",\n \"branch\": \"dev\",\n\n \"entityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": false\n }\n}\n```\n\nSecond request type (`COMPLEX`), additionally to `branch` and `versionName`, contains following properties:\n- `entityTypes` - a structure with entity types to export and configuration for each entity type; this configuration has all the options available for `SINGLE_ENTITY` and additionally has these ones: \n - `allEntities` and `entityIds` - if you want to save the version of all entities of the entity type then set `allEntities` param to true, otherwise set it to false and specify `entityIds` - in case entity type is group entity, list of specific entity groups, or if not - list of entities;\n - `syncStrategy` - synchronization strategy to use for this entity type: when set to `OVERWRITE` then the list of remote entities of this type will be overwritten by newly added entities. If set to `MERGE` - existing remote entities of this entity type will not be removed, new entities will just be added on top (or existing remote entities will be updated).\n- `syncStrategy` - default synchronization strategy to use when it is not specified for an entity type.\n\nExample for this type of request:\n```json\n{\n \"type\": \"COMPLEX\",\n\n \"versionName\": \"Devices and profiles: release 2\",\n \"branch\": \"master\",\n\n \"syncStrategy\": \"OVERWRITE\",\n \"entityTypes\": {\n \"DEVICE\": {\n \"syncStrategy\": null,\n \"allEntities\": true,\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": true\n },\n \"DEVICE_PROFILE\": {\n \"syncStrategy\": \"MERGE\",\n \"allEntities\": false,\n \"entityIds\": [\n \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n ],\n \"saveRelations\": true\n }\n }\n}\n```\n\nResponse wil contain generated request UUID, that can be then used to retrieve status of operation via `getVersionCreateRequestStatus`.\n\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveEntitiesVersion", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionCreateRequest" - } + "summary": "Get Edge Events (getEdgeEvents)", + "description": "Returns a page of edge events for the requested edge. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. ", + "operationId": "getEdgeEvents", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge event type name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "Timestamp. Edge events with creation time before it won't be queried", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Edge events with creation time after it won't be queried", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/PageDataEdgeEvent" } } } @@ -50236,7 +50535,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -50356,95 +50655,24 @@ ] } }, - "/api/entities/vc/version/{entityType}": { + "/api/entities/vc/branches": { "get": { "tags": [ "entities-version-control-controller" ], - "summary": "List entity type versions (listEntityTypeVersions)", - "description": "Returns list of versions of an entity type in a branch. This is a collected list of versions that were created for entities of this type in a remote branch. \nIf specified branch does not exist - empty page data will be returned. The response structure is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listEntityTypeVersions", - "parameters": [ - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "branch", - "in": "query", - "description": "The name of the working branch, for example 'master'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity version name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "timestamp" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "summary": "List branches (listBranches)", + "description": "Lists branches available in the remote repository. \n\nResponse example: \n```json\n[\n {\n \"name\": \"master\",\n \"default\": true\n },\n {\n \"name\": \"dev\",\n \"default\": false\n },\n {\n \"name\": \"dev-2\",\n \"default\": false\n }\n]\n```", + "operationId": "listBranches", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityVersion" + "type": "array", + "items": { + "$ref": "#/components/schemas/BranchInfo" + } } } } @@ -50580,14 +50808,14 @@ ] } }, - "/api/entities/vc/version/{entityType}/{externalEntityUuid}": { + "/api/entities/vc/diff/{entityType}/{internalEntityUuid}": { "get": { "tags": [ "entities-version-control-controller" ], - "summary": "List entity versions (listEntityVersions)", - "description": "Returns list of versions for a specific entity in a concrete branch. \nYou need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. \nIf specified branch does not exist - empty page data will be returned. \n\nEach version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe \"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe \"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe \"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listEntityVersions", + "summary": "Compare entity data to version (compareEntityDataToVersion)", + "description": "Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "compareEntityDataToVersion", "parameters": [ { "name": "entityType", @@ -50599,86 +50827,23 @@ } }, { - "name": "externalEntityUuid", + "name": "internalEntityUuid", "in": "path", - "description": "A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "branch", - "in": "query", - "description": "The name of the working branch, for example 'master'", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "internalEntityId", - "in": "query", - "required": false, "schema": { "type": "string", "format": "uuid" } }, { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "versionId", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity version name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "timestamp" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -50687,7 +50852,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityVersion" + "$ref": "#/components/schemas/EntityDataDiff" } } } @@ -50823,33 +50988,32 @@ ] } }, - "/api/entities/vc/version/{requestId}/status": { - "get": { + "/api/entities/vc/entity": { + "post": { "tags": [ "entities-version-control-controller" ], - "summary": "Get version create request status (getVersionCreateRequestStatus)", - "description": "Returns the status of previously made version create request. \n\nThis status contains following properties:\n- `done` - whether request processing is finished;\n- `version` - created version info: timestamp, version id (commit hash), commit name and commit author;\n- `added` - count of items that were created in the remote repo;\n- `modified` - modified items count;\n- `removed` - removed items count;\n- `error` - error message, if an error occurred while handling the request.\n\nAn example of successful status:\n```json\n{\n \"done\": true,\n \"added\": 10,\n \"modified\": 2,\n \"removed\": 5,\n \"version\": {\n \"timestamp\": 1655198528000,\n \"id\":\"8a834dd389ed80e0759ba8ee338b3f1fd160a114\",\n \"name\": \"My devices v2.0\",\n \"author\": \"John Doe\"\n },\n \"error\": null\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getVersionCreateRequestStatus", - "parameters": [ - { - "name": "requestId", - "in": "path", - "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Load entities version (loadEntitiesVersion)", + "description": "Loads specific version of remote entities (or single entity) by request. Supported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are multiple types of request. Each of them requires branch name (`branch`) and version id (`versionId`). Request of type `SINGLE_ENTITY` is needed to restore a concrete version of a specific entity. It contains id of a remote entity (`externalEntityId`), internal entity id (`internalEntityId`) and additional configuration (`config`):\n- `loadRelations` - to update relations list (in case `saveRelations` option was enabled during version creation);\n- `loadAttributes` - to load entity attributes (if `saveAttributes` config option was enabled);\n- `loadCredentials` - to update device credentials (if `saveCredentials` option was enabled during version creation);\n- `loadPermissions` - when loading user group, to update group permission list;\n- `loadGroupEntities` - when loading an entity group, to load its entities as well;\n- `autoGenerateIntegrationKey` - if loading integration version, to autogenerate routing key.\n\nAn example of such request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n \n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n \n \"externalEntityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b7944123-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"loadRelations\": false,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n}\n```\n\nAnother request type (`ENTITY_TYPE`) is needed to load specific version of the whole entity types. It contains a structure with entity types to load and configs for each entity type (`entityTypes`). For each specified entity type, the method will load all remote entities of this type that are present at the version. A config for each entity type contains the same options as in `SINGLE_ENTITY` request type, and additionally contains following options:\n- `removeOtherEntities` - to remove local entities that are not present on the remote - basically to overwrite local entity type with the remote one;\n- `findExistingEntityByName` - when you are loading some remote entities that are not yet present at this tenant, try to find existing entity by name and update it rather than create new.\n\nHere is an example of the request to completely restore version of the whole device entity type:\n```json\n{\n \"type\": \"ENTITY_TYPE\",\n\n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n\n \"entityTypes\": {\n \"DEVICE\": {\n \"removeOtherEntities\": true,\n \"findExistingEntityByName\": false,\n \"loadRelations\": true,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n }\n}\n```\n\nThe response will contain generated request UUID that is to be used to check the status of operation via `getVersionLoadRequestStatus`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "loadEntitiesVersion", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionLoadRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VersionCreationResult" + "type": "string", + "format": "uuid" } } } @@ -50865,7 +51029,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -50985,38 +51149,31 @@ ] } }, - "/api/allEntityGroups/edge/{edgeId}/{groupType}": { + "/api/entities/vc/entity/{entityType}/{versionId}": { "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Get All Edge Entity Groups by entity type (getAllEdgeEntityGroups)", - "description": "Fetch the list of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllEdgeEntityGroups", + "summary": "List entities at version (listEntitiesAtVersion)", + "description": "Returns a list of remote entities of a specific entity type that are available at a concrete version. \nEach entity item in the result has `externalId` property. Entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntitiesAtVersion", "parameters": [ { - "name": "edgeId", + "name": "entityType", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/EntityType" } }, { - "name": "groupType", + "name": "versionId", "in": "path", - "description": "EntityGroup type", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "required": true, "schema": { - "type": "string", - "enum": [ - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD" - ] + "type": "string" } } ], @@ -51028,7 +51185,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityGroupInfo" + "$ref": "#/components/schemas/VersionedEntityInfo" } } } @@ -51165,44 +51322,181 @@ ] } }, - "/api/edge/{edgeId}/entityGroup/{entityGroupId}/{groupType}": { - "post": { + "/api/entities/vc/entity/{requestId}/status": { + "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Assign entity group to edge (assignEntityGroupToEdge)", - "description": "Creates assignment of an existing entity group to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once entity group will be delivered to edge service, edge will request entities of this group to be send to edge. Once entities will be delivered to edge service, they are going to be available for usage on remote edge instance.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "assignEntityGroupToEdge", + "summary": "Get version load request status (getVersionLoadRequestStatus)", + "description": "Returns the status of previously made version load request. The structure contains following parameters:\n- `done` - if the request was successfully processed;\n- `result` - a list of load results for each entity type:\n - `created` - created entities count;\n - `updated` - updated entities count;\n - `deleted` - removed entities count;\n - `groupsCreated` - created entity groups count;\n - `groupsUpdated` - updated entity groups count;\n - `groupsDeleted` - removed entity groups count.\n- `error` - if an error occurred during processing, error info:\n - `type` - error type;\n - `source` - an external id of remote entity;\n - `target` - if failed to find referenced entity by external id - this external id;\n - `message` - error message.\n\nAn example of successfully processed request status:\n```json\n{\n \"done\": true,\n \"result\": [\n {\n \"entityType\": \"DEVICE\",\n \"created\": 10,\n \"updated\": 5,\n \"deleted\": 5,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 1,\n \"groupsDeleted\": 1\n },\n {\n \"entityType\": \"ASSET\",\n \"created\": 4,\n \"updated\": 0,\n \"deleted\": 8,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 0,\n \"groupsDeleted\": 2\n }\n ]\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getVersionLoadRequestStatus", "parameters": [ { - "name": "edgeId", + "name": "requestId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionLoadResult" + } + } } }, - { - "name": "groupType", - "in": "path", - "description": "EntityGroup type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD" - ] + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ { - "name": "entityGroupId", + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/entities/vc/entity/{versionId}": { + "get": { + "tags": [ + "entities-version-control-controller" + ], + "summary": "List all entities at version (listAllEntitiesAtVersion)", + "description": "Returns a list of all remote entities available in a specific version. Response type is the same as for listAllEntitiesAtVersion API method. \nReturned entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listAllEntitiesAtVersion", + "parameters": [ + { + "name": "versionId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "required": true, "schema": { "type": "string" @@ -51215,7 +51509,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroup" + "type": "array", + "items": { + "$ref": "#/components/schemas/VersionedEntityInfo" + } } } } @@ -51231,7 +51528,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -51349,47 +51646,53 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/entities/vc/info/{versionId}/{entityType}/{externalEntityUuid}": { + "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Unassign entity group from edge (unassignEntityGroupFromEdge)", - "description": "Clears assignment of the entity group to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity group and entities inside this group locally.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "unassignEntityGroupFromEdge", + "summary": "Get entity data info (getEntityDataInfo)", + "description": "Retrieves short info about the remote entity by external id at a concrete version. \nReturned entity data info contains following properties: `hasRelations` (whether stored entity data contains relations), `hasAttributes` (contains attributes), `hasCredentials` (whether stored device data has credentials), `hasPermissions` (user group data contains group permission list) and `hasGroupEntities` (entity group data contains group entities).\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEntityDataInfo", "parameters": [ { - "name": "edgeId", + "name": "versionId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "required": true, "schema": { "type": "string" } }, { - "name": "groupType", + "name": "entityType", "in": "path", - "description": "EntityGroup type", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { - "type": "string", - "enum": [ - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD" - ] + "$ref": "#/components/schemas/EntityType" } }, { - "name": "entityGroupId", + "name": "externalEntityUuid", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing external entity id", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" + } + }, + { + "name": "internalEntityId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string", + "format": "uuid" } } ], @@ -51399,7 +51702,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroup" + "$ref": "#/components/schemas/EntityDataInfo" } } } @@ -51535,31 +51838,86 @@ ] } }, - "/api/entityGroup": { - "post": { + "/api/entities/vc/version": { + "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Create Or Update Entity Group (saveEntityGroup)", - "description": "Create or update the Entity Group. When creating Entity Group, platform generates Entity Group Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Entity Group Id will be present in the response. Specify existing Entity Group Id to update the group. Referencing non-existing Entity Group Id will cause 'Not Found' error.Remove 'id', 'tenantId' and optionally 'ownerId' from the request body example (below) to create new Entity Group entity. When 'ownerId' is not set (or null), it defaults to the current user's owner (Tenant for tenant admins, Customer for customer users). \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "saveEntityGroup", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityGroup" - } + "summary": "List all versions (listVersions)", + "description": "Lists all available versions in a branch for all entity types. \nIf specified branch does not exist - empty page data will be returned. The response format is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listVersions", + "parameters": [ + { + "name": "branch", + "in": "query", + "description": "The name of the working branch, for example 'master'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity version name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "timestamp" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroupInfo" + "$ref": "#/components/schemas/PageDataEntityVersion" } } } @@ -51575,7 +51933,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -51693,66 +52051,32 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entityGroup/all/{ownerType}/{ownerId}/{groupType}": { - "get": { + }, + "post": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Get special group All by owner and entity type (getEntityGroupsByOwnerAndType)", - "description": "Fetch reserved group 'All' based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupAllByOwnerAndType", - "parameters": [ - { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] + "summary": "Save entities version (saveEntitiesVersion)", + "description": "Creates a new version of entities (or a single entity) by request.\nSupported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are two available types of request: `SINGLE_ENTITY` and `COMPLEX`. Each of them contains version name (`versionName`) and name of a branch (`branch`) to create version (commit) in. If specified branch does not exists in a remote repo, then new empty branch will be created. Request of the `SINGLE_ENTITY` type has id of an entity (`entityId`) and additional configuration (`config`) which has following options: \n- `saveRelations` - whether to add inbound and outbound relations of type COMMON to created entity version;\n- `saveAttributes` - to save attributes of server scope (and also shared scope for devices);\n- `saveCredentials` - when saving a version of a device, to add its credentials to the version;\n- `savePermissions` - when saving a user group - to save group permission list;\n- `saveGroupEntities` - when saving an entity group - to save its entities as well.\n\nAn example of a `SINGLE_ENTITY` version create request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n\n \"versionName\": \"Version 1.0\",\n \"branch\": \"dev\",\n\n \"entityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": false\n }\n}\n```\n\nSecond request type (`COMPLEX`), additionally to `branch` and `versionName`, contains following properties:\n- `entityTypes` - a structure with entity types to export and configuration for each entity type; this configuration has all the options available for `SINGLE_ENTITY` and additionally has these ones: \n - `allEntities` and `entityIds` - if you want to save the version of all entities of the entity type then set `allEntities` param to true, otherwise set it to false and specify `entityIds` - in case entity type is group entity, list of specific entity groups, or if not - list of entities;\n - `syncStrategy` - synchronization strategy to use for this entity type: when set to `OVERWRITE` then the list of remote entities of this type will be overwritten by newly added entities. If set to `MERGE` - existing remote entities of this entity type will not be removed, new entities will just be added on top (or existing remote entities will be updated).\n- `syncStrategy` - default synchronization strategy to use when it is not specified for an entity type.\n\nExample for this type of request:\n```json\n{\n \"type\": \"COMPLEX\",\n\n \"versionName\": \"Devices and profiles: release 2\",\n \"branch\": \"master\",\n\n \"syncStrategy\": \"OVERWRITE\",\n \"entityTypes\": {\n \"DEVICE\": {\n \"syncStrategy\": null,\n \"allEntities\": true,\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": true\n },\n \"DEVICE_PROFILE\": {\n \"syncStrategy\": \"MERGE\",\n \"allEntities\": false,\n \"entityIds\": [\n \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n ],\n \"saveRelations\": true\n }\n }\n}\n```\n\nResponse wil contain generated request UUID, that can be then used to retrieve status of operation via `getVersionCreateRequestStatus`.\n\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveEntitiesVersion", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionCreateRequest" + } } }, - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the Tenant or Customer id", - "required": true, - "schema": { - "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - { - "name": "groupType", - "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroupInfo" + "type": "string", + "format": "uuid" } } } @@ -51768,7 +52092,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -51888,23 +52212,86 @@ ] } }, - "/api/entityGroup/{entityGroupId}": { + "/api/entities/vc/version/{entityType}": { "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Get Entity Group Info (getEntityGroupById)", - "description": "Fetch the Entity Group object based on the provided Entity Group Id. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupById", + "summary": "List entity type versions (listEntityTypeVersions)", + "description": "Returns list of versions of an entity type in a branch. This is a collected list of versions that were created for entities of this type in a remote branch. \nIf specified branch does not exist - empty page data will be returned. The response structure is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntityTypeVersions", "parameters": [ { - "name": "entityGroupId", + "name": "entityType", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "branch", + "in": "query", + "description": "The name of the working branch, for example 'master'", "required": true, "schema": { "type": "string" } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity version name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "timestamp" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -51913,7 +52300,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroupInfo" + "$ref": "#/components/schemas/PageDataEntityVersion" } } } @@ -52047,28 +52434,119 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/entities/vc/version/{entityType}/{externalEntityUuid}": { + "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Delete Entity Group (deleteEntityGroup)", - "description": "Deletes the entity group but does not delete the entities in the group, since they are also present in reserved group 'All'. Referencing non-existing Entity Group Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for specified group.", - "operationId": "deleteEntityGroup", + "summary": "List entity versions (listEntityVersions)", + "description": "Returns list of versions for a specific entity in a concrete branch. \nYou need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. \nIf specified branch does not exist - empty page data will be returned. \n\nEach version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntityVersions", "parameters": [ { - "name": "entityGroupId", + "name": "entityType", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "externalEntityUuid", + "in": "path", + "description": "A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "branch", + "in": "query", + "description": "The name of the working branch, for example 'master'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "internalEntityId", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity version name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "timestamp" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityVersion" + } + } + } }, "400": { "description": "Bad Request", @@ -52201,43 +52679,37 @@ ] } }, - "/api/entityGroup/{entityGroupId}/addEntities": { - "post": { + "/api/entities/vc/version/{requestId}/status": { + "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Add entities to the group (addEntitiesToEntityGroup)", - "description": "Add entities to the specified entity group. This operation is idempotent: entities that are already members of the group are silently ignored. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'ADD_TO_GROUP' permission for specified group.", - "operationId": "addEntitiesToEntityGroup", + "summary": "Get version create request status (getVersionCreateRequestStatus)", + "description": "Returns the status of previously made version create request. \n\nThis status contains following properties:\n- `done` - whether request processing is finished;\n- `version` - created version info: timestamp, version id (commit hash), commit name and commit author;\n- `added` - count of items that were created in the remote repo;\n- `modified` - modified items count;\n- `removed` - removed items count;\n- `error` - error message, if an error occurred while handling the request.\n\nAn example of successful status:\n```json\n{\n \"done\": true,\n \"added\": 10,\n \"modified\": 2,\n \"removed\": 5,\n \"version\": {\n \"timestamp\": 1655198528000,\n \"id\":\"8a834dd389ed80e0759ba8ee338b3f1fd160a114\",\n \"name\": \"My devices v2.0\",\n \"author\": \"John Doe\"\n },\n \"error\": null\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getVersionCreateRequestStatus", "parameters": [ { - "name": "entityGroupId", + "name": "requestId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "A list of entity ids", - "items": { - "type": "string" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionCreationResult" } } } }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - }, "400": { "description": "Bad Request", "content": { @@ -52249,7 +52721,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -52369,43 +52841,55 @@ ] } }, - "/api/entityGroup/{entityGroupId}/deleteEntities": { - "post": { + "/api/allEntityGroups/edge/{edgeId}/{groupType}": { + "get": { "tags": [ "entity-group-controller" ], - "summary": "Remove entities from the group (removeEntitiesFromEntityGroup)", - "description": "Removes entities from the specified entity group. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'REMOVE_FROM_GROUP' permission for specified group.", - "operationId": "removeEntitiesFromEntityGroup", + "summary": "Get All Edge Entity Groups by entity type (getAllEdgeEntityGroups)", + "description": "Fetch the list of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllEdgeEntityGroups", "parameters": [ { - "name": "entityGroupId", + "name": "edgeId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "groupType", + "in": "path", + "description": "EntityGroup type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD" + ] + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "A list of entity ids", - "items": { - "type": "string" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } } } } }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - }, "400": { "description": "Bad Request", "content": { @@ -52417,7 +52901,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -52537,74 +53021,48 @@ ] } }, - "/api/entityGroup/{entityGroupId}/entities": { - "get": { + "/api/edge/{edgeId}/entityGroup/{entityGroupId}/{groupType}": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Group Entities (getEntities)", - "description": "Returns a page of Short Entity View objects that belongs to specified Entity Group Id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntities", + "summary": "Assign entity group to edge (assignEntityGroupToEdge)", + "description": "Creates assignment of an existing entity group to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once entity group will be delivered to edge service, edge will request entities of this group to be send to edge. Once entities will be delivered to edge service, they are going to be available for usage on remote edge instance.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "assignEntityGroupToEdge", "parameters": [ { - "name": "entityGroupId", + "name": "edgeId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "groupType", + "in": "path", + "description": "EntityGroup type", "required": true, "schema": { "type": "string", - "minimum": 1 + "enum": [ + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD" + ] } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -52613,7 +53071,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataShortEntityView" + "$ref": "#/components/schemas/EntityGroup" } } } @@ -52629,7 +53087,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -52747,171 +53205,40 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entityGroup/{entityGroupId}/makePrivate": { - "post": { + }, + "delete": { "tags": [ "entity-group-controller" ], - "summary": "Make Entity Group Private (makeEntityGroupPrivate)", - "description": "Make the entity group not available for non authorized users. Every group is private by default. This call is useful to hide the group that was previously made public.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "makeEntityGroupPrivate", + "summary": "Unassign entity group from edge (unassignEntityGroupFromEdge)", + "description": "Clears assignment of the entity group to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity group and entities inside this group locally.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "unassignEntityGroupFromEdge", "parameters": [ { - "name": "entityGroupId", + "name": "edgeId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "OK" }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid request body", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ { - "HttpLoginForm": [] + "name": "groupType", + "in": "path", + "description": "EntityGroup type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD" + ] + } }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/entityGroup/{entityGroupId}/makePublic": { - "post": { - "tags": [ - "entity-group-controller" - ], - "summary": "Make Entity Group Publicly available (makeEntityGroupPublic)", - "description": "Make the entity group available for non authorized users. Useful for public dashboards that will be embedded into the public websites. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "makeEntityGroupPublic", - "parameters": [ { "name": "entityGroupId", "in": "path", @@ -52924,7 +53251,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityGroup" + } + } + } }, "400": { "description": "Bad Request", @@ -52937,7 +53271,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -53057,30 +53391,19 @@ ] } }, - "/api/entityGroup/{entityGroupId}/share": { + "/api/entityGroup": { "post": { "tags": [ "entity-group-controller" ], - "summary": "Share the Entity Group (shareEntityGroup)", - "description": "Share the entity group with certain user group based on the provided Share Group Request. The request is quite flexible and processing of the request involves multiple security checks using platform RBAC feature.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "shareEntityGroup", - "parameters": [ - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Create Or Update Entity Group (saveEntityGroup)", + "description": "Create or update the Entity Group. When creating Entity Group, platform generates Entity Group Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Entity Group Id will be present in the response. Specify existing Entity Group Id to update the group. Referencing non-existing Entity Group Id will cause 'Not Found' error.Remove 'id', 'tenantId' and optionally 'ownerId' from the request body example (below) to create new Entity Group entity. When 'ownerId' is not set (or null), it defaults to the current user's owner (Tenant for tenant admins, Customer for customer users). \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "saveEntityGroup", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShareGroupRequest" + "$ref": "#/components/schemas/EntityGroup" } } }, @@ -53088,7 +53411,14 @@ }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityGroupInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -53221,31 +53551,54 @@ ] } }, - "/api/entityGroup/{entityGroupId}/{entityId}": { + "/api/entityGroup/all/{ownerType}/{ownerId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Group Entity (getGroupEntity)", - "description": "Fetch the Short Entity View object based on the group and entity id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getGroupEntity", + "summary": "Get special group All by owner and entity type (getEntityGroupsByOwnerAndType)", + "description": "Fetch reserved group 'All' based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupAllByOwnerAndType", "parameters": [ { - "name": "entityGroupId", + "name": "ownerType", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Tenant or Customer", "required": true, "schema": { - "type": "string" + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] } }, { - "name": "entityId", + "name": "ownerId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the Tenant or Customer id", "required": true, "schema": { "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] } } ], @@ -53255,7 +53608,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShortEntityView" + "$ref": "#/components/schemas/EntityGroupInfo" } } } @@ -53391,37 +53744,19 @@ ] } }, - "/api/entityGroup/{entityGroupId}/{userGroupId}/{roleId}/share": { - "post": { + "/api/entityGroup/{entityGroupId}": { + "get": { "tags": [ "entity-group-controller" ], - "summary": "Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroup)", - "description": "Share the entity group with specified user group using specified role. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "shareEntityGroupToChildOwnerUserGroup", + "summary": "Get Entity Group Info (getEntityGroupById)", + "description": "Fetch the Entity Group object based on the provided Entity Group Id. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupById", "parameters": [ { "name": "entityGroupId", "in": "path", - "description": "A string value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "userGroupId", - "in": "path", - "description": "A string value representing the Entity(User) Group Id that you would like to share with. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "roleId", - "in": "path", - "description": "A string value representing the Role Id that describes set of permissions you would like to share (read, write, etc). For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -53430,7 +53765,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityGroupInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -53443,7 +53785,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -53561,62 +53903,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entityGroup/{ownerType}/{ownerId}/{groupType}/{groupName}": { - "get": { + }, + "delete": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group by owner, type and name (getEntityGroupByOwnerAndNameAndType)", - "description": "Fetch the Entity Group object based on the provided Entity Group Id. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupByOwnerAndNameAndType", + "summary": "Delete Entity Group (deleteEntityGroup)", + "description": "Deletes the entity group but does not delete the entities in the group, since they are also present in reserved group 'All'. Referencing non-existing Entity Group Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for specified group.", + "operationId": "deleteEntityGroup", "parameters": [ { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the Tenant or Customer id", - "required": true, - "schema": { - "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - { - "name": "groupType", - "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "groupName", + "name": "entityGroupId", "in": "path", - "description": "Entity Group name", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -53625,14 +53924,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityGroupInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -53765,14 +54057,14 @@ ] } }, - "/api/entityGroupInfo/{entityGroupId}": { - "get": { + "/api/entityGroup/{entityGroupId}/addEntities": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Info (getEntityGroupEntityInfoById)", - "description": "Fetch the Entity Group Entity Info object based on the provided Entity Group Id. Entity Info is a lightweight object that contains only id and name of the entity group. \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfoById", + "summary": "Add entities to the group (addEntitiesToEntityGroup)", + "description": "Add entities to the specified entity group. This operation is idempotent: entities that are already members of the group are silently ignored. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'ADD_TO_GROUP' permission for specified group.", + "operationId": "addEntitiesToEntityGroup", "parameters": [ { "name": "entityGroupId", @@ -53784,17 +54076,24 @@ } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityInfo" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "A list of entity ids", + "items": { + "type": "string" } } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -53806,7 +54105,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -53926,42 +54225,43 @@ ] } }, - "/api/entityGroupInfos": { - "get": { + "/api/entityGroup/{entityGroupId}/deleteEntities": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Infos by Ids (getEntityGroupEntityInfosByIds)", - "description": "Fetch the list of Entity Group Entity Info objects based on the provided entity group ids list. Entity Info is a lightweight object that contains only id and name of the entity group. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfosByIds", + "summary": "Remove entities from the group (removeEntitiesFromEntityGroup)", + "description": "Removes entities from the specified entity group. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'REMOVE_FROM_GROUP' permission for specified group.", + "operationId": "removeEntitiesFromEntityGroup", "parameters": [ { - "name": "entityGroupIds", - "in": "query", - "description": "A list of group ids, separated by comma ','", + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityInfo" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "A list of entity ids", + "items": { + "type": "string" } } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -53973,7 +54273,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -54093,40 +54393,22 @@ ] } }, - "/api/entityGroupInfos/{groupType}": { + "/api/entityGroup/{entityGroupId}/entities": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Infos by entity type and page link (getEntityGroupEntityInfosByTypeAndPageLink)", - "description": "Returns a page of Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfosByTypeAndPageLink", + "summary": "Get Group Entities (getEntities)", + "description": "Returns a page of Short Entity View objects that belongs to specified Entity Group Id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntities", "parameters": [ { - "name": "groupType", + "name": "entityGroupId", "in": "path", - "description": "Entity Group type", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "includeShared", - "in": "query", - "description": "Whether to include shared entity groups.", - "required": false, - "schema": { - "type": "boolean" + "type": "string" } }, { @@ -54187,7 +54469,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" + "$ref": "#/components/schemas/PageDataShortEntityView" } } } @@ -54323,95 +54605,28 @@ ] } }, - "/api/entityGroupInfos/{groupType}/shared": { - "get": { + "/api/entityGroup/{entityGroupId}/makePrivate": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Shared Entity Group Entity Infos by entity type and page link (getSharedEntityGroupEntityInfosByTypeAndPageLink)", - "description": "Returns a page of Shared Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getSharedEntityGroupEntityInfosByTypeAndPageLink", + "summary": "Make Entity Group Private (makeEntityGroupPrivate)", + "description": "Make the entity group not available for non authorized users. Every group is private by default. This call is useful to hide the group that was previously made public.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "makeEntityGroupPrivate", "parameters": [ { - "name": "groupType", + "name": "entityGroupId", "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -54424,7 +54639,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -54544,118 +54759,28 @@ ] } }, - "/api/entityGroupInfos/{ownerType}/{ownerId}/{groupType}": { - "get": { + "/api/entityGroup/{entityGroupId}/makePublic": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Infos by owner and entity type and page link (getEntityGroupEntityInfosByOwnerAndTypeAndPageLink)", - "description": "Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfosByOwnerAndTypeAndPageLink", + "summary": "Make Entity Group Publicly available (makeEntityGroupPublic)", + "description": "Make the entity group available for non authorized users. Useful for public dashboards that will be embedded into the public websites. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "makeEntityGroupPublic", "parameters": [ { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the Tenant or Customer id", - "required": true, - "schema": { - "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - { - "name": "groupType", + "name": "entityGroupId", "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -54668,7 +54793,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -54788,119 +54913,39 @@ ] } }, - "/api/entityGroupInfosHierarchy/{ownerType}/{ownerId}/{groupType}": { - "get": { + "/api/entityGroup/{entityGroupId}/share": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Infos for all owners starting from specified than ending with owner of current user (getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink)", - "description": "Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink", + "summary": "Share the Entity Group (shareEntityGroup)", + "description": "Share the entity group with certain user group based on the provided Share Group Request. The request is quite flexible and processing of the request involves multiple security checks using platform RBAC feature.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "shareEntityGroup", "parameters": [ { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the Tenant or Customer id", - "required": true, - "schema": { - "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - { - "name": "groupType", + "name": "entityGroupId", "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShareGroupRequest" } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -54912,7 +54957,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -55032,90 +55077,32 @@ ] } }, - "/api/entityGroups/edge/{edgeId}/{groupType}": { + "/api/entityGroup/{entityGroupId}/{entityId}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Edge Entity Groups by entity type (getEdgeEntityGroups)", - "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getEdgeEntityGroups", + "summary": "Get Group Entity (getGroupEntity)", + "description": "Fetch the Short Entity View object based on the group and entity id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getGroupEntity", "parameters": [ { - "name": "edgeId", + "name": "entityGroupId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "groupType", + "name": "entityId", "in": "path", - "description": "EntityGroup type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD" - ] - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -55124,7 +55111,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityGroupInfo" + "$ref": "#/components/schemas/ShortEntityView" } } } @@ -55260,41 +55247,46 @@ ] } }, - "/api/entityGroups/list": { - "get": { + "/api/entityGroup/{entityGroupId}/{userGroupId}/{roleId}/share": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by Ids (getEntityGroupsByIds)", - "description": "Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupsByIds", + "summary": "Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroup)", + "description": "Share the entity group with specified user group using specified role. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "shareEntityGroupToChildOwnerUserGroup", "parameters": [ { - "name": "entityGroupIds", - "in": "query", - "description": "A list of group ids, separated by comma ','", + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" + } + }, + { + "name": "userGroupId", + "in": "path", + "description": "A string value representing the Entity(User) Group Id that you would like to share with. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "roleId", + "in": "path", + "description": "A string value representing the Role Id that describes set of permissions you would like to share (read, write, etc). For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupInfo" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -55307,7 +55299,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -55427,17 +55419,40 @@ ] } }, - "/api/entityGroups/{entityType}/{entityId}": { + "/api/entityGroup/{ownerType}/{ownerId}/{groupType}/{groupName}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by Entity Id (getEntityGroupsForEntity)", - "description": "Returns a list of groups that contain the specified Entity Id. For example, all device groups that contain specific device. The list always contain at least one element - special group 'All'.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getEntityGroupsForEntity", + "summary": "Get Entity Group by owner, type and name (getEntityGroupByOwnerAndNameAndType)", + "description": "Fetch the Entity Group object based on the provided Entity Group Id. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupByOwnerAndNameAndType", "parameters": [ { - "name": "entityType", + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", "in": "path", "description": "Entity Group type", "required": true, @@ -55455,9 +55470,9 @@ } }, { - "name": "entityId", + "name": "groupName", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Entity Group name", "required": true, "schema": { "type": "string" @@ -55470,10 +55485,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupId" - } + "$ref": "#/components/schemas/EntityGroupInfo" } } } @@ -55609,92 +55621,23 @@ ] } }, - "/api/entityGroups/{groupType}": { + "/api/entityGroupInfo/{entityGroupId}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by entity type and page link (getEntityGroupsByTypeAndPageLink)", - "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupsByTypeAndPageLink", + "summary": "Get Entity Group Entity Info (getEntityGroupEntityInfoById)", + "description": "Fetch the Entity Group Entity Info object based on the provided Entity Group Id. Entity Info is a lightweight object that contains only id and name of the entity group. \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfoById", "parameters": [ { - "name": "groupType", + "name": "entityGroupId", "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "includeShared", - "in": "query", - "description": "Whether to include shared entity groups.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -55703,7 +55646,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityGroupInfo" + "$ref": "#/components/schemas/EntityInfo" } } } @@ -55839,40 +55782,25 @@ ] } }, - "/api/entityGroups/{groupType}/all": { + "/api/entityGroupInfos": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by entity type (getAllEntityGroupsByType)", - "description": "Fetch the list of Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getAllEntityGroupsByType", + "summary": "Get Entity Group Entity Infos by Ids (getEntityGroupEntityInfosByIds)", + "description": "Fetch the list of Entity Group Entity Info objects based on the provided entity group ids list. Entity Info is a lightweight object that contains only id and name of the entity group. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfosByIds", "parameters": [ { - "name": "groupType", - "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "includeShared", + "name": "entityGroupIds", "in": "query", - "description": "Whether to include shared entity groups.", - "required": false, + "description": "A list of group ids, separated by comma ','", + "required": true, "schema": { - "type": "boolean" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -55884,7 +55812,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityGroupInfo" + "$ref": "#/components/schemas/EntityInfo" } } } @@ -56021,14 +55949,14 @@ ] } }, - "/api/entityGroups/{groupType}/shared": { + "/api/entityGroupInfos/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Shared Entity Groups by entity type and page link (getSharedEntityGroupsByTypeAndPageLink)", - "description": "Returns a page of Shared Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getSharedEntityGroupsByTypeAndPageLink", + "summary": "Get Entity Group Entity Infos by entity type and page link (getEntityGroupEntityInfosByTypeAndPageLink)", + "description": "Returns a page of Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfosByTypeAndPageLink", "parameters": [ { "name": "groupType", @@ -56048,6 +55976,15 @@ ] } }, + { + "name": "includeShared", + "in": "query", + "description": "Whether to include shared entity groups.", + "required": false, + "schema": { + "type": "boolean" + } + }, { "name": "pageSize", "in": "query", @@ -56106,7 +56043,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityGroupInfo" + "$ref": "#/components/schemas/PageDataEntityInfo" } } } @@ -56242,14 +56179,14 @@ ] } }, - "/api/entityGroups/{groupType}/shared/all": { + "/api/entityGroupInfos/{groupType}/shared": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Shared Entity Groups by entity type (getAllSharedEntityGroups)", - "description": "Fetch the list of Shared Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getAllSharedEntityGroups", + "summary": "Get Shared Entity Group Entity Infos by entity type and page link (getSharedEntityGroupEntityInfosByTypeAndPageLink)", + "description": "Returns a page of Shared Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getSharedEntityGroupEntityInfosByTypeAndPageLink", "parameters": [ { "name": "groupType", @@ -56268,6 +56205,57 @@ "EDGE" ] } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -56276,10 +56264,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupInfo" - } + "$ref": "#/components/schemas/PageDataEntityInfo" } } } @@ -56415,14 +56400,14 @@ ] } }, - "/api/entityGroups/{ownerType}/{ownerId}/{groupType}": { + "/api/entityGroupInfos/{ownerType}/{ownerId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by owner and entity type and page link (getEntityGroupsByOwnerAndTypeAndPageLink)", - "description": "Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupsByOwnerAndTypeAndPageLink", + "summary": "Get Entity Group Entity Infos by owner and entity type and page link (getEntityGroupEntityInfosByOwnerAndTypeAndPageLink)", + "description": "Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfosByOwnerAndTypeAndPageLink", "parameters": [ { "name": "ownerType", @@ -56523,7 +56508,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityGroupInfo" + "$ref": "#/components/schemas/PageDataEntityInfo" } } } @@ -56659,14 +56644,14 @@ ] } }, - "/api/entityGroups/{ownerType}/{ownerId}/{groupType}/all": { + "/api/entityGroupInfosHierarchy/{ownerType}/{ownerId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType)", - "description": "Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getAllEntityGroupsByOwnerAndType", + "summary": "Get Entity Group Entity Infos for all owners starting from specified than ending with owner of current user (getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink)", + "description": "Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink", "parameters": [ { "name": "ownerType", @@ -56708,6 +56693,57 @@ "EDGE" ] } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -56716,10 +56752,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupInfo" - } + "$ref": "#/components/schemas/PageDataEntityInfo" } } } @@ -56855,53 +56888,37 @@ ] } }, - "/api/entityGroupsHierarchy/{ownerType}/{ownerId}/{groupType}": { + "/api/entityGroups/edge/{edgeId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups for all owners starting from specified than ending with owner of current user (getEntityGroupsHierarchyByOwnerAndTypeAndPageLink)", - "description": "Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupsHierarchyByOwnerAndTypeAndPageLink", + "summary": "Get Edge Entity Groups by entity type (getEdgeEntityGroups)", + "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getEdgeEntityGroups", "parameters": [ { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", + "name": "edgeId", "in": "path", - "description": "A string value representing the Tenant or Customer id", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, { "name": "groupType", "in": "path", - "description": "Entity Group type", + "description": "EntityGroup type", "required": true, "schema": { "type": "string", "enum": [ - "CUSTOMER", "ASSET", "DEVICE", "USER", "ENTITY_VIEW", - "DASHBOARD", - "EDGE" + "DASHBOARD" ] } }, @@ -57099,37 +57116,208 @@ ] } }, - "/api/ownerInfo/{ownerType}/{ownerId}": { + "/api/entityGroups/list": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Owner Info (getOwnerInfo)", - "description": "Fetch the owner info (tenant or customer) presented as Entity Info object based on the provided owner Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getOwnerInfo", + "summary": "Get Entity Groups by Ids (getEntityGroupsByIds)", + "description": "Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupsByIds", "parameters": [ { - "name": "ownerType", + "name": "entityGroupIds", + "in": "query", + "description": "A list of group ids, separated by comma ','", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/entityGroups/{entityType}/{entityId}": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Entity Groups by Entity Id (getEntityGroupsForEntity)", + "description": "Returns a list of groups that contain the specified Entity Id. For example, all device groups that contain specific device. The list always contain at least one element - special group 'All'.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getEntityGroupsForEntity", + "parameters": [ + { + "name": "entityType", "in": "path", - "description": "Tenant or Customer", + "description": "Entity Group type", "required": true, "schema": { "type": "string", "enum": [ - "TENANT", - "CUSTOMER" + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" ] } }, { - "name": "ownerId", + "name": "entityId", "in": "path", - "description": "A string value representing the Tenant or Customer id", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } } ], "responses": { @@ -57138,7 +57326,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupId" + } } } } @@ -57274,15 +57465,42 @@ ] } }, - "/api/ownerInfos": { + "/api/entityGroups/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Owner Infos (getOwnerInfos)", - "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getOwnerInfos", + "summary": "Get Entity Groups by entity type and page link (getEntityGroupsByTypeAndPageLink)", + "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupsByTypeAndPageLink", "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, + { + "name": "includeShared", + "in": "query", + "description": "Whether to include shared entity groups.", + "required": false, + "schema": { + "type": "boolean" + } + }, { "name": "pageSize", "in": "query", @@ -57341,7 +57559,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" + "$ref": "#/components/schemas/PageDataEntityGroupInfo" } } } @@ -57477,64 +57695,40 @@ ] } }, - "/api/owners": { + "/api/entityGroups/{groupType}/all": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Owners (getOwners)", - "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getOwners", + "summary": "Get Entity Groups by entity type (getAllEntityGroupsByType)", + "description": "Fetch the list of Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getAllEntityGroupsByType", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "groupType", + "in": "path", + "description": "Entity Group type", "required": true, "schema": { "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] } }, { - "name": "sortOrder", + "name": "includeShared", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Whether to include shared entity groups.", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "boolean" } } ], @@ -57544,7 +57738,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataContactBasedObject" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } } } } @@ -57680,32 +57877,92 @@ ] } }, - "/api/alarmsQuery/count": { - "post": { + "/api/entityGroups/{groupType}/shared": { + "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" ], - "summary": "Count Alarms by Query (countAlarmsByQuery)", - "description": "Returns the number of alarms that match the query definition.", - "operationId": "countAlarmsByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlarmCountQuery" - } + "summary": "Get Shared Entity Groups by entity type and page link (getSharedEntityGroupsByTypeAndPageLink)", + "description": "Returns a page of Shared Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getSharedEntityGroupsByTypeAndPageLink", + "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] } }, - "required": true - }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/PageDataEntityGroupInfo" } } } @@ -57721,7 +57978,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -57841,31 +58098,44 @@ ] } }, - "/api/alarmsQuery/find": { - "post": { + "/api/entityGroups/{groupType}/shared/all": { + "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" ], - "summary": "Find Alarms by Query", - "description": "This method description defines how Alarm Data Query extends the Entity Data Query. See method 'Find Entity Data by Query' first to get the info about 'Entity Data Query'.\n\n The platform will first search the entities that match the entity and key filters. Then, the platform will use 'Alarm Page Link' to filter the alarms related to those entities. Finally, platform fetch the properties of alarm that are defined in the **'alarmFields'** and combine them with the other entity, attribute and latest time series fields to return the result. \n\n See example of the alarm query below. The query will search first 100 active alarms with type 'Temperature Alarm' or 'Fire Alarm' for any device with current temperature > 0. The query will return combination of the entity fields: name of the device, device model and latest temperature reading and alarms fields: createdTime, type, severity and status: \n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 100,\n \"textSearch\": null,\n \"searchPropagatedAlarms\": false,\n \"statusList\": [\n \"ACTIVE\"\n ],\n \"severityList\": [\n \"CRITICAL\",\n \"MAJOR\"\n ],\n \"typeList\": [\n \"Temperature Alarm\",\n \"Fire Alarm\"\n ],\n \"sortOrder\": {\n \"key\": {\n \"key\": \"createdTime\",\n \"type\": \"ALARM_FIELD\"\n },\n \"direction\": \"DESC\"\n },\n \"timeWindow\": 86400000\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"alarmFields\": [\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"createdTime\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"type\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"severity\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"status\"\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ]\n}\n```", - "operationId": "findAlarmDataByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlarmDataQuery" - } + "summary": "Get Shared Entity Groups by entity type (getAllSharedEntityGroups)", + "description": "Fetch the list of Shared Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getAllSharedEntityGroups", + "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAlarmData" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } } } } @@ -57881,7 +58151,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -58001,20 +58271,115 @@ ] } }, - "/api/edqs/state": { + "/api/entityGroups/{ownerType}/{ownerId}/{groupType}": { "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" + ], + "summary": "Get Entity Groups by owner and entity type and page link (getEntityGroupsByOwnerAndTypeAndPageLink)", + "description": "Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupsByOwnerAndTypeAndPageLink", + "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } ], - "summary": "getEdqsState", - "operationId": "getEdqsState", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdqsState" + "$ref": "#/components/schemas/PageDataEntityGroupInfo" } } } @@ -58150,26 +58515,70 @@ ] } }, - "/api/edqs/system/request": { - "post": { + "/api/entityGroups/{ownerType}/{ownerId}/{groupType}/all": { + "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" ], - "summary": "processSystemEdqsRequest", - "operationId": "processSystemEdqsRequest", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToCoreEdqsRequest" - } + "summary": "Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType)", + "description": "Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getAllEntityGroupsByOwnerAndType", + "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] } }, - "required": true - }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + } + ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } + } + } + } }, "400": { "description": "Bad Request", @@ -58182,7 +58591,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -58302,32 +58711,115 @@ ] } }, - "/api/entitiesQuery/count": { - "post": { + "/api/entityGroupsHierarchy/{ownerType}/{ownerId}/{groupType}": { + "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" ], - "summary": "Count Entities by Query", - "description": "Allows to run complex queries to search the count of platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the number of entities that match the query definition.\n\n# Query Definition\n\n\n\nMain **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\"\n\nOptional **key filters** allow to filter results of the entity filter by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\".\n\nLet's review the example:\n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"entityType\": \"DEVICE\"\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"active\"\n },\n \"valueType\": \"BOOLEAN\",\n \"predicate\": {\n \"operation\": \"EQUAL\",\n \"value\": {\n \"defaultValue\": true,\n \"dynamicValue\": null\n },\n \"type\": \"BOOLEAN\"\n }\n }\n ]\n}\n```\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:\n\n # Entity Filters\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases.\n\n## Single Entity\n\nAllows to filter only one entity based on the id. For example, this entity filter selects certain device:\n\n```json\n{\n \"type\": \"singleEntity\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Group Entities Filter\n\nAllows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"entityGroup\",\n \"groupType\": \"DEVICE\",\n \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n}\n```\n\n## Entity List Filter\n\nAllows to filter entities of the same type using their ids. For example, this entity filter selects two devices:\n\n```json\n{\n \"type\": \"entityList\",\n \"entityType\": \"DEVICE\",\n \"entityList\": [\n \"e6501f30-2a7a-11ec-94eb-213c95f54092\",\n \"e6657bf0-2a7a-11ec-94eb-213c95f54092\"\n ]\n}\n```\n\n## Entity Name Filter\n\nAllows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality':\n\n```json\n{\n \"type\": \"entityName\",\n \"entityType\": \"DEVICE\",\n \"entityNameFilter\": \"Air Quality\"\n}\n```\n\n## Entity Type Filter\n\nAllows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers:\n\n```json\n{\n \"type\": \"entityType\",\n \"entityType\": \"CUSTOMER\"\n}\n```\n\n## Group List Filter\n\nReturn multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"entityGroupList\",\n \"groupType\": \"DEVICE\",\n \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"]\n}\n```\n\n## Group Name Filter\n\nAllows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"CAT\"\n}\n```\n\n## Entities by Group Name Filter\n\nAllows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters':\n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': \n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"},\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n## Entity owner Filter\n\nAllows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"stateEntityOwner\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Asset Type Filter\n\nAllows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla':\n\n```json\n{\n \"type\": \"assetType\",\n \"assetType\": \"charging station\",\n \"assetNameFilter\": \"Tesla\"\n}\n```\n\n## Device Type Filter\n\nAllows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC':\n\n```json\n{\n \"type\": \"deviceType\",\n \"deviceType\": \"Temperature Sensor\",\n \"deviceNameFilter\": \"ABC\"\n}\n```\n\n## Edge Type Filter\n\nAllows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada':\n\n```json\n{\n \"type\": \"edgeType\",\n \"edgeType\": \"Factory\",\n \"edgeNameFilter\": \"Nevada\"\n}\n```\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```\n\n## Api Usage Filter\n\nAllows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"apiUsageState\",\n \"customerId\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"CUSTOMER\"\n }\n}\n```\n\n## Relations Query Filter\n\nAllows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'.\n\nFor example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"relationsQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"filters\": [\n {\n \"relationType\": \"Contains\",\n \"entityTypes\": [\n \"DEVICE\",\n \"ASSET\"\n ]\n }\n ]\n}\n```\n\n## Asset Search Query\n\nAllows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions.\n\nFor example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"assetSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"assetTypes\": [\n \"charging station\"\n ]\n}\n```\n\n## Device Search Query\n\nAllows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"deviceTypes\": [\n \"Air Quality Sensor\",\n \"Charging port\"\n ]\n}\n```\n\n## Entity View Query\n\nAllows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"entityViewSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"entityViewTypes\": [\n \"Concrete mixer\"\n ]\n}\n```\n\n## Edge Search Query\n\nAllows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"edgeTypes\": [\n \"Factory\"\n ]\n}\n```\n\n # Key Filters\nKey Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees:\n\n```json\n{\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n}\n```\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail.\n\n## Filter Key\n\nFilter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: \n\n * 'CLIENT_ATTRIBUTE' - used for client attributes; \n * 'SHARED_ATTRIBUTE' - used for shared attributes; \n * 'SERVER_ATTRIBUTE' - used for server attributes; \n * 'ATTRIBUTE' - used for any of the above; \n * 'TIME_SERIES' - used for time series values; \n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n\n\n Let's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value < 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value < 10 or value > 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\n You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: \n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\n Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "countEntitiesByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityCountQuery" - } + "summary": "Get Entity Groups for all owners starting from specified than ending with owner of current user (getEntityGroupsHierarchyByOwnerAndTypeAndPageLink)", + "description": "Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupsHierarchyByOwnerAndTypeAndPageLink", + "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] } }, - "required": true - }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/PageDataEntityGroupInfo" } } } @@ -58343,7 +58835,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -58463,31 +58955,46 @@ ] } }, - "/api/entitiesQuery/find": { - "post": { + "/api/ownerInfo/{ownerType}/{ownerId}": { + "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" ], - "summary": "Find Entity Data by Query", - "description": "Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data.\n\n# Query Definition\n\n\n\nMain **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\"\n\nOptional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\".\n\nThe **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity.\n\nThe **page link** contains information about the page to fetch and the sort ordering.\n\nLet's review the example:\n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\",\n \"inherit\": false\n }\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n },\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"label\"\n },\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"additionalInfo\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ],\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 10,\n \"sortOrder\": {\n \"key\": {\n \"key\": \"name\",\n \"type\": \"ENTITY_FIELD\"\n },\n \"direction\": \"ASC\"\n }\n }\n}\n```\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:\n\n # Entity Filters\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases.\n\n## Single Entity\n\nAllows to filter only one entity based on the id. For example, this entity filter selects certain device:\n\n```json\n{\n \"type\": \"singleEntity\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Group Entities Filter\n\nAllows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"entityGroup\",\n \"groupType\": \"DEVICE\",\n \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n}\n```\n\n## Entity List Filter\n\nAllows to filter entities of the same type using their ids. For example, this entity filter selects two devices:\n\n```json\n{\n \"type\": \"entityList\",\n \"entityType\": \"DEVICE\",\n \"entityList\": [\n \"e6501f30-2a7a-11ec-94eb-213c95f54092\",\n \"e6657bf0-2a7a-11ec-94eb-213c95f54092\"\n ]\n}\n```\n\n## Entity Name Filter\n\nAllows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality':\n\n```json\n{\n \"type\": \"entityName\",\n \"entityType\": \"DEVICE\",\n \"entityNameFilter\": \"Air Quality\"\n}\n```\n\n## Entity Type Filter\n\nAllows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers:\n\n```json\n{\n \"type\": \"entityType\",\n \"entityType\": \"CUSTOMER\"\n}\n```\n\n## Group List Filter\n\nReturn multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"entityGroupList\",\n \"groupType\": \"DEVICE\",\n \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"]\n}\n```\n\n## Group Name Filter\n\nAllows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"CAT\"\n}\n```\n\n## Entities by Group Name Filter\n\nAllows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters':\n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': \n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"},\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n## Entity owner Filter\n\nAllows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"stateEntityOwner\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Asset Type Filter\n\nAllows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla':\n\n```json\n{\n \"type\": \"assetType\",\n \"assetType\": \"charging station\",\n \"assetNameFilter\": \"Tesla\"\n}\n```\n\n## Device Type Filter\n\nAllows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC':\n\n```json\n{\n \"type\": \"deviceType\",\n \"deviceType\": \"Temperature Sensor\",\n \"deviceNameFilter\": \"ABC\"\n}\n```\n\n## Edge Type Filter\n\nAllows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada':\n\n```json\n{\n \"type\": \"edgeType\",\n \"edgeType\": \"Factory\",\n \"edgeNameFilter\": \"Nevada\"\n}\n```\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```\n\n## Api Usage Filter\n\nAllows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"apiUsageState\",\n \"customerId\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"CUSTOMER\"\n }\n}\n```\n\n## Relations Query Filter\n\nAllows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'.\n\nFor example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"relationsQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"filters\": [\n {\n \"relationType\": \"Contains\",\n \"entityTypes\": [\n \"DEVICE\",\n \"ASSET\"\n ]\n }\n ]\n}\n```\n\n## Asset Search Query\n\nAllows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions.\n\nFor example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"assetSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"assetTypes\": [\n \"charging station\"\n ]\n}\n```\n\n## Device Search Query\n\nAllows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"deviceTypes\": [\n \"Air Quality Sensor\",\n \"Charging port\"\n ]\n}\n```\n\n## Entity View Query\n\nAllows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"entityViewSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"entityViewTypes\": [\n \"Concrete mixer\"\n ]\n}\n```\n\n## Edge Search Query\n\nAllows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"edgeTypes\": [\n \"Factory\"\n ]\n}\n```\n\n # Key Filters\nKey Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees:\n\n```json\n{\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n}\n```\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail.\n\n## Filter Key\n\nFilter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: \n\n * 'CLIENT_ATTRIBUTE' - used for client attributes; \n * 'SHARED_ATTRIBUTE' - used for shared attributes; \n * 'SERVER_ATTRIBUTE' - used for server attributes; \n * 'ATTRIBUTE' - used for any of the above; \n * 'TIME_SERIES' - used for time series values; \n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n\n\n Let's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value < 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value < 10 or value > 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\n You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: \n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\n Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findEntityDataByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityDataQuery" - } + "summary": "Get Owner Info (getOwnerInfo)", + "description": "Fetch the owner info (tenant or customer) presented as Entity Info object based on the provided owner Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getOwnerInfo", + "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] } }, - "required": true - }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityData" + "$ref": "#/components/schemas/EntityInfo" } } } @@ -58503,7 +59010,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -58623,65 +59130,74 @@ ] } }, - "/api/entitiesQuery/find/keys": { - "post": { + "/api/ownerInfos": { + "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" ], - "summary": "Find Available Entity Keys by Query (deprecated)", - "description": "**Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead.\n\nReturns unique time series and/or attribute key names from entities matching the query.\n\nExecutes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names.\n\nPrimarily used for UI features like autocomplete suggestions.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "findAvailableEntityKeysByQuery", + "summary": "Get Owner Infos (getOwnerInfos)", + "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getOwnerInfos", "parameters": [ { - "name": "timeseries", + "name": "pageSize", "in": "query", - "description": "When true, includes unique time series key names in the response.\nWhen false, the 'timeseries' list will be empty.", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "boolean" + "type": "string", + "minimum": 1 } }, { - "name": "attributes", + "name": "page", "in": "query", - "description": "When true, includes unique attribute key names in the response.\nWhen false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope.", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "boolean" + "type": "string", + "minimum": 0 } }, { - "name": "scope", + "name": "textSearch", "in": "query", - "description": "Filters attribute keys by scope. Only applies when 'attributes' is true.\nIf not specified, returns attribute keys from all scopes.", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { "type": "string", "enum": [ - "SERVER_SCOPE", - "SHARED_SCOPE", - "CLIENT_SCOPE" + "ASC", + "DESC" ] } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityDataQuery" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AvailableEntityKeys" + "$ref": "#/components/schemas/PageDataEntityInfo" } } } @@ -58697,7 +59213,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -58807,7 +59323,6 @@ } } }, - "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -58818,77 +59333,74 @@ ] } }, - "/api/v2/entitiesQuery/find/keys": { - "post": { + "/api/owners": { + "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" ], - "summary": "Find Available Entity Keys By Query", - "description": "Discovers unique time series and/or attribute key names available on entities that match the given query.\nWorks in two steps: first, the request body (an Entity Data Query) is executed to find matching entities\n(page size is capped at 100); then, all distinct key names are collected from those entities.\n\nOptionally, each key can include a sample — the most recent value (by timestamp) for that key\nacross all matched entities.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "findAvailableEntityKeysByQueryV2", + "summary": "Get Owners (getOwners)", + "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getOwners", "parameters": [ { - "name": "includeTimeseries", + "name": "pageSize", "in": "query", - "description": "When true, includes unique time series keys in the response.\nWhen false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true.", - "required": false, + "description": "Maximum amount of entities in a one page", + "required": true, "schema": { - "type": "boolean", - "default": true + "type": "string", + "minimum": 1 } }, { - "name": "includeAttributes", + "name": "page", "in": "query", - "description": "When true, includes unique attribute keys in the response.\nWhen false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true.", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", "required": false, "schema": { - "type": "boolean", - "default": true + "type": "string" } }, { - "name": "scopes", + "name": "sortProperty", "in": "query", - "description": "Filters attribute keys by scope. Only applies when 'includeAttributes' is true.\nWhen not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities,\nserver scope only for other entity types.", + "description": "Property of entity to sort by", "required": false, "schema": { - "type": "string", - "enum": [ - "SERVER_SCOPE", - "SHARED_SCOPE", - "CLIENT_SCOPE" - ] + "type": "string" } }, { - "name": "includeSamples", + "name": "sortOrder", "in": "query", - "description": "When true, each key entry includes a 'sample' object with the most recent value and timestamp.\nWhen false, only key names are returned (sample is omitted from JSON).", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { - "type": "boolean", - "default": false + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityDataQuery" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AvailableEntityKeysV2" + "$ref": "#/components/schemas/PageDataContactBasedObject" } } } @@ -58904,7 +59416,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -59024,77 +59536,32 @@ ] } }, - "/api/relation": { - "get": { + "/api/alarmsQuery/count": { + "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Get Relation (getRelation)", - "description": "Returns relation object between two specified entities if present. Otherwise throws exception. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "getRelation", - "parameters": [ - { - "name": "fromId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromType", - "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationType", - "in": "query", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "toId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Count Alarms by Query (countAlarmsByQuery)", + "description": "Returns the number of alarms that match the query definition.", + "operationId": "countAlarmsByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmCountQuery" + } } }, - { - "name": "toType", - "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelation" + "type": "integer", + "format": "int64" } } } @@ -59110,7 +59577,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -59230,19 +59697,19 @@ ] } }, - "/api/relations": { + "/api/alarmsQuery/find": { "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Find related entities (findEntityRelationsByQuery)", - "description": "Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info.", - "operationId": "findEntityRelationsByQuery", + "summary": "Find Alarms by Query", + "description": "This method description defines how Alarm Data Query extends the Entity Data Query. See method 'Find Entity Data by Query' first to get the info about 'Entity Data Query'.\n\n The platform will first search the entities that match the entity and key filters. Then, the platform will use 'Alarm Page Link' to filter the alarms related to those entities. Finally, platform fetch the properties of alarm that are defined in the **'alarmFields'** and combine them with the other entity, attribute and latest time series fields to return the result. \n\n See example of the alarm query below. The query will search first 100 active alarms with type 'Temperature Alarm' or 'Fire Alarm' for any device with current temperature \u003E 0. The query will return combination of the entity fields: name of the device, device model and latest temperature reading and alarms fields: createdTime, type, severity and status: \n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 100,\n \"textSearch\": null,\n \"searchPropagatedAlarms\": false,\n \"statusList\": [\n \"ACTIVE\"\n ],\n \"severityList\": [\n \"CRITICAL\",\n \"MAJOR\"\n ],\n \"typeList\": [\n \"Temperature Alarm\",\n \"Fire Alarm\"\n ],\n \"sortOrder\": {\n \"key\": {\n \"key\": \"createdTime\",\n \"type\": \"ALARM_FIELD\"\n },\n \"direction\": \"DESC\"\n },\n \"timeWindow\": 86400000\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"alarmFields\": [\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"createdTime\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"type\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"severity\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"status\"\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ]\n}\n```", + "operationId": "findAlarmDataByQuery", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelationsQuery" + "$ref": "#/components/schemas/AlarmDataQuery" } } }, @@ -59254,10 +59721,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } + "$ref": "#/components/schemas/PageDataAlarmData" } } } @@ -59391,37 +59855,25 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/edqs/state": { + "get": { "tags": [ - "entity-relation-controller" - ], - "summary": "Delete common relations (deleteRelations)", - "description": "Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "deleteRelations", - "parameters": [ - { - "name": "entityId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityType", - "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - } + "entity-query-controller" ], + "summary": "getEdqsState", + "operationId": "getEdqsState", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EdqsState" + } + } + } }, "400": { "description": "Bad Request", @@ -59554,56 +60006,26 @@ ] } }, - "/api/relations/from/{fromType}/{fromId}": { - "get": { + "/api/edqs/system/request": { + "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Get List of Relations (findEntityRelationsByFrom)", - "description": "Returns list of relation objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findEntityRelationsByFrom", - "parameters": [ - { - "name": "fromType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "processSystemEdqsRequest", + "operationId": "processSystemEdqsRequest", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToCoreEdqsRequest" + } } }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -59616,7 +60038,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -59736,62 +60158,32 @@ ] } }, - "/api/relations/from/{fromType}/{fromId}/{relationType}": { - "get": { + "/api/entitiesQuery/count": { + "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Get List of Relations (findEntityRelationsByFromAndRelationType)", - "description": "Returns list of relation objects for the specified entity by the 'from' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findEntityRelationsByFromAndRelationType", - "parameters": [ - { - "name": "fromType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationType", - "in": "path", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" + "summary": "Count Entities by Query", + "description": "Allows to run complex queries to search the count of platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the number of entities that match the query definition.\n\n# Query Definition\n\n\n\nMain **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\"\n\nOptional **key filters** allow to filter results of the entity filter by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature \u003E 20 or temperature\u003C 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' \u003E 40\".\n\nLet's review the example:\n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"entityType\": \"DEVICE\"\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"active\"\n },\n \"valueType\": \"BOOLEAN\",\n \"predicate\": {\n \"operation\": \"EQUAL\",\n \"value\": {\n \"defaultValue\": true,\n \"dynamicValue\": null\n },\n \"type\": \"BOOLEAN\"\n }\n }\n ]\n}\n```\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:\n\n # Entity Filters\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases.\n\n## Single Entity\n\nAllows to filter only one entity based on the id. For example, this entity filter selects certain device:\n\n```json\n{\n \"type\": \"singleEntity\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Group Entities Filter\n\nAllows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"entityGroup\",\n \"groupType\": \"DEVICE\",\n \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n}\n```\n\n## Entity List Filter\n\nAllows to filter entities of the same type using their ids. For example, this entity filter selects two devices:\n\n```json\n{\n \"type\": \"entityList\",\n \"entityType\": \"DEVICE\",\n \"entityList\": [\n \"e6501f30-2a7a-11ec-94eb-213c95f54092\",\n \"e6657bf0-2a7a-11ec-94eb-213c95f54092\"\n ]\n}\n```\n\n## Entity Name Filter\n\nAllows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality':\n\n```json\n{\n \"type\": \"entityName\",\n \"entityType\": \"DEVICE\",\n \"entityNameFilter\": \"Air Quality\"\n}\n```\n\n## Entity Type Filter\n\nAllows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers:\n\n```json\n{\n \"type\": \"entityType\",\n \"entityType\": \"CUSTOMER\"\n}\n```\n\n## Group List Filter\n\nReturn multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"entityGroupList\",\n \"groupType\": \"DEVICE\",\n \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"]\n}\n```\n\n## Group Name Filter\n\nAllows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"CAT\"\n}\n```\n\n## Entities by Group Name Filter\n\nAllows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters':\n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': \n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"},\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n## Entity owner Filter\n\nAllows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"stateEntityOwner\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Asset Type Filter\n\nAllows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla':\n\n```json\n{\n \"type\": \"assetType\",\n \"assetType\": \"charging station\",\n \"assetNameFilter\": \"Tesla\"\n}\n```\n\n## Device Type Filter\n\nAllows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC':\n\n```json\n{\n \"type\": \"deviceType\",\n \"deviceType\": \"Temperature Sensor\",\n \"deviceNameFilter\": \"ABC\"\n}\n```\n\n## Edge Type Filter\n\nAllows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada':\n\n```json\n{\n \"type\": \"edgeType\",\n \"edgeType\": \"Factory\",\n \"edgeNameFilter\": \"Nevada\"\n}\n```\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```\n\n## Api Usage Filter\n\nAllows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"apiUsageState\",\n \"customerId\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"CUSTOMER\"\n }\n}\n```\n\n## Relations Query Filter\n\nAllows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'.\n\nFor example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"relationsQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"filters\": [\n {\n \"relationType\": \"Contains\",\n \"entityTypes\": [\n \"DEVICE\",\n \"ASSET\"\n ]\n }\n ]\n}\n```\n\n## Asset Search Query\n\nAllows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions.\n\nFor example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"assetSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"assetTypes\": [\n \"charging station\"\n ]\n}\n```\n\n## Device Search Query\n\nAllows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"deviceTypes\": [\n \"Air Quality Sensor\",\n \"Charging port\"\n ]\n}\n```\n\n## Entity View Query\n\nAllows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"entityViewSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"entityViewTypes\": [\n \"Concrete mixer\"\n ]\n}\n```\n\n## Edge Search Query\n\nAllows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"edgeTypes\": [\n \"Factory\"\n ]\n}\n```\n\n # Key Filters\nKey Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees:\n\n```json\n{\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n}\n```\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail.\n\n## Filter Key\n\nFilter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: \n\n * 'CLIENT_ATTRIBUTE' - used for client attributes; \n * 'SHARED_ATTRIBUTE' - used for shared attributes; \n * 'SERVER_ATTRIBUTE' - used for server attributes; \n * 'ATTRIBUTE' - used for any of the above; \n * 'TIME_SERIES' - used for time series values; \n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n\n\n Let's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value \u003C 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value \u003C 10 or value \u003E 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value \u003C 10 or (value \u003E 50 && value \u003C 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\n You may also want to replace hardcoded values (for example, temperature \u003E 20) with the more dynamic expression (for example, temperature \u003E 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: \n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\n Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "countEntitiesByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityCountQuery" + } } }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } + "type": "integer", + "format": "int64" } } } @@ -59807,7 +60199,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -59927,19 +60319,19 @@ ] } }, - "/api/relations/info": { + "/api/entitiesQuery/find": { "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Find related entity infos (findEntityRelationInfosByQuery)", - "description": "Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findEntityRelationInfosByQuery", + "summary": "Find Entity Data by Query", + "description": "Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data.\n\n# Query Definition\n\n\n\nMain **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\"\n\nOptional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature \u003E 20 or temperature\u003C 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' \u003E 40\".\n\nThe **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity.\n\nThe **page link** contains information about the page to fetch and the sort ordering.\n\nLet's review the example:\n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\",\n \"inherit\": false\n }\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n },\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"label\"\n },\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"additionalInfo\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ],\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 10,\n \"sortOrder\": {\n \"key\": {\n \"key\": \"name\",\n \"type\": \"ENTITY_FIELD\"\n },\n \"direction\": \"ASC\"\n }\n }\n}\n```\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:\n\n # Entity Filters\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases.\n\n## Single Entity\n\nAllows to filter only one entity based on the id. For example, this entity filter selects certain device:\n\n```json\n{\n \"type\": \"singleEntity\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Group Entities Filter\n\nAllows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"entityGroup\",\n \"groupType\": \"DEVICE\",\n \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n}\n```\n\n## Entity List Filter\n\nAllows to filter entities of the same type using their ids. For example, this entity filter selects two devices:\n\n```json\n{\n \"type\": \"entityList\",\n \"entityType\": \"DEVICE\",\n \"entityList\": [\n \"e6501f30-2a7a-11ec-94eb-213c95f54092\",\n \"e6657bf0-2a7a-11ec-94eb-213c95f54092\"\n ]\n}\n```\n\n## Entity Name Filter\n\nAllows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality':\n\n```json\n{\n \"type\": \"entityName\",\n \"entityType\": \"DEVICE\",\n \"entityNameFilter\": \"Air Quality\"\n}\n```\n\n## Entity Type Filter\n\nAllows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers:\n\n```json\n{\n \"type\": \"entityType\",\n \"entityType\": \"CUSTOMER\"\n}\n```\n\n## Group List Filter\n\nReturn multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"entityGroupList\",\n \"groupType\": \"DEVICE\",\n \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"]\n}\n```\n\n## Group Name Filter\n\nAllows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"CAT\"\n}\n```\n\n## Entities by Group Name Filter\n\nAllows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters':\n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': \n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"},\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n## Entity owner Filter\n\nAllows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"stateEntityOwner\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Asset Type Filter\n\nAllows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla':\n\n```json\n{\n \"type\": \"assetType\",\n \"assetType\": \"charging station\",\n \"assetNameFilter\": \"Tesla\"\n}\n```\n\n## Device Type Filter\n\nAllows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC':\n\n```json\n{\n \"type\": \"deviceType\",\n \"deviceType\": \"Temperature Sensor\",\n \"deviceNameFilter\": \"ABC\"\n}\n```\n\n## Edge Type Filter\n\nAllows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada':\n\n```json\n{\n \"type\": \"edgeType\",\n \"edgeType\": \"Factory\",\n \"edgeNameFilter\": \"Nevada\"\n}\n```\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```\n\n## Api Usage Filter\n\nAllows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"apiUsageState\",\n \"customerId\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"CUSTOMER\"\n }\n}\n```\n\n## Relations Query Filter\n\nAllows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'.\n\nFor example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"relationsQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"filters\": [\n {\n \"relationType\": \"Contains\",\n \"entityTypes\": [\n \"DEVICE\",\n \"ASSET\"\n ]\n }\n ]\n}\n```\n\n## Asset Search Query\n\nAllows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions.\n\nFor example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"assetSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"assetTypes\": [\n \"charging station\"\n ]\n}\n```\n\n## Device Search Query\n\nAllows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"deviceTypes\": [\n \"Air Quality Sensor\",\n \"Charging port\"\n ]\n}\n```\n\n## Entity View Query\n\nAllows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"entityViewSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"entityViewTypes\": [\n \"Concrete mixer\"\n ]\n}\n```\n\n## Edge Search Query\n\nAllows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is \u003E 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"edgeTypes\": [\n \"Factory\"\n ]\n}\n```\n\n # Key Filters\nKey Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees:\n\n```json\n{\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n}\n```\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail.\n\n## Filter Key\n\nFilter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: \n\n * 'CLIENT_ATTRIBUTE' - used for client attributes; \n * 'SHARED_ATTRIBUTE' - used for shared attributes; \n * 'SERVER_ATTRIBUTE' - used for server attributes; \n * 'ATTRIBUTE' - used for any of the above; \n * 'TIME_SERIES' - used for time series values; \n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n\n\n Let's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value \u003C 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value \u003C 10 or value \u003E 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value \u003C 10 or (value \u003E 50 && value \u003C 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\n You may also want to replace hardcoded values (for example, temperature \u003E 20) with the more dynamic expression (for example, temperature \u003E 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: \n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\n Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findEntityDataByQuery", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelationsQuery" + "$ref": "#/components/schemas/EntityDataQuery" } } }, @@ -59951,10 +60343,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelationInfo" - } + "$ref": "#/components/schemas/PageDataEntityData" } } } @@ -60090,53 +60479,65 @@ ] } }, - "/api/relations/info/from/{fromType}/{fromId}": { - "get": { + "/api/entitiesQuery/find/keys": { + "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Get List of Relation Infos (findEntityRelationInfosByFrom)", - "description": "Returns list of relation info objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findEntityRelationInfosByFrom", + "summary": "Find Available Entity Keys by Query (deprecated)", + "description": "**Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead.\n\nReturns unique time series and/or attribute key names from entities matching the query.\n\nExecutes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names.\n\nPrimarily used for UI features like autocomplete suggestions.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "findAvailableEntityKeysByQuery", "parameters": [ { - "name": "fromType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "name": "timeseries", + "in": "query", + "description": "When true, includes unique time series key names in the response.\nWhen false, the 'timeseries' list will be empty.", "required": true, "schema": { - "type": "string" + "type": "boolean" } }, { - "name": "fromId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "attributes", + "in": "query", + "description": "When true, includes unique attribute key names in the response.\nWhen false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope.", "required": true, "schema": { - "type": "string" + "type": "boolean" } }, { - "name": "relationTypeGroup", + "name": "scope", "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", + "description": "Filters attribute keys by scope. Only applies when 'attributes' is true.\nIf not specified, returns attribute keys from all scopes.", "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE", + "CLIENT_SCOPE" + ] } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityDataQuery" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelationInfo" - } + "$ref": "#/components/schemas/AvailableEntityKeys" } } } @@ -60152,7 +60553,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -60262,6 +60663,7 @@ } } }, + "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -60272,53 +60674,77 @@ ] } }, - "/api/relations/info/to/{toType}/{toId}": { - "get": { + "/api/v2/entitiesQuery/find/keys": { + "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Get List of Relation Infos (findEntityRelationInfosByTo)", - "description": "Returns list of relation info objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findEntityRelationInfosByTo", + "summary": "Find Available Entity Keys By Query", + "description": "Discovers unique time series and/or attribute key names available on entities that match the given query.\nWorks in two steps: first, the request body (an Entity Data Query) is executed to find matching entities\n(page size is capped at 100); then, all distinct key names are collected from those entities.\n\nOptionally, each key can include a sample — the most recent value (by timestamp) for that key\nacross all matched entities.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "findAvailableEntityKeysByQueryV2", "parameters": [ { - "name": "toType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, + "name": "includeTimeseries", + "in": "query", + "description": "When true, includes unique time series keys in the response.\nWhen false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true.", + "required": false, "schema": { - "type": "string" + "type": "boolean", + "default": true } }, { - "name": "toId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "includeAttributes", + "in": "query", + "description": "When true, includes unique attribute keys in the response.\nWhen false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true.", + "required": false, "schema": { - "type": "string" + "type": "boolean", + "default": true } }, { - "name": "relationTypeGroup", + "name": "scopes", "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", + "description": "Filters attribute keys by scope. Only applies when 'includeAttributes' is true.\nWhen not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities,\nserver scope only for other entity types.", "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE", + "CLIENT_SCOPE" + ] + } + }, + { + "name": "includeSamples", + "in": "query", + "description": "When true, each key entry includes a 'sample' object with the most recent value and timestamp.\nWhen false, only key names are returned (sample is omitted from JSON).", + "required": false, + "schema": { + "type": "boolean", + "default": false } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityDataQuery" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelationInfo" - } + "$ref": "#/components/schemas/AvailableEntityKeysV2" } } } @@ -60334,7 +60760,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -60454,18 +60880,27 @@ ] } }, - "/api/relations/to/{toType}/{toId}": { + "/api/relation": { "get": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findEntityRelationsByTo)", - "description": "Returns list of relation objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findEntityRelationsByTo", + "summary": "Get Relation (getRelation)", + "description": "Returns relation object between two specified entities if present. Otherwise throws exception. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "getRelation", "parameters": [ { - "name": "toType", - "in": "path", + "name": "fromId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fromType", + "in": "query", "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { @@ -60473,9 +60908,9 @@ } }, { - "name": "toId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "relationType", + "in": "query", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", "required": true, "schema": { "type": "string" @@ -60489,6 +60924,24 @@ "schema": { "type": "string" } + }, + { + "name": "toId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "toType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -60497,10 +60950,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } + "$ref": "#/components/schemas/EntityRelation" } } } @@ -60636,52 +61086,24 @@ ] } }, - "/api/relations/to/{toType}/{toId}/{relationType}": { - "get": { + "/api/relations": { + "post": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findEntityRelationsByToAndRelationType)", - "description": "Returns list of relation objects for the specified entity by the 'to' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findEntityRelationsByToAndRelationType", - "parameters": [ - { - "name": "toType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "toId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationType", - "in": "path", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" + "summary": "Find related entities (findEntityRelationsByQuery)", + "description": "Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info.", + "operationId": "findEntityRelationsByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelationsQuery" + } } }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", @@ -60707,7 +61129,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -60825,36 +61247,37 @@ "ApiKeyForm": [] } ] - } - }, - "/api/v2/relation": { - "post": { + }, + "delete": { "tags": [ "entity-relation-controller" ], - "summary": "Create Relation (saveRelation)", - "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "saveRelation", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityRelation" - } + "summary": "Delete common relations (deleteRelations)", + "description": "Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "deleteRelations", + "parameters": [ + { + "name": "entityId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "entityType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityRelation" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -60867,7 +61290,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -60985,27 +61408,20 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/relations/from/{fromType}/{fromId}": { + "get": { "tags": [ "entity-relation-controller" ], - "summary": "Delete Relation (deleteRelation)", - "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "deleteRelation", + "summary": "Get List of Relations (findEntityRelationsByFrom)", + "description": "Returns list of relation objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByFrom", "parameters": [ - { - "name": "fromId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "fromType", - "in": "query", + "in": "path", "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { @@ -61013,9 +61429,9 @@ } }, { - "name": "relationType", - "in": "query", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "name": "fromId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -61029,24 +61445,6 @@ "schema": { "type": "string" } - }, - { - "name": "toId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "toType", - "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { @@ -61055,7 +61453,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelation" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } } } } @@ -61191,97 +61592,50 @@ ] } }, - "/api/customer/{customerId}/entityViewInfos": { + "/api/relations/from/{fromType}/{fromId}/{relationType}": { "get": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Get Customer Entity View Infos (getCustomerEntityViewInfos)", - "description": "Returns a page of entity view info objects owned by the specified customer. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerEntityViewInfos", + "summary": "Get List of Relations (findEntityRelationsByFromAndRelationType)", + "description": "Returns list of relation objects for the specified entity by the 'from' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByFromAndRelationType", "parameters": [ { - "name": "customerId", + "name": "fromType", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } }, { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "fromId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "relationType", + "in": "path", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "type", - "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", - "required": false, "schema": { "type": "string" } }, { - "name": "textSearch", + "name": "relationTypeGroup", "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", + "description": "A string value representing relation type group. For example, 'COMMON'", "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -61290,7 +61644,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityViewInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } } } } @@ -61426,97 +61783,34 @@ ] } }, - "/api/customer/{customerId}/entityViews": { - "get": { + "/api/relations/info": { + "post": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Get Customer Entity Views (getCustomerEntityViews)", - "description": "Returns a page of Entity View objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerEntityViews", - "parameters": [ - { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type" - ] + "summary": "Find related entity infos (findEntityRelationInfosByQuery)", + "description": "Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelationsQuery" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityView" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelationInfo" + } } } } @@ -61532,7 +61826,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -61652,78 +61946,40 @@ ] } }, - "/api/entityGroup/{entityGroupId}/entityViews": { + "/api/relations/info/from/{fromType}/{fromId}": { "get": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Get entity views by Entity Group Id (getEntityViewsByEntityGroupId)", - "description": "Returns a page of Entity View objects that belongs to specified Entity View Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityViewsByEntityGroupId", + "summary": "Get List of Relation Infos (findEntityRelationInfosByFrom)", + "description": "Returns list of relation info objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByFrom", "parameters": [ { - "name": "entityGroupId", + "name": "fromType", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } }, { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "fromId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", - "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type" - ] - } - }, - { - "name": "sortOrder", + "name": "relationTypeGroup", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "A string value representing relation type group. For example, 'COMMON'", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -61733,7 +61989,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityView" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelationInfo" + } } } } @@ -61869,83 +62128,53 @@ ] } }, - "/api/entityView": { - "post": { + "/api/relations/info/to/{toType}/{toId}": { + "get": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Save or update entity view (saveEntityView)", - "description": "Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Entity View entity.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveEntityView", + "summary": "Get List of Relation Infos (findEntityRelationInfosByTo)", + "description": "Returns list of relation info objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByTo", "parameters": [ { - "name": "entityGroupId", - "in": "query", - "required": false, + "name": "toType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, "schema": { "type": "string" } }, { - "name": "entityGroupIds", - "in": "query", - "description": "A list of entity group ids, separated by comma ','", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "nameConflictPolicy", - "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", - "required": false, - "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" - } - }, - { - "name": "uniquifySeparator", - "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", - "required": false, + "name": "toId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "string", - "default": "_" + "type": "string" } }, { - "name": "uniquifyStrategy", + "name": "relationTypeGroup", "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "description": "A string value representing relation type group. For example, 'COMMON'", "required": false, "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityView" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelationInfo" + } } } } @@ -61961,7 +62190,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -62081,23 +62310,41 @@ ] } }, - "/api/entityView/info/{entityViewId}": { + "/api/relations/to/{toType}/{toId}": { "get": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Get entity view info (getEntityViewInfoById)", - "description": "Fetch the Entity View info object based on the provided entity view id. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEntityViewInfoById", + "summary": "Get List of Relations (findEntityRelationsByTo)", + "description": "Returns list of relation objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByTo", "parameters": [ { - "name": "entityViewId", + "name": "toType", "in": "path", - "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "toId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -62106,7 +62353,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityViewInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } } } } @@ -62242,14 +62492,52 @@ ] } }, - "/api/entityView/types": { + "/api/relations/to/{toType}/{toId}/{relationType}": { "get": { "tags": [ - "entity-view-controller" + "entity-relation-controller" + ], + "summary": "Get List of Relations (findEntityRelationsByToAndRelationType)", + "description": "Returns list of relation objects for the specified entity by the 'to' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByToAndRelationType", + "parameters": [ + { + "name": "toType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "toId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationType", + "in": "path", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + } ], - "summary": "Get Entity View Types (getEntityViewTypes)", - "description": "Returns a set of unique entity view types based on entity views that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEntityViewTypes", "responses": { "200": { "description": "OK", @@ -62258,7 +62546,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntitySubtype" + "$ref": "#/components/schemas/EntityRelation" } } } @@ -62395,32 +62683,31 @@ ] } }, - "/api/entityView/{entityViewId}": { - "get": { + "/api/v2/relation": { + "post": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Get entity view (getEntityViewById)", - "description": "Fetch the EntityView object based on the provided entity view id. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEntityViewById", - "parameters": [ - { - "name": "entityViewId", - "in": "path", - "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Create Relation (saveRelation)", + "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "saveRelation", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelation" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "$ref": "#/components/schemas/EntityRelation" } } } @@ -62436,7 +62723,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -62557,16 +62844,61 @@ }, "delete": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Delete entity view (deleteEntityView)", - "description": "Delete the EntityView object based on the provided entity view id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "deleteEntityView", + "summary": "Delete Relation (deleteRelation)", + "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "deleteRelation", "parameters": [ { - "name": "entityViewId", - "in": "path", - "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "fromId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fromType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationType", + "in": "query", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "toId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "toType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" @@ -62575,7 +62907,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } }, "400": { "description": "Bad Request", @@ -62708,15 +63047,24 @@ ] } }, - "/api/entityViewInfos/all": { + "/api/customer/{customerId}/entityViewInfos": { "get": { "tags": [ "entity-view-controller" ], - "summary": "Get All Entity View Infos for current user (getAllEntityViewInfos)", - "description": "Returns a page of entity view info objects owned by the tenant or the customer of a current user. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllEntityViewInfos", + "summary": "Get Customer Entity View Infos (getCustomerEntityViewInfos)", + "description": "Returns a page of entity view info objects owned by the specified customer. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerEntityViewInfos", "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "pageSize", "in": "query", @@ -62934,34 +63282,97 @@ ] } }, - "/api/entityViews": { - "post": { + "/api/customer/{customerId}/entityViews": { + "get": { "tags": [ "entity-view-controller" ], - "summary": "Find related entity views (findEntityViewsByQuery)", - "description": "Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findEntityViewsByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityViewSearchQuery" - } + "summary": "Get Customer Entity Views (getCustomerEntityViews)", + "description": "Returns a page of Entity View objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerEntityViews", + "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityView" - } + "$ref": "#/components/schemas/PageDataEntityView" } } } @@ -62977,7 +63388,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -63097,25 +63508,78 @@ ] } }, - "/api/entityViews/list": { + "/api/entityGroup/{entityGroupId}/entityViews": { "get": { "tags": [ "entity-view-controller" ], - "summary": "Get Entity Views By Ids (getEntityViewsByIds)", - "description": "Requested entity views must be owned by tenant or assigned to customer which user is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getEntityViewsByIds", + "summary": "Get entity views by Entity Group Id (getEntityViewsByEntityGroupId)", + "description": "Returns a page of Entity View objects that belongs to specified Entity View Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityViewsByEntityGroupId", "parameters": [ { - "name": "entityViewIds", + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", "in": "query", - "description": "A list of entity view ids, separated by comma ','", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -63125,10 +63589,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityView" - } + "$ref": "#/components/schemas/PageDataEntityView" } } } @@ -63264,25 +63725,76 @@ ] } }, - "/api/tenant/entityView": { - "get": { + "/api/entityView": { + "post": { "tags": [ "entity-view-controller" ], - "summary": "Get Entity View by name (getTenantEntityViewByName)", - "description": "Fetch the Entity View object based on the tenant id and entity view name. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEntityViewByName", + "summary": "Save or update entity view (saveEntityView)", + "description": "Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Entity View entity.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveEntityView", "parameters": [ { - "name": "entityViewName", + "name": "entityGroupId", "in": "query", - "description": "Entity View name", - "required": true, + "required": false, "schema": { "type": "string" } + }, + { + "name": "entityGroupIds", + "in": "query", + "description": "A list of entity group ids, separated by comma ','", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "nameConflictPolicy", + "in": "query", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", + "required": false, + "schema": { + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" + } + }, + { + "name": "uniquifySeparator", + "in": "query", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", + "required": false, + "schema": { + "type": "string", + "default": "_" + } + }, + { + "name": "uniquifyStrategy", + "in": "query", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "required": false, + "schema": { + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityView" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -63305,7 +63817,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -63425,79 +63937,23 @@ ] } }, - "/api/tenant/entityViews": { + "/api/entityView/info/{entityViewId}": { "get": { "tags": [ "entity-view-controller" ], - "summary": "Get Tenant Entity Views (getTenantEntityViews)", - "description": "Returns a page of entity views owned by tenant. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEntityViews", + "summary": "Get entity view info (getEntityViewInfoById)", + "description": "Fetch the Entity View info object based on the provided entity view id. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewInfoById", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "entityViewId", + "in": "path", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", - "required": false, "schema": { "type": "string" } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -63506,7 +63962,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityView" + "$ref": "#/components/schemas/EntityViewInfo" } } } @@ -63642,88 +64098,24 @@ ] } }, - "/api/user/entityViews": { + "/api/entityView/types": { "get": { "tags": [ "entity-view-controller" ], - "summary": "Get Entity Views (getUserEntityViews)", - "description": "Returns a page of entity views that are available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUserEntityViews", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "type", - "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "summary": "Get Entity View Types (getEntityViewTypes)", + "description": "Returns a set of unique entity view types based on entity views that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityView" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -63859,135 +64251,32 @@ ] } }, - "/api/events/{entityType}/{entityId}": { - "post": { + "/api/entityView/{entityViewId}": { + "get": { "tags": [ - "event-controller" + "entity-view-controller" ], - "summary": "Get Events by event filter (getEventsByFilter)", - "description": "Returns a page of events for the chosen entity by specifying the event filter. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n# Event Filter Definition\n\n6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. \n\nNote,\n\n * 'server' - string value representing the server name, identif ier or ip address where the platform is running;\n * 'errorStr' - the case insensitive 'contains' filter based on error message.\n\n## Error Event Filter\n\n```json\n{\n \"eventType\":\"ERROR\",\n \"server\":\"ip-172-31-24-152\",\n \"method\":\"onClusterEventMsg\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'method' - string value representing the method name when the error happened.\n\n## Lifecycle Event Filter\n\n```json\n{\n \"eventType\":\"LC_EVENT\",\n \"server\":\"ip-172-31-24-152\",\n \"event\":\"STARTED\",\n \"status\":\"Success\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'event' - string value representing the lifecycle event type;\n * 'status' - string value representing status of the lifecycle event.\n\n## Statistics Event Filter\n\n```json\n{\n \"eventType\":\"STATS\",\n \"server\":\"ip-172-31-24-152\",\n \"messagesProcessed\":10,\n \"errorsOccurred\":5\n}\n```\n\n * 'messagesProcessed' - the minimum number of successfully processed messages;\n * 'errorsOccurred' - the minimum number of errors occurred during messages processing.\n\n## Debug Rule Node Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_NODE\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n## Debug Rule Chain Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_CHAIN\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity);\n * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message;\n * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message;\n * 'entityName' - string value representing the entity type;\n * 'relationType' - string value representing the type of message routing;\n * 'entityId' - string value representing the entity id in the event body (originator of the message);\n * 'msgType' - string value representing the message type;\n * 'isError' - boolean value to filter the errors.\n\n## Debug Calculated Field Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_CALCULATED_FIELD\",\n \"server\":\"ip-172-31-24-152\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\",\n \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"arguments\":\"{\n \"x\": {\n \"ts\": 1739432016629,\n \"value\": 20\n },\n \"y\": {\n \"ts\": 1739429717656,\n \"value\": 12\n }\n }\",\n \"result\":\"{\n \"x + y\": 32\n }\",\n}\n```\n\n * 'entityId' - string value representing the entity id in the event body;\n * 'entityType' - string value representing the entity type;\n * 'msgId' - string value representing the message id in the rule engine;\n * 'msgType' - string value representing the message type;\n * 'arguments' - string value representing the arguments that were used in the calculation performed;\n * 'result' - string value representing the result of a calculation;\n * 'isError' - boolean value to filter the errors.\n\n", - "operationId": "getEventsByFilter", + "summary": "Get entity view (getEntityViewById)", + "description": "Fetch the EntityView object based on the provided entity view id. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewById", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "entityViewId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tenantId", - "in": "query", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The value is not used in searching.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ts", - "id" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Events with creation time before it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Events with creation time after it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventFilter" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEventInfo" + "$ref": "#/components/schemas/EntityView" } } } @@ -64003,7 +64292,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -64121,66 +64410,25 @@ "ApiKeyForm": [] } ] - } - }, - "/api/events/{entityType}/{entityId}/clear": { - "post": { + }, + "delete": { "tags": [ - "event-controller" + "entity-view-controller" ], - "summary": "Clear Events (clearEvents)", - "description": "Clears events by filter for specified entity.", - "operationId": "clearEvents", + "summary": "Delete entity view (deleteEntityView)", + "description": "Delete the EntityView object based on the provided entity view id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteEntityView", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "entityViewId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Events with creation time before it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Events with creation time after it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventFilter" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK" @@ -64196,7 +64444,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -64316,76 +64564,57 @@ ] } }, - "/api/events/{entityType}/{entityId}/{eventType}": { + "/api/entityViewInfos/all": { "get": { "tags": [ - "event-controller" + "entity-view-controller" ], - "summary": "Get Events by type (getEventsByType)", - "description": "Returns a page of events for specified entity by specifying event type. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. ", - "operationId": "getEventsByType", + "summary": "Get All Entity View Infos for current user (getAllEntityViewInfos)", + "description": "Returns a page of entity view info objects owned by the tenant or the customer of a current user. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllEntityViewInfos", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "eventType", - "in": "path", - "description": "A string value representing event type", - "required": true, - "schema": { - "type": "string" - }, - "example": "STATS" - }, - { - "name": "tenantId", + "name": "page", "in": "query", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "pageSize", + "name": "includeCustomers", "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, + "description": "Include customer or sub-customer entities", + "required": false, "schema": { - "type": "integer", - "format": "int32" + "type": "boolean" } }, { - "name": "page", + "name": "type", "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { "name": "textSearch", "in": "query", - "description": "The value is not used in searching.", + "description": "The case insensitive 'substring' filter based on the entity view name.", "required": false, "schema": { "type": "string" @@ -64399,8 +64628,9 @@ "schema": { "type": "string", "enum": [ - "ts", - "id" + "createdTime", + "name", + "type" ] } }, @@ -64416,26 +64646,6 @@ "DESC" ] } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Events with creation time before it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Events with creation time after it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } } ], "responses": { @@ -64444,7 +64654,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEventInfo" + "$ref": "#/components/schemas/PageDataEntityViewInfo" } } } @@ -64580,25 +64790,24 @@ ] } }, - "/api/entityGroup/{entityGroupId}/groupPermissions": { - "get": { + "/api/entityViews": { + "post": { "tags": [ - "group-permission-controller" + "entity-view-controller" ], - "summary": "Get group permissions by Entity Group Id (getEntityGroupPermissions)", - "description": "Returns a list of group permission objects that is assigned for the specified Entity Group Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getEntityGroupPermissions", - "parameters": [ - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Find related entity views (findEntityViewsByQuery)", + "description": "Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findEntityViewsByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityViewSearchQuery" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -64607,7 +64816,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/GroupPermissionInfo" + "$ref": "#/components/schemas/EntityView" } } } @@ -64624,7 +64833,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -64744,31 +64953,38 @@ ] } }, - "/api/groupPermission": { - "post": { + "/api/entityViews/list": { + "get": { "tags": [ - "group-permission-controller" + "entity-view-controller" ], - "summary": "Create Or Update Group Permission (saveGroupPermission)", - "description": "Creates or Updates the Group Permission. When creating group permission, platform generates Group Permission Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Group Permission id will be present in the response. Specify existing Group Permission id to update the permission. Referencing non-existing Group Permission Id will cause 'Not Found' error.\n\nGroup permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveGroupPermission", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GroupPermission" + "summary": "Get Entity Views By Ids (getEntityViewsByIds)", + "description": "Requested entity views must be owned by tenant or assigned to customer which user is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getEntityViewsByIds", + "parameters": [ + { + "name": "entityViewIds", + "in": "query", + "description": "A list of entity view ids, separated by comma ','", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" } } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GroupPermission" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityView" + } } } } @@ -64784,7 +65000,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -64904,31 +65120,22 @@ ] } }, - "/api/groupPermission/info/{groupPermissionId}": { + "/api/tenant/entityView": { "get": { "tags": [ - "group-permission-controller" + "entity-view-controller" ], - "summary": "Get Group Permission Info (getGroupPermissionInfoById)", - "description": "Fetch the Group Permission Info object based on the provided Group Permission Id and the flag that controls what additional information to load: User or Entity Group. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getGroupPermissionInfoById", + "summary": "Get Entity View by name (getTenantEntityViewByName)", + "description": "Fetch the Entity View object based on the tenant id and entity view name. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEntityViewByName", "parameters": [ { - "name": "groupPermissionId", - "in": "path", - "description": "A string value representing the group permission id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "isUserGroup", + "name": "entityViewName", "in": "query", - "description": "Load additional information about User('true') or Entity Group('false).", + "description": "Entity View name", "required": true, "schema": { - "type": "boolean" + "type": "string" } } ], @@ -64938,7 +65145,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GroupPermissionInfo" + "$ref": "#/components/schemas/EntityView" } } } @@ -65074,23 +65281,79 @@ ] } }, - "/api/groupPermission/{groupPermissionId}": { + "/api/tenant/entityViews": { "get": { "tags": [ - "group-permission-controller" + "entity-view-controller" ], - "summary": "Get Group Permission (getGroupPermissionById)", - "description": "Fetch the Group Permission object based on the provided Group Permission Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getGroupPermissionById", + "summary": "Get Tenant Entity Views (getTenantEntityViews)", + "description": "Returns a page of entity views owned by tenant. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEntityViews", "parameters": [ { - "name": "groupPermissionId", - "in": "path", - "description": "A string value representing the group permission id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -65099,7 +65362,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GroupPermission" + "$ref": "#/components/schemas/PageDataEntityView" } } } @@ -65233,28 +65496,93 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/user/entityViews": { + "get": { "tags": [ - "group-permission-controller" + "entity-view-controller" ], - "summary": "Delete group permission (deleteGroupPermission)", - "description": "Deletes the group permission. Referencing non-existing group permission Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteGroupPermission", + "summary": "Get Entity Views (getUserEntityViews)", + "description": "Returns a page of entity views that are available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserEntityViews", "parameters": [ { - "name": "groupPermissionId", - "in": "path", - "description": "A string value representing the group permission id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, "schema": { "type": "string" } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityView" + } + } + } }, "400": { "description": "Bad Request", @@ -65387,23 +65715,123 @@ ] } }, - "/api/userGroup/groupPermissions/info": { + "/api/events/{entityType}/{entityId}": { "post": { "tags": [ - "group-permission-controller" + "event-controller" + ], + "summary": "Get Events by event filter (getEventsByFilter)", + "description": "Returns a page of events for the chosen entity by specifying the event filter. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n# Event Filter Definition\n\n6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. \n\nNote,\n\n * 'server' - string value representing the server name, identif ier or ip address where the platform is running;\n * 'errorStr' - the case insensitive 'contains' filter based on error message.\n\n## Error Event Filter\n\n```json\n{\n \"eventType\":\"ERROR\",\n \"server\":\"ip-172-31-24-152\",\n \"method\":\"onClusterEventMsg\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'method' - string value representing the method name when the error happened.\n\n## Lifecycle Event Filter\n\n```json\n{\n \"eventType\":\"LC_EVENT\",\n \"server\":\"ip-172-31-24-152\",\n \"event\":\"STARTED\",\n \"status\":\"Success\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'event' - string value representing the lifecycle event type;\n * 'status' - string value representing status of the lifecycle event.\n\n## Statistics Event Filter\n\n```json\n{\n \"eventType\":\"STATS\",\n \"server\":\"ip-172-31-24-152\",\n \"messagesProcessed\":10,\n \"errorsOccurred\":5\n}\n```\n\n * 'messagesProcessed' - the minimum number of successfully processed messages;\n * 'errorsOccurred' - the minimum number of errors occurred during messages processing.\n\n## Debug Rule Node Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_NODE\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n## Debug Rule Chain Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_CHAIN\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity);\n * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message;\n * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message;\n * 'entityName' - string value representing the entity type;\n * 'relationType' - string value representing the type of message routing;\n * 'entityId' - string value representing the entity id in the event body (originator of the message);\n * 'msgType' - string value representing the message type;\n * 'isError' - boolean value to filter the errors.\n\n## Debug Calculated Field Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_CALCULATED_FIELD\",\n \"server\":\"ip-172-31-24-152\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\",\n \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"arguments\":\"{\n \"x\": {\n \"ts\": 1739432016629,\n \"value\": 20\n },\n \"y\": {\n \"ts\": 1739429717656,\n \"value\": 12\n }\n }\",\n \"result\":\"{\n \"x + y\": 32\n }\",\n}\n```\n\n * 'entityId' - string value representing the entity id in the event body;\n * 'entityType' - string value representing the entity type;\n * 'msgId' - string value representing the message id in the rule engine;\n * 'msgType' - string value representing the message type;\n * 'arguments' - string value representing the arguments that were used in the calculation performed;\n * 'result' - string value representing the result of a calculation;\n * 'isError' - boolean value to filter the errors.\n\n", + "operationId": "getEventsByFilter", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tenantId", + "in": "query", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The value is not used in searching.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ts", + "id" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "Timestamp. Events with creation time before it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Events with creation time after it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + } ], - "summary": "Load User Group Permissions (loadUserGroupPermissionInfos)", - "description": "Enrich a list of group permission objects with the information about Role, User and Entity Groups. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "loadUserGroupPermissionInfos", "requestBody": { "content": { "application/json": { "schema": { - "type": "array", - "description": "JSON array of group permission objects", - "items": { - "$ref": "#/components/schemas/GroupPermission" - } + "$ref": "#/components/schemas/EventFilter" } } }, @@ -65415,10 +65843,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GroupPermissionInfo" - } + "$ref": "#/components/schemas/PageDataEventInfo" } } } @@ -65554,39 +65979,68 @@ ] } }, - "/api/userGroup/{userGroupId}/groupPermissions": { - "get": { + "/api/events/{entityType}/{entityId}/clear": { + "post": { "tags": [ - "group-permission-controller" + "event-controller" ], - "summary": "Get group permissions by User Group Id (getUserGroupPermissions)", - "description": "Returns a list of group permission objects that belongs to specified User Group Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUserGroupPermissions", + "summary": "Clear Events (clearEvents)", + "description": "Clears events by filter for specified entity.", + "operationId": "clearEvents", "parameters": [ { - "name": "userGroupId", + "name": "entityType", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "startTime", + "in": "query", + "description": "Timestamp. Events with creation time before it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Events with creation time after it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GroupPermissionInfo" - } - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventFilter" } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -65598,7 +66052,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -65718,44 +66172,135 @@ ] } }, - "/api/image": { - "post": { + "/api/events/{entityType}/{entityId}/{eventType}": { + "get": { "tags": [ - "image-controller" + "event-controller" ], - "summary": "uploadImage", - "operationId": "uploadImage", - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "title": { - "type": "string" - }, - "imageSubType": { - "type": "string" - } - }, - "required": [ - "file" - ] - } + "summary": "Get Events by type (getEventsByType)", + "description": "Returns a page of events for specified entity by specifying event type. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. ", + "operationId": "getEventsByType", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "eventType", + "in": "path", + "description": "A string value representing event type", + "required": true, + "schema": { + "type": "string" + }, + "example": "STATS" + }, + { + "name": "tenantId", + "in": "query", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The value is not used in searching.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ts", + "id" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "Timestamp. Events with creation time before it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Events with creation time after it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" } } - }, + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "$ref": "#/components/schemas/PageDataEventInfo" } } } @@ -65771,7 +66316,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -65891,30 +66436,35 @@ ] } }, - "/api/image/import": { - "put": { + "/api/entityGroup/{entityGroupId}/groupPermissions": { + "get": { "tags": [ - "image-controller" + "group-permission-controller" ], - "summary": "importImage", - "operationId": "importImage", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceExportData" - } + "summary": "Get group permissions by Entity Group Id (getEntityGroupPermissions)", + "description": "Returns a list of group permission objects that is assigned for the specified Entity Group Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getEntityGroupPermissions", + "parameters": [ + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupPermissionInfo" + } } } } @@ -66050,101 +66600,31 @@ ] } }, - "/api/images": { - "get": { + "/api/groupPermission": { + "post": { "tags": [ - "image-controller" + "group-permission-controller" ], - "summary": "getImages", - "operationId": "getImages", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "imageSubType", - "in": "query", - "description": "A string value representing resource sub-type.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "IMAGE", - "SCADA_SYMBOL" - ] - } - }, - { - "name": "includeSystemImages", - "in": "query", - "description": "Use 'true' to include system images. Disabled by default. Ignored for requests by users with system administrator authority.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the resource title.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "title", - "resourceType", - "tenantId" - ] + "summary": "Create Or Update Group Permission (saveGroupPermission)", + "description": "Creates or Updates the Group Permission. When creating group permission, platform generates Group Permission Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Group Permission id will be present in the response. Specify existing Group Permission id to update the permission. Referencing non-existing Group Permission Id will cause 'Not Found' error.\n\nGroup permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveGroupPermission", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupPermission" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataTbResourceInfo" + "$ref": "#/components/schemas/GroupPermission" } } } @@ -66160,7 +66640,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -66280,36 +66760,31 @@ ] } }, - "/api/images/public/{publicResourceKey}": { + "/api/groupPermission/info/{groupPermissionId}": { "get": { "tags": [ - "image-controller" + "group-permission-controller" ], - "summary": "downloadPublicImage", - "operationId": "downloadPublicImage", + "summary": "Get Group Permission Info (getGroupPermissionInfoById)", + "description": "Fetch the Group Permission Info object based on the provided Group Permission Id and the flag that controls what additional information to load: User or Entity Group. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getGroupPermissionInfoById", "parameters": [ { - "name": "publicResourceKey", + "name": "groupPermissionId", "in": "path", + "description": "A string value representing the group permission id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "If-None-Match", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "Accept-Encoding", - "in": "header", - "required": false, + "name": "isUserGroup", + "in": "query", + "description": "Load additional information about User('true') or Entity Group('false).", + "required": true, "schema": { - "type": "string" + "type": "boolean" } } ], @@ -66317,10 +66792,9 @@ "200": { "description": "OK", "content": { - "image/*": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/GroupPermissionInfo" } } } @@ -66456,61 +66930,32 @@ ] } }, - "/api/images/{type}/{key}": { + "/api/groupPermission/{groupPermissionId}": { "get": { "tags": [ - "image-controller" + "group-permission-controller" ], - "summary": "downloadImage", - "operationId": "downloadImage", + "summary": "Get Group Permission (getGroupPermissionById)", + "description": "Fetch the Group Permission object based on the provided Group Permission Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getGroupPermissionById", "parameters": [ { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", - "required": true, - "schema": { - "type": "string", - "enum": [ - "tenant", - "system" - ] - } - }, - { - "name": "key", + "name": "groupPermissionId", "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "description": "A string value representing the group permission id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "If-None-Match", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "Accept-Encoding", - "in": "header", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { "200": { "description": "OK", "content": { - "image/*": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/GroupPermission" } } } @@ -66645,64 +67090,27 @@ } ] }, - "put": { + "delete": { "tags": [ - "image-controller" + "group-permission-controller" ], - "summary": "updateImage", - "operationId": "updateImage", + "summary": "Delete group permission (deleteGroupPermission)", + "description": "Deletes the group permission. Referencing non-existing group permission Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteGroupPermission", "parameters": [ { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", - "required": true, - "schema": { - "type": "string", - "enum": [ - "tenant", - "system" - ] - } - }, - { - "name": "key", + "name": "groupPermissionId", "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "description": "A string value representing the group permission id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - }, - "required": [ - "file" - ] - } - } - } - }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TbResourceInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -66833,52 +67241,40 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/userGroup/groupPermissions/info": { + "post": { "tags": [ - "image-controller" + "group-permission-controller" ], - "summary": "deleteImage", - "operationId": "deleteImage", - "parameters": [ - { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", - "required": true, - "schema": { - "type": "string", - "enum": [ - "tenant", - "system" - ] - } - }, - { - "name": "key", - "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", - "required": true, - "schema": { - "type": "string" + "summary": "Load User Group Permissions (loadUserGroupPermissionInfos)", + "description": "Enrich a list of group permission objects with the information about Role, User and Entity Groups. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "loadUserGroupPermissionInfos", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "JSON array of group permission objects", + "items": { + "$ref": "#/components/schemas/GroupPermission" + } + } } }, - { - "name": "force", - "in": "query", - "required": false, - "schema": { - "type": "boolean" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbImageDeleteResult" + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupPermissionInfo" + } } } } @@ -66894,7 +67290,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -67014,31 +67410,19 @@ ] } }, - "/api/images/{type}/{key}/export": { + "/api/userGroup/{userGroupId}/groupPermissions": { "get": { "tags": [ - "image-controller" + "group-permission-controller" ], - "summary": "exportImage", - "operationId": "exportImage", + "summary": "Get group permissions by User Group Id (getUserGroupPermissions)", + "description": "Returns a list of group permission objects that belongs to specified User Group Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserGroupPermissions", "parameters": [ { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", - "required": true, - "schema": { - "type": "string", - "enum": [ - "tenant", - "system" - ] - } - }, - { - "name": "key", + "name": "userGroupId", "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -67051,7 +67435,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceExportData" + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupPermissionInfo" + } } } } @@ -67187,37 +67574,37 @@ ] } }, - "/api/images/{type}/{key}/info": { - "get": { + "/api/image": { + "post": { "tags": [ "image-controller" ], - "summary": "getImageInfo", - "operationId": "getImageInfo", - "parameters": [ - { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", - "required": true, - "schema": { - "type": "string", - "enum": [ - "tenant", - "system" - ] - } - }, - { - "name": "key", - "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", - "required": true, - "schema": { - "type": "string" + "summary": "uploadImage", + "operationId": "uploadImage", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + }, + "title": { + "type": "string" + }, + "imageSubType": { + "type": "string" + } + }, + "required": [ + "file" + ] + } } } - ], + }, "responses": { "200": { "description": "OK", @@ -67240,7 +67627,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -67358,42 +67745,20 @@ "ApiKeyForm": [] } ] - }, + } + }, + "/api/image/import": { "put": { "tags": [ "image-controller" ], - "summary": "updateImageInfo", - "operationId": "updateImageInfo", - "parameters": [ - { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", - "required": true, - "schema": { - "type": "string", - "enum": [ - "tenant", - "system" - ] - } - }, - { - "name": "key", - "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "importImage", + "operationId": "importImage", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "$ref": "#/components/schemas/ResourceExportData" } } }, @@ -67541,50 +67906,91 @@ ] } }, - "/api/images/{type}/{key}/preview": { + "/api/images": { "get": { "tags": [ "image-controller" ], - "summary": "downloadImagePreview", - "operationId": "downloadImagePreview", + "summary": "getImages", + "operationId": "getImages", "parameters": [ { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "imageSubType", + "in": "query", + "description": "A string value representing resource sub-type.", + "required": false, "schema": { "type": "string", "enum": [ - "tenant", - "system" + "IMAGE", + "SCADA_SYMBOL" ] } }, { - "name": "key", - "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", - "required": true, + "name": "includeSystemImages", + "in": "query", + "description": "Use 'true' to include system images. Disabled by default. Ignored for requests by users with system administrator authority.", + "required": false, "schema": { - "type": "string" + "type": "boolean" } }, { - "name": "If-None-Match", - "in": "header", + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the resource title.", "required": false, "schema": { "type": "string" } }, { - "name": "Accept-Encoding", - "in": "header", + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "createdTime", + "title", + "resourceType", + "tenantId" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -67592,10 +67998,9 @@ "200": { "description": "OK", "content": { - "image/png": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/PageDataTbResourceInfo" } } } @@ -67731,42 +68136,36 @@ ] } }, - "/api/images/{type}/{key}/public/{isPublic}": { - "put": { + "/api/images/public/{publicResourceKey}": { + "get": { "tags": [ "image-controller" ], - "summary": "updateImagePublicStatus", - "operationId": "updateImagePublicStatus", + "summary": "downloadPublicImage", + "operationId": "downloadPublicImage", "parameters": [ { - "name": "type", + "name": "publicResourceKey", "in": "path", - "description": "Type of the image: tenant or system", "required": true, "schema": { - "type": "string", - "enum": [ - "tenant", - "system" - ] + "type": "string" } }, { - "name": "key", - "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", - "required": true, + "name": "If-None-Match", + "in": "header", + "required": false, "schema": { "type": "string" } }, { - "name": "isPublic", - "in": "path", - "required": true, + "name": "Accept-Encoding", + "in": "header", + "required": false, "schema": { - "type": "boolean" + "type": "string" } } ], @@ -67774,9 +68173,10 @@ "200": { "description": "OK", "content": { - "application/json": { + "image/*": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "type": "string", + "format": "binary" } } } @@ -67912,13 +68312,13 @@ ] } }, - "/api/noauth/whiteLabel/loginFavicon/{type}/{key}": { + "/api/images/{type}/{key}": { "get": { "tags": [ "image-controller" ], - "summary": "downloadLoginFavicon", - "operationId": "downloadLoginFavicon", + "summary": "downloadImage", + "operationId": "downloadImage", "parameters": [ { "name": "type", @@ -68091,16 +68491,22 @@ } } } - } - } - }, - "/api/noauth/whiteLabel/loginLogo/{type}/{key}": { - "get": { + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + }, + "put": { "tags": [ "image-controller" ], - "summary": "downloadLoginLogo", - "operationId": "downloadLoginLogo", + "summary": "updateImage", + "operationId": "updateImage", "parameters": [ { "name": "type", @@ -68123,32 +68529,33 @@ "schema": { "type": "string" } - }, - { - "name": "If-None-Match", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "Accept-Encoding", - "in": "header", - "required": false, - "schema": { - "type": "string" - } } ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + }, + "required": [ + "file" + ] + } + } + } + }, "responses": { "200": { "description": "OK", "content": { - "image/*": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -68273,37 +68680,51 @@ } } } - } - } - }, - "/api/edge/integration/{edgeId}/missingAttributes": { - "get": { + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + }, + "delete": { "tags": [ - "integration-controller" + "image-controller" ], - "summary": "Find edge missing attributes for assigned integrations (findEdgeMissingAttributes)", - "description": "Returns list of edge attribute names that are missing in assigned integrations.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "findEdgeMissingAttributes", + "summary": "deleteImage", + "operationId": "deleteImage", "parameters": [ { - "name": "edgeId", + "name": "type", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "type": "string", + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", "required": true, "schema": { "type": "string" } }, { - "name": "integrationIds", + "name": "force", "in": "query", - "description": "A list of assigned integration ids, separated by comma ','", - "required": true, + "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "boolean" } } ], @@ -68313,7 +68734,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/TbImageDeleteResult" } } } @@ -68449,19 +68870,31 @@ ] } }, - "/api/edge/integration/{integrationId}/allMissingAttributes": { + "/api/images/{type}/{key}/export": { "get": { "tags": [ - "integration-controller" + "image-controller" ], - "summary": "Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes)", - "description": "Returns list of attribute names of all related edges that are missing in the integration configuration.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "findAllRelatedEdgesMissingAttributes", + "summary": "exportImage", + "operationId": "exportImage", "parameters": [ { - "name": "integrationId", + "name": "type", "in": "path", - "description": "A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "type": "string", + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", "required": true, "schema": { "type": "string" @@ -68474,7 +68907,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ResourceExportData" } } } @@ -68610,26 +69043,31 @@ ] } }, - "/api/edge/{edgeId}/integration/{integrationId}": { - "post": { + "/api/images/{type}/{key}/info": { + "get": { "tags": [ - "integration-controller" + "image-controller" ], - "summary": "Assign integration to edge (assignIntegrationToEdge)", - "description": "Creates assignment of an existing integration edge template to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once integration will be delivered to edge service, it's going to start locally. \n\nOnly integration edge template can be assigned to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignIntegrationToEdge", + "summary": "getImageInfo", + "operationId": "getImageInfo", "parameters": [ { - "name": "edgeId", + "name": "type", "in": "path", + "description": "Type of the image: tenant or system", "required": true, "schema": { - "type": "string" + "type": "string", + "enum": [ + "tenant", + "system" + ] } }, { - "name": "integrationId", + "name": "key", "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", "required": true, "schema": { "type": "string" @@ -68642,7 +69080,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Integration" + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -68658,7 +69096,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -68777,38 +69215,53 @@ } ] }, - "delete": { + "put": { "tags": [ - "integration-controller" + "image-controller" ], - "summary": "Unassign integration from edge (unassignIntegrationFromEdge)", - "description": "Clears assignment of the integration to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove integration locally.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "unassignIntegrationFromEdge", + "summary": "updateImageInfo", + "operationId": "updateImageInfo", "parameters": [ { - "name": "edgeId", + "name": "type", "in": "path", + "description": "Type of the image: tenant or system", "required": true, "schema": { - "type": "string" + "type": "string", + "enum": [ + "tenant", + "system" + ] } }, { - "name": "integrationId", + "name": "key", "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceInfo" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Integration" + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -68944,84 +69397,50 @@ ] } }, - "/api/edge/{edgeId}/integrationInfos": { + "/api/images/{type}/{key}/preview": { "get": { "tags": [ - "integration-controller" + "image-controller" ], - "summary": "Get Edge Integrations (getEdgeIntegrationInfos)", - "description": "Returns a page of Integrations assigned to the specified edge. The integration object contains information about the Integration, including the heavyweight configuration object. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEdgeIntegrationInfos", + "summary": "downloadImagePreview", + "operationId": "downloadImagePreview", "parameters": [ { - "name": "edgeId", + "name": "type", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "description": "Type of the image: tenant or system", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "enum": [ + "tenant", + "system" + ] } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the integration name.", - "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", + "name": "If-None-Match", + "in": "header", "required": false, "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "debugMode", - "allowCreateDevicesOrAssets", - "enabled", - "remote", - "routingKey", - "secret" - ] + "type": "string" } }, { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "name": "Accept-Encoding", + "in": "header", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -69029,9 +69448,10 @@ "200": { "description": "OK", "content": { - "application/json": { + "image/png": { "schema": { - "$ref": "#/components/schemas/PageDataIntegrationInfo" + "type": "string", + "format": "binary" } } } @@ -69167,84 +69587,42 @@ ] } }, - "/api/edge/{edgeId}/integrations": { - "get": { + "/api/images/{type}/{key}/public/{isPublic}": { + "put": { "tags": [ - "integration-controller" + "image-controller" ], - "summary": "Get Edge Integrations (getEdgeIntegrations)", - "description": "Returns a page of Integrations assigned to the specified edge. The integration object contains information about the Integration, including the heavyweight configuration object. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEdgeIntegrations", + "summary": "updateImagePublicStatus", + "operationId": "updateImagePublicStatus", "parameters": [ { - "name": "edgeId", + "name": "type", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "description": "Type of the image: tenant or system", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "enum": [ + "tenant", + "system" + ] } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the integration name.", - "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "debugMode", - "allowCreateDevicesOrAssets", - "enabled", - "remote", - "routingKey", - "secret" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "name": "isPublic", + "in": "path", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "boolean" } } ], @@ -69254,7 +69632,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataIntegration" + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -69390,31 +69768,61 @@ ] } }, - "/api/integration": { - "post": { + "/api/noauth/whiteLabel/loginFavicon/{type}/{key}": { + "get": { "tags": [ - "integration-controller" + "image-controller" ], - "summary": "Create Or Update Integration (saveIntegration)", - "description": "Create or update the Integration. When creating integration, platform generates Integration Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created integration id will be present in the response. Specify existing Integration id to update the integration. Referencing non-existing integration Id will cause 'Not Found' error. Integration configuration is validated for each type of the integration before it can be created. \n\n# Integration Configuration\n\nIntegration configuration (**'configuration'** field) is the JSON object representing the special configuration per integration type with the connectivity fields and other important parameters dependent on the specific integration type. Let's review the configuration object for the MQTT Integration type below. \n\n```json\n{\n \"clientConfiguration\":{\n \"host\":\"broker.hivemq.com\",\n \"port\":1883,\n \"cleanSession\":false,\n \"ssl\":false,\n \"connectTimeoutSec\":10,\n \"clientId\":\"\",\n \"maxBytesInMessage\":32368,\n \"credentials\":{\n \"type\":\"anonymous\"\n }\n },\n \"downlinkTopicPattern\":\"${topic}\",\n \"topicFilters\":[\n {\n \"filter\":\"tb/mqtt-integration-tutorial/sensors/+/temperature\",\n \"qos\":0\n }\n ],\n \"metadata\":{\n }\n}\n```\n\nRemove 'id', 'tenantId' from the request body example (below) to create new Integration entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveIntegration", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Integration" - } + "summary": "downloadLoginFavicon", + "operationId": "downloadLoginFavicon", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "type": "string", + "enum": [ + "tenant", + "system" + ] } }, - "required": true - }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { - "application/json": { + "image/*": { "schema": { - "$ref": "#/components/schemas/Integration" + "type": "string", + "format": "binary" } } } @@ -69430,7 +69838,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -69539,38 +69947,67 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/integration/check": { - "post": { + "/api/noauth/whiteLabel/loginLogo/{type}/{key}": { + "get": { "tags": [ - "integration-controller" + "image-controller" ], - "summary": "Check integration connectivity (checkIntegrationConnection)", - "description": "Checks if the connection to the integration is established. Throws an error if the connection is not established. Example: Failed to connect to MQTT broker at host:port.", - "operationId": "checkIntegrationConnection", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Integration" - } + "summary": "downloadLoginLogo", + "operationId": "downloadLoginLogo", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "type": "string", + "enum": [ + "tenant", + "system" + ] } }, - "required": true - }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } }, "400": { "description": "Bad Request", @@ -69583,7 +70020,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -69692,34 +70129,38 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/integration/routingKey/{routingKey}": { + "/api/edge/integration/{edgeId}/missingAttributes": { "get": { "tags": [ "integration-controller" ], - "summary": "Get Integration by Routing Key (getIntegrationByRoutingKey)", - "description": "Fetch the Integration object based on the provided routing key. The server checks that the integration is owned by the same tenant. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getIntegrationByRoutingKey", + "summary": "Find edge missing attributes for assigned integrations (findEdgeMissingAttributes)", + "description": "Returns list of edge attribute names that are missing in assigned integrations.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "findEdgeMissingAttributes", "parameters": [ { - "name": "routingKey", + "name": "edgeId", "in": "path", - "description": "A string value representing the integration routing key. For example, '542047e6-c1b2-112e-a87e-e49247c09d4b'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "integrationIds", + "in": "query", + "description": "A list of assigned integration ids, separated by comma ','", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } } ], "responses": { @@ -69728,7 +70169,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Integration" + "type": "string" } } } @@ -69864,14 +70305,14 @@ ] } }, - "/api/integration/{integrationId}": { + "/api/edge/integration/{integrationId}/allMissingAttributes": { "get": { "tags": [ "integration-controller" ], - "summary": "Get Integration (getIntegrationById)", - "description": "Fetch the Integration object based on the provided Integration Id. The server checks that the integration is owned by the same tenant. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getIntegrationById", + "summary": "Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes)", + "description": "Returns list of attribute names of all related edges that are missing in the integration configuration.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "findAllRelatedEdgesMissingAttributes", "parameters": [ { "name": "integrationId", @@ -69889,7 +70330,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Integration" + "type": "string" } } } @@ -70023,19 +70464,28 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/edge/{edgeId}/integration/{integrationId}": { + "post": { "tags": [ "integration-controller" ], - "summary": "Delete integration (deleteIntegration)", - "description": "Deletes the integration and all the relations (from and to the integration). Referencing non-existing integration Id will cause an error. \n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteIntegration", + "summary": "Assign integration to edge (assignIntegrationToEdge)", + "description": "Creates assignment of an existing integration edge template to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once integration will be delivered to edge service, it's going to start locally. \n\nOnly integration edge template can be assigned to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignIntegrationToEdge", "parameters": [ + { + "name": "edgeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "integrationId", "in": "path", - "description": "A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -70044,7 +70494,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + } }, "400": { "description": "Bad Request", @@ -70057,7 +70514,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -70175,88 +70632,30 @@ "ApiKeyForm": [] } ] - } - }, - "/api/integrationInfos": { - "get": { + }, + "delete": { "tags": [ "integration-controller" ], - "summary": "Get Integration Infos (getIntegrationInfos)", - "description": "Returns a page of integration infos owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getIntegrationInfos", + "summary": "Unassign integration from edge (unassignIntegrationFromEdge)", + "description": "Clears assignment of the integration to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove integration locally.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unassignIntegrationFromEdge", "parameters": [ { - "name": "isEdgeTemplate", - "in": "query", - "description": "Fetch edge template integrations", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "edgeId", + "in": "path", "required": true, "schema": { - "type": "string", - "minimum": 1 + "type": "string" } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "integrationId", + "in": "path", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the integration name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "debugMode", - "allowCreateDevicesOrAssets", - "enabled", - "remote", - "routingKey", - "secret" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -70265,7 +70664,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataIntegrationInfo" + "$ref": "#/components/schemas/Integration" } } } @@ -70401,23 +70800,22 @@ ] } }, - "/api/integrations": { + "/api/edge/{edgeId}/integrationInfos": { "get": { "tags": [ "integration-controller" ], - "summary": "Get Integrations (getIntegrations)", - "description": "Returns a page of integrations owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getIntegrations", + "summary": "Get Edge Integrations (getEdgeIntegrationInfos)", + "description": "Returns a page of Integrations assigned to the specified edge. The integration object contains information about the Integration, including the heavyweight configuration object. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEdgeIntegrationInfos", "parameters": [ { - "name": "isEdgeTemplate", - "in": "query", - "description": "Fetch edge template integrations", - "required": false, + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "boolean", - "default": false + "type": "string" } }, { @@ -70426,8 +70824,8 @@ "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string", - "minimum": 1 + "type": "integer", + "format": "int32" } }, { @@ -70436,8 +70834,8 @@ "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string", - "minimum": 0 + "type": "integer", + "format": "int32" } }, { @@ -70489,7 +70887,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataIntegration" + "$ref": "#/components/schemas/PageDataIntegrationInfo" } } } @@ -70625,178 +71023,84 @@ ] } }, - "/api/integrations/converters/info": { + "/api/edge/{edgeId}/integrations": { "get": { "tags": [ "integration-controller" ], - "summary": "Get Integrations Converters info (getIntegrationsConvertersInfo)", - "description": "Returns a JSON object containing information about existing tenant converters and converters available in library. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getIntegrationsConvertersInfo", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IntegrationConvertersInfo" - } - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + "summary": "Get Edge Integrations (getEdgeIntegrations)", + "description": "Returns a page of Integrations assigned to the specified edge. The integration object contains information about the Integration, including the heavyweight configuration object. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEdgeIntegrations", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the integration name.", + "required": false, + "schema": { + "type": "string" } }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ { - "HttpLoginForm": [] + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "debugMode", + "allowCreateDevicesOrAssets", + "enabled", + "remote", + "routingKey", + "secret" + ] + } }, { - "ApiKeyForm": [] - } - ] - } - }, - "/api/integrations/list": { - "get": { - "tags": [ - "integration-controller" - ], - "summary": "Get Integrations By Ids (getIntegrationsByIds)", - "description": "Requested integrations must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getIntegrationsByIds", - "parameters": [ - { - "name": "integrationIds", + "name": "sortOrder", "in": "query", - "description": "A list of integration ids, separated by comma ','", - "required": true, + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -70806,10 +71110,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Integration" - } + "$ref": "#/components/schemas/PageDataIntegration" } } } @@ -70945,32 +71246,31 @@ ] } }, - "/api/job/{id}": { - "get": { + "/api/integration": { + "post": { "tags": [ - "job-controller" + "integration-controller" ], - "summary": "Get job by id (getJobById)", - "description": "Fetches job info by id.\n\nExample of a RUNNING CF_REPROCESSING job response:\n```json\n{\n \"id\": {\n \"entityType\": \"JOB\",\n \"id\": \"475e94e0-2f2d-11f0-8240-91e99922a704\"\n },\n \"createdTime\": 1747053196590,\n \"tenantId\": {\n \"entityType\": \"TENANT\",\n \"id\": \"46859a00-2f2d-11f0-8240-91e99922a704\"\n },\n \"type\": \"CF_REPROCESSING\",\n \"key\": \"474e4130-2f2d-11f0-8240-91e99922a704\",\n \"entityId\": {\n \"entityType\": \"DEVICE_PROFILE\",\n \"id\": \"9fd41f20-31a1-11f0-933e-27998d6db02e\"\n },\n \"status\": \"RUNNING\",\n \"configuration\": {\n \"type\": \"CF_REPROCESSING\",\n \"calculatedFieldId\": {\n \"entityType\": \"CALCULATED_FIELD\",\n \"id\": \"474e4130-2f2d-11f0-8240-91e99922a704\"\n },\n \"startTs\": 1747051995760,\n \"endTs\": 1747052895760,\n \"tasksKey\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\",\n \"toReprocess\": null\n },\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 1,\n \"failedCount\": 0,\n \"discardedCount\": 0,\n \"totalCount\": 2,\n \"results\": [],\n \"generalError\": null,\n \"startTs\": 1747323069445,\n \"finishTs\": 1747323070585,\n \"cancellationTs\": 0\n }\n}\n\n```\n\nExample of a CF_REPROCESSING job with failures:\n```json\n{\n ...,\n \"status\": \"FAILED\",\n ...,\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 0,\n \"failedCount\": 2,\n \"discardedCount\": 0,\n \"totalCount\": 2,\n \"results\": [\n {\n \"jobType\": \"CF_REPROCESSING\",\n \"key\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\",\n \"success\": false,\n \"discarded\": false,\n \"failure\": {\n \"error\": \"Failed to fetch temperature: Failed to fetch timeseries data\",\n \"entityInfo\": {\n \"id\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"9fd41f20-31a1-11f0-933e-27998d6db02e\"\n },\n \"name\": \"Test device 1\"\n }\n }\n },\n {\n \"jobType\": \"CF_REPROCESSING\",\n \"key\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\",\n \"success\": false,\n \"discarded\": false,\n \"failure\": {\n \"error\": \"Failed to fetch temperature: Failed to fetch timeseries data\",\n \"entityInfo\": {\n \"id\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"9ffc4090-31a1-11f0-933e-27998d6db02e\"\n },\n \"name\": \"Test device 2\"\n }\n }\n }\n ],\n \"generalError\": null,\n \"startTs\": 1747323069445,\n \"finishTs\": 1747323070585,\n \"cancellationTs\": 0\n }\n}\n\n```\n\nExample of a FAILED job result with general error:\n```json\n{\n ...,\n \"status\": \"FAILED\",\n ...,\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 1,\n \"failedCount\": 0,\n \"discardedCount\": 0,\n \"totalCount\": null,\n \"results\": [],\n \"generalError\": \"Timeout to find devices by profile\",\n \"cancellationTs\": 0\n }\n}\n\n```\n\nExample of a CANCELLED job result:\n```json\n{\n ...,\n \"status\": \"CANCELLED\",\n ...,\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 15,\n \"failedCount\": 0,\n \"discardedCount\": 85,\n \"totalCount\": 100,\n \"results\": [],\n \"generalError\": null,\n \"cancellationTs\": 1747065908414\n }\n}\n\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getJobById", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Create Or Update Integration (saveIntegration)", + "description": "Create or update the Integration. When creating integration, platform generates Integration Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created integration id will be present in the response. Specify existing Integration id to update the integration. Referencing non-existing integration Id will cause 'Not Found' error. Integration configuration is validated for each type of the integration before it can be created. \n\n# Integration Configuration\n\nIntegration configuration (**'configuration'** field) is the JSON object representing the special configuration per integration type with the connectivity fields and other important parameters dependent on the specific integration type. Let's review the configuration object for the MQTT Integration type below. \n\n```json\n{\n \"clientConfiguration\":{\n \"host\":\"broker.hivemq.com\",\n \"port\":1883,\n \"cleanSession\":false,\n \"ssl\":false,\n \"connectTimeoutSec\":10,\n \"clientId\":\"\",\n \"maxBytesInMessage\":32368,\n \"credentials\":{\n \"type\":\"anonymous\"\n }\n },\n \"downlinkTopicPattern\":\"${topic}\",\n \"topicFilters\":[\n {\n \"filter\":\"tb/mqtt-integration-tutorial/sensors/+/temperature\",\n \"qos\":0\n }\n ],\n \"metadata\":{\n }\n}\n```\n\nRemove 'id', 'tenantId' from the request body example (below) to create new Integration entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveIntegration", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Job" + "$ref": "#/components/schemas/Integration" } } } @@ -70986,7 +71286,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -71104,27 +71404,190 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/integration/check": { + "post": { "tags": [ - "job-controller" + "integration-controller" ], - "summary": "deleteJob", - "operationId": "deleteJob", + "summary": "Check integration connectivity (checkIntegrationConnection)", + "description": "Checks if the connection to the integration is established. Throws an error if the connection is not established. Example: Failed to connect to MQTT broker at host:port.", + "operationId": "checkIntegrationConnection", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/integration/routingKey/{routingKey}": { + "get": { + "tags": [ + "integration-controller" + ], + "summary": "Get Integration by Routing Key (getIntegrationByRoutingKey)", + "description": "Fetch the Integration object based on the provided routing key. The server checks that the integration is owned by the same tenant. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrationByRoutingKey", "parameters": [ { - "name": "id", + "name": "routingKey", "in": "path", + "description": "A string value representing the integration routing key. For example, '542047e6-c1b2-112e-a87e-e49247c09d4b'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + } }, "400": { "description": "Bad Request", @@ -71257,28 +71720,35 @@ ] } }, - "/api/job/{id}/cancel": { - "post": { + "/api/integration/{integrationId}": { + "get": { "tags": [ - "job-controller" + "integration-controller" ], - "summary": "Cancel job (cancelJob)", - "description": "Cancels the job. The status of the job must be QUEUED, PENDING or RUNNING.\n\nFor a running job, all the tasks not yet processed will be discarded.\n\nSee the example of a cancelled job result in getJobById method description.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "cancelJob", + "summary": "Get Integration (getIntegrationById)", + "description": "Fetch the Integration object based on the provided Integration Id. The server checks that the integration is owned by the same tenant. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrationById", "parameters": [ { - "name": "id", + "name": "integrationId", "in": "path", + "description": "A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + } }, "400": { "description": "Bad Request", @@ -71291,7 +71761,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -71409,24 +71879,22 @@ "ApiKeyForm": [] } ] - } - }, - "/api/job/{id}/reprocess": { - "post": { + }, + "delete": { "tags": [ - "job-controller" + "integration-controller" ], - "summary": "Reprocess job (reprocessJob)", - "description": "Reprocesses the job. Failures are located at job.result.results list. Platform iterates over this list and submits new tasks for them. Doesn't create new job entity but updates the existing one. Successfully reprocessed job will look the same as completed one.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "reprocessJob", + "summary": "Delete integration (deleteIntegration)", + "description": "Deletes the integration and all the relations (from and to the integration). Referencing non-existing integration Id will cause an error. \n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteIntegration", "parameters": [ { - "name": "id", + "name": "integrationId", "in": "path", + "description": "A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], @@ -71445,7 +71913,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -71565,23 +72033,33 @@ ] } }, - "/api/jobs": { + "/api/integrationInfos": { "get": { "tags": [ - "job-controller" + "integration-controller" ], - "summary": "Get jobs (getJobs)", - "description": "Returns the page of jobs.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getJobs", + "summary": "Get Integration Infos (getIntegrationInfos)", + "description": "Returns a page of integration infos owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrationInfos", "parameters": [ + { + "name": "isEdgeTemplate", + "in": "query", + "description": "Fetch edge template integrations", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, { "name": "pageSize", "in": "query", "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "minimum": 1 } }, { @@ -71590,14 +72068,14 @@ "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "minimum": 0 } }, { "name": "textSearch", "in": "query", - "description": "Case-insensitive 'substring' filter based on job's description", + "description": "The case insensitive 'startsWith' filter based on the integration name.", "required": false, "schema": { "type": "string" @@ -71609,7 +72087,18 @@ "description": "Property of entity to sort by", "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "debugMode", + "allowCreateDevicesOrAssets", + "enabled", + "remote", + "routingKey", + "secret" + ] } }, { @@ -71618,63 +72107,11 @@ "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { - "type": "string" - } - }, - { - "name": "types", - "in": "query", - "description": "Comma-separated list of job types to include. If empty - all job types are included.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "statuses", - "in": "query", - "description": "Comma-separated list of job statuses to include. If empty - all job statuses are included.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "entities", - "in": "query", - "description": "Comma-separated list of entity ids. If empty - jobs for all entities are included.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "startTime", - "in": "query", - "description": "To only include jobs created after this timestamp.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "To only include jobs created before this timestamp.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -71684,7 +72121,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataJob" + "$ref": "#/components/schemas/PageDataIntegrationInfo" } } } @@ -71820,228 +72257,113 @@ ] } }, - "/api/auth/login": { - "post": { + "/api/integrations": { + "get": { "tags": [ - "login-endpoint" + "integration-controller" ], - "summary": "Login method to get user JWT token data", - "description": "Login method used to authenticate user and get JWT token data.\n\nValue of the response **token** field can be used as **X-Authorization** header value:\n\n`X-Authorization: Bearer $JWT_TOKEN_VALUE`.", - "operationId": "login", - "requestBody": { - "description": "Login request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginRequest" - } + "summary": "Get Integrations (getIntegrations)", + "description": "Returns a page of integrations owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrations", + "parameters": [ + { + "name": "isEdgeTemplate", + "in": "query", + "description": "Fetch edge template integrations", + "required": false, + "schema": { + "type": "boolean", + "default": false } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginResponse" - } - } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 } }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "account-disabled": { - "summary": "Disabled account", - "value": { - "message": "User account is not active", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - }, - "authentication-failed": { - "summary": "General authentication error", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - }, - "token-expired": { - "summary": "JWT token expired", - "value": { - "message": "Token has expired", - "errorCode": 11, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - }, - "account-locked": { - "summary": "Locked account", - "value": { - "message": "User account is locked due to security policy", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - }, - "bad-credentials": { - "summary": "Bad credentials", - "value": { - "message": "Invalid username or password", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 } }, - "401 ": { - "description": "Unauthorized (**Expired credentials**)", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardCredentialsExpiredResponse" - }, - "examples": { - "credentials-expired": { - "summary": "Expired credentials", - "value": { - "status": 401, - "message": "User password expired!", - "errorCode": 15, - "timestamp": 1609459200000, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "resetToken": "udgDQOpS1Q4ZFEL8qHF9s8cSKQ7d1h" - } - } - } - } + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the integration name.", + "required": false, + "schema": { + "type": "string" } - } - } - } - }, - "/api/auth/token": { - "post": { - "tags": [ - "login-endpoint" - ], - "summary": "Refresh user JWT token data", - "description": "Method to refresh JWT token. Provide a valid refresh token to get a new JWT token.\n\nThe response contains a new token that can be used for authorization.\n\n`X-Authorization: Bearer $JWT_TOKEN_VALUE`", - "operationId": "refreshToken", - "requestBody": { - "description": "Refresh token request", - "content": { - "application/json": { - "schema": { - "properties": { - "refreshToken": {} - } - } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "debugMode", + "allowCreateDevicesOrAssets", + "enabled", + "remote", + "routingKey", + "secret" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } - }, + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LoginResponse" + "$ref": "#/components/schemas/PageDataIntegration" } } } }, - "401": { - "description": "Unauthorized", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ThingsboardErrorResponse" }, "examples": { - "account-disabled": { - "summary": "Disabled account", - "value": { - "message": "User account is not active", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - }, - "authentication-failed": { - "summary": "General authentication error", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - }, - "token-expired": { - "summary": "JWT token expired", - "value": { - "message": "Token has expired", - "errorCode": 11, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - }, - "account-locked": { - "summary": "Locked account", - "value": { - "message": "User account is locked due to security policy", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - }, - "bad-credentials": { - "summary": "Bad credentials", + "error-code-400": { + "summary": "Bad Request", "value": { - "message": "Invalid username or password", - "errorCode": 10, - "status": 401, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, "subscriptionErrorCode": null, "subscriptionEntry": null, "subscriptionValue": null, @@ -72052,45 +72374,20 @@ } } }, - "401 ": { - "description": "Unauthorized (**Expired credentials**)", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardCredentialsExpiredResponse" - }, - "examples": { - "credentials-expired": { - "summary": "Expired credentials", - "value": { - "status": 401, - "message": "User password expired!", - "errorCode": 15, - "timestamp": 1609459200000, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "resetToken": "udgDQOpS1Q4ZFEL8qHF9s8cSKQ7d1h" - } - } - } - } - } - }, - "400": { - "description": "Bad Request", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ThingsboardErrorResponse" }, "examples": { - "error-code-400": { - "summary": "Bad Request", + "error-code-401": { + "summary": "Unauthorized", "value": { - "message": "Invalid request body", - "errorCode": 31, - "status": 400, + "message": "Authentication failed", + "errorCode": 10, + "status": 401, "subscriptionErrorCode": null, "subscriptionEntry": null, "subscriptionValue": null, @@ -72173,45 +72470,35 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/lwm2m/device-credentials": { - "post": { + "/api/integrations/converters/info": { + "get": { "tags": [ - "lwm-2m-controller" - ], - "summary": "Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials)", - "description": "Deprecated.", - "operationId": "saveLwm2mDeviceWithCredentials", - "parameters": [ - { - "name": "entityGroupId", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - } + "integration-controller" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": {} - } - } - }, - "required": true - }, + "summary": "Get Integrations Converters info (getIntegrationsConvertersInfo)", + "description": "Returns a JSON object containing information about existing tenant converters and converters available in library. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getIntegrationsConvertersInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IntegrationConvertersInfo" + } } } } @@ -72227,7 +72514,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -72347,22 +72634,25 @@ ] } }, - "/api/lwm2m/deviceProfile/bootstrap/{isBootstrapServer}": { + "/api/integrations/list": { "get": { "tags": [ - "lwm-2m-controller" + "integration-controller" ], - "summary": "Get Lwm2m Bootstrap SecurityInfo (getLwm2mBootstrapSecurityInfo)", - "description": "Get the Lwm2m Bootstrap SecurityInfo object (of the current server) based on the provided isBootstrapServer parameter. If isBootstrapServer == true, get the parameters of the current Bootstrap Server. If isBootstrapServer == false, get the parameters of the current Lwm2m Server. Used for client settings when starting the client in Bootstrap mode. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getLwm2mBootstrapSecurityInfo", + "summary": "Get Integrations By Ids (getIntegrationsByIds)", + "description": "Requested integrations must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrationsByIds", "parameters": [ { - "name": "isBootstrapServer", - "in": "path", - "description": "A Boolean value representing the Server SecurityInfo for future Bootstrap client mode settings. Values: 'true' for Bootstrap Server; 'false' for Lwm2m Server. ", + "name": "integrationIds", + "in": "query", + "description": "A list of integration ids, separated by comma ','", "required": true, "schema": { - "type": "boolean" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -72372,7 +72662,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LwM2MServerSecurityConfigDefault" + "type": "array", + "items": { + "$ref": "#/components/schemas/Integration" + } } } } @@ -72508,21 +72801,32 @@ ] } }, - "/api/mail/config/template": { + "/api/job/{id}": { "get": { "tags": [ - "mail-config-template-controller" + "job-controller" + ], + "summary": "Get job by id (getJobById)", + "description": "Fetches job info by id.\n\nExample of a RUNNING CF_REPROCESSING job response:\n```json\n{\n \"id\": {\n \"entityType\": \"JOB\",\n \"id\": \"475e94e0-2f2d-11f0-8240-91e99922a704\"\n },\n \"createdTime\": 1747053196590,\n \"tenantId\": {\n \"entityType\": \"TENANT\",\n \"id\": \"46859a00-2f2d-11f0-8240-91e99922a704\"\n },\n \"type\": \"CF_REPROCESSING\",\n \"key\": \"474e4130-2f2d-11f0-8240-91e99922a704\",\n \"entityId\": {\n \"entityType\": \"DEVICE_PROFILE\",\n \"id\": \"9fd41f20-31a1-11f0-933e-27998d6db02e\"\n },\n \"status\": \"RUNNING\",\n \"configuration\": {\n \"type\": \"CF_REPROCESSING\",\n \"calculatedFieldId\": {\n \"entityType\": \"CALCULATED_FIELD\",\n \"id\": \"474e4130-2f2d-11f0-8240-91e99922a704\"\n },\n \"startTs\": 1747051995760,\n \"endTs\": 1747052895760,\n \"tasksKey\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\",\n \"toReprocess\": null\n },\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 1,\n \"failedCount\": 0,\n \"discardedCount\": 0,\n \"totalCount\": 2,\n \"results\": [],\n \"generalError\": null,\n \"startTs\": 1747323069445,\n \"finishTs\": 1747323070585,\n \"cancellationTs\": 0\n }\n}\n\n```\n\nExample of a CF_REPROCESSING job with failures:\n```json\n{\n ...,\n \"status\": \"FAILED\",\n ...,\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 0,\n \"failedCount\": 2,\n \"discardedCount\": 0,\n \"totalCount\": 2,\n \"results\": [\n {\n \"jobType\": \"CF_REPROCESSING\",\n \"key\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\",\n \"success\": false,\n \"discarded\": false,\n \"failure\": {\n \"error\": \"Failed to fetch temperature: Failed to fetch timeseries data\",\n \"entityInfo\": {\n \"id\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"9fd41f20-31a1-11f0-933e-27998d6db02e\"\n },\n \"name\": \"Test device 1\"\n }\n }\n },\n {\n \"jobType\": \"CF_REPROCESSING\",\n \"key\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\",\n \"success\": false,\n \"discarded\": false,\n \"failure\": {\n \"error\": \"Failed to fetch temperature: Failed to fetch timeseries data\",\n \"entityInfo\": {\n \"id\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"9ffc4090-31a1-11f0-933e-27998d6db02e\"\n },\n \"name\": \"Test device 2\"\n }\n }\n }\n ],\n \"generalError\": null,\n \"startTs\": 1747323069445,\n \"finishTs\": 1747323070585,\n \"cancellationTs\": 0\n }\n}\n\n```\n\nExample of a FAILED job result with general error:\n```json\n{\n ...,\n \"status\": \"FAILED\",\n ...,\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 1,\n \"failedCount\": 0,\n \"discardedCount\": 0,\n \"totalCount\": null,\n \"results\": [],\n \"generalError\": \"Timeout to find devices by profile\",\n \"cancellationTs\": 0\n }\n}\n\n```\n\nExample of a CANCELLED job result:\n```json\n{\n ...,\n \"status\": \"CANCELLED\",\n ...,\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 15,\n \"failedCount\": 0,\n \"discardedCount\": 85,\n \"totalCount\": 100,\n \"results\": [],\n \"generalError\": null,\n \"cancellationTs\": 1747065908414\n }\n}\n\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getJobById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - "summary": "Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "description": "Mail configuration template is set of default smtp settings for mail server that specific provider supports", - "operationId": "getClientRegistrationTemplates", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/Job" } } } @@ -72656,50 +72960,27 @@ "ApiKeyForm": [] } ] - } - }, - "/api/mobile/bundle": { - "post": { + }, + "delete": { "tags": [ - "mobile-app-bundle-controller" + "job-controller" ], - "summary": "Save Or update Mobile app bundle (saveMobileAppBundle)", - "description": "Create or update the Mobile app bundle that represents tha pair of ANDROID and IOS app and mobile settings like oauth2 clients, self-registration and layout configuration.When creating mobile app bundle, platform generates Mobile App Bundle Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Mobile App Bundle Id will be present in the response. Referencing non-existing Mobile App Bundle Id will cause 'Not Found' error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveMobileAppBundle", + "summary": "deleteJob", + "operationId": "deleteJob", "parameters": [ { - "name": "oauth2ClientIds", - "in": "query", - "description": "A list of oauth2 client ids, separated by comma ','", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string", + "format": "uuid" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MobileAppBundle" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MobileAppBundle" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -72712,7 +72993,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -72832,14 +73113,14 @@ ] } }, - "/api/mobile/bundle/info/{id}": { - "get": { + "/api/job/{id}/cancel": { + "post": { "tags": [ - "mobile-app-bundle-controller" + "job-controller" ], - "summary": "Get mobile app bundle info by id (getMobileAppBundleInfoById)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getMobileAppBundleInfoById", + "summary": "Cancel job (cancelJob)", + "description": "Cancels the job. The status of the job must be QUEUED, PENDING or RUNNING.\n\nFor a running job, all the tasks not yet processed will be discarded.\n\nSee the example of a cancelled job result in getJobById method description.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "cancelJob", "parameters": [ { "name": "id", @@ -72853,14 +73134,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MobileAppBundleInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -72873,7 +73147,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -72993,73 +73267,28 @@ ] } }, - "/api/mobile/bundle/infos": { - "get": { + "/api/job/{id}/reprocess": { + "post": { "tags": [ - "mobile-app-bundle-controller" + "job-controller" ], - "summary": "Get mobile app bundle infos (getTenantMobileAppBundleInfos)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getTenantMobileAppBundleInfos", + "summary": "Reprocess job (reprocessJob)", + "description": "Reprocesses the job. Failures are located at job.result.results list. Platform iterates over this list and submits new tasks for them. Doesn't create new job entity but updates the existing one. Successfully reprocessed job will look the same as completed one.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "reprocessJob", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "id", + "in": "path", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on app's name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataMobileAppBundleInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -73072,7 +73301,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -73192,28 +73421,129 @@ ] } }, - "/api/mobile/bundle/{id}": { - "delete": { + "/api/jobs": { + "get": { "tags": [ - "mobile-app-bundle-controller" + "job-controller" ], - "summary": "Delete Mobile App Bundle by ID (deleteMobileAppBundle)", - "description": "Deletes Mobile App Bundle by ID. Referencing non-existing mobile app bundle Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "deleteMobileAppBundle", + "summary": "Get jobs (getJobs)", + "description": "Returns the page of jobs.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getJobs", "parameters": [ { - "name": "id", - "in": "path", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on job's description", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "types", + "in": "query", + "description": "Comma-separated list of job types to include. If empty - all job types are included.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "statuses", + "in": "query", + "description": "Comma-separated list of job statuses to include. If empty - all job statuses are included.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "entities", + "in": "query", + "description": "Comma-separated list of entity ids. If empty - jobs for all entities are included.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "startTime", + "in": "query", + "description": "To only include jobs created after this timestamp.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "To only include jobs created before this timestamp.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataJob" + } + } + } }, "400": { "description": "Bad Request", @@ -73346,57 +73676,97 @@ ] } }, - "/api/mobile/bundle/{id}/oauth2Clients": { - "put": { + "/api/auth/login": { + "post": { "tags": [ - "mobile-app-bundle-controller" - ], - "summary": "Update oauth2 clients (updateMobileAppBundleOauth2Clients)", - "description": "Update oauth2 clients of the specified mobile app bundle.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "updateMobileAppBundleOauth2Clients", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "login-endpoint" ], + "summary": "Login method to get user JWT token data", + "description": "Login method used to authenticate user and get JWT token data.\n\nValue of the response **token** field can be used as **X-Authorization** header value:\n\n`X-Authorization: Bearer $JWT_TOKEN_VALUE`.", + "operationId": "login", "requestBody": { + "description": "Login request", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } + "$ref": "#/components/schemas/LoginRequest" } } - }, - "required": true + } }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginResponse" + } + } + } }, - "400": { - "description": "Bad Request", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ThingsboardErrorResponse" }, "examples": { - "error-code-400": { - "summary": "Bad Request", + "bad-credentials": { + "summary": "Bad credentials", "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, + "message": "Invalid username or password", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + }, + "token-expired": { + "summary": "JWT token expired", + "value": { + "message": "Token has expired", + "errorCode": 11, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + }, + "account-disabled": { + "summary": "Disabled account", + "value": { + "message": "User account is not active", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + }, + "account-locked": { + "summary": "Locked account", + "value": { + "message": "User account is locked due to security policy", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + }, + "authentication-failed": { + "summary": "General authentication error", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, "subscriptionErrorCode": null, "subscriptionEntry": null, "subscriptionValue": null, @@ -73407,6 +73777,67 @@ } } }, + "401 ": { + "description": "Unauthorized (**Expired credentials**)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardCredentialsExpiredResponse" + }, + "examples": { + "credentials-expired": { + "summary": "Expired credentials", + "value": { + "status": 401, + "message": "User password expired!", + "errorCode": 15, + "timestamp": 1609459200000, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "resetToken": "udgDQOpS1Q4ZFEL8qHF9s8cSKQ7d1h" + } + } + } + } + } + } + } + } + }, + "/api/auth/token": { + "post": { + "tags": [ + "login-endpoint" + ], + "summary": "Refresh user JWT token data", + "description": "Method to refresh JWT token. Provide a valid refresh token to get a new JWT token.\n\nThe response contains a new token that can be used for authorization.\n\n`X-Authorization: Bearer $JWT_TOKEN_VALUE`", + "operationId": "refreshToken", + "requestBody": { + "description": "Refresh token request", + "content": { + "application/json": { + "schema": { + "properties": { + "refreshToken": { + + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginResponse" + } + } + } + }, "401": { "description": "Unauthorized", "content": { @@ -73415,8 +73846,56 @@ "$ref": "#/components/schemas/ThingsboardErrorResponse" }, "examples": { - "error-code-401": { - "summary": "Unauthorized", + "bad-credentials": { + "summary": "Bad credentials", + "value": { + "message": "Invalid username or password", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + }, + "token-expired": { + "summary": "JWT token expired", + "value": { + "message": "Token has expired", + "errorCode": 11, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + }, + "account-disabled": { + "summary": "Disabled account", + "value": { + "message": "User account is not active", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + }, + "account-locked": { + "summary": "Locked account", + "value": { + "message": "User account is locked due to security policy", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + }, + "authentication-failed": { + "summary": "General authentication error", "value": { "message": "Authentication failed", "errorCode": 10, @@ -73431,6 +73910,55 @@ } } }, + "401 ": { + "description": "Unauthorized (**Expired credentials**)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardCredentialsExpiredResponse" + }, + "examples": { + "credentials-expired": { + "summary": "Expired credentials", + "value": { + "status": 401, + "message": "User password expired!", + "errorCode": 15, + "timestamp": 1609459200000, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "resetToken": "udgDQOpS1Q4ZFEL8qHF9s8cSKQ7d1h" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, "403": { "description": "Forbidden", "content": { @@ -73503,56 +74031,47 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/mobile": { - "get": { + "/api/lwm2m/device-credentials": { + "post": { "tags": [ - "mobile-app-controller" + "lwm-2m-controller" ], - "summary": "Get user mobile app basic info (getUserMobileInfo)", - "description": "\n\nAvailable for any authorized user. ", - "operationId": "getUserMobileInfo", + "summary": "Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials)", + "description": "Deprecated.", + "operationId": "saveLwm2mDeviceWithCredentials", "parameters": [ { - "name": "pkgName", + "name": "entityGroupId", "in": "query", - "description": "Mobile application package name", - "required": true, + "required": false, "schema": { "type": "string" } - }, - { - "name": "platform", - "in": "query", - "description": "Platform type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserMobileInfo" + "$ref": "#/components/schemas/Device" } } } @@ -73568,7 +74087,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -73688,69 +74207,22 @@ ] } }, - "/api/mobile/app": { + "/api/lwm2m/deviceProfile/bootstrap/{isBootstrapServer}": { "get": { "tags": [ - "mobile-app-controller" + "lwm-2m-controller" ], - "summary": "Get mobile app infos (getTenantMobileApps)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getTenantMobileApps", + "summary": "Get Lwm2m Bootstrap SecurityInfo (getLwm2mBootstrapSecurityInfo)", + "description": "Get the Lwm2m Bootstrap SecurityInfo object (of the current server) based on the provided isBootstrapServer parameter. If isBootstrapServer == true, get the parameters of the current Bootstrap Server. If isBootstrapServer == false, get the parameters of the current Lwm2m Server. Used for client settings when starting the client in Bootstrap mode. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getLwm2mBootstrapSecurityInfo", "parameters": [ { - "name": "platformType", - "in": "query", - "description": "Platform type: ANDROID or IOS", - "required": false, - "schema": { - "$ref": "#/components/schemas/PlatformType" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "isBootstrapServer", + "in": "path", + "description": "A Boolean value representing the Server SecurityInfo for future Bootstrap client mode settings. Values: 'true' for Bootstrap Server; 'false' for Lwm2m Server. ", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on app's name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" + "type": "boolean" } } ], @@ -73760,7 +74232,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataMobileApp" + "$ref": "#/components/schemas/LwM2MServerSecurityConfigDefault" } } } @@ -73894,31 +74366,23 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/mail/config/template": { + "get": { "tags": [ - "mobile-app-controller" + "mail-config-template-controller" ], - "summary": "Save Or update Mobile app (saveMobileApp)", - "description": "Create or update the Mobile app. When creating mobile app, platform generates Mobile App Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Mobile App Id will be present in the response. Specify existing Mobile App Id to update the mobile app. Referencing non-existing Mobile App Id will cause 'Not Found' error.\n\nThe pair of mobile app package name and platform type is unique for entire platform setup.\n\n\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveMobileApp", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MobileApp" - } - } - }, - "required": true - }, + "summary": "Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "description": "Mail configuration template is set of default smtp settings for mail server that specific provider supports", + "operationId": "getClientRegistrationTemplates", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MobileApp" + "$ref": "#/components/schemas/JsonNode" } } } @@ -73934,7 +74398,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -74054,32 +74518,45 @@ ] } }, - "/api/mobile/app/{id}": { - "get": { + "/api/mobile/bundle": { + "post": { "tags": [ - "mobile-app-controller" + "mobile-app-bundle-controller" ], - "summary": "Get mobile info by id (getMobileAppById)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getMobileAppById", + "summary": "Save Or update Mobile app bundle (saveMobileAppBundle)", + "description": "Create or update the Mobile app bundle that represents tha pair of ANDROID and IOS app and mobile settings like oauth2 clients, self-registration and layout configuration.When creating mobile app bundle, platform generates Mobile App Bundle Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Mobile App Bundle Id will be present in the response. Referencing non-existing Mobile App Bundle Id will cause 'Not Found' error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveMobileAppBundle", "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "oauth2ClientIds", + "in": "query", + "description": "A list of oauth2 client ids, separated by comma ','", + "required": false, "schema": { - "type": "string", - "format": "uuid" + "type": "array", + "items": { + "type": "string" + } } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MobileAppBundle" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MobileApp" + "$ref": "#/components/schemas/MobileAppBundle" } } } @@ -74095,7 +74572,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -74213,14 +74690,16 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/mobile/bundle/info/{id}": { + "get": { "tags": [ - "mobile-app-controller" + "mobile-app-bundle-controller" ], - "summary": "Delete Mobile App by ID (deleteMobileApp)", - "description": "Deletes Mobile App by ID. Referencing non-existing mobile app Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "deleteMobileApp", + "summary": "Get mobile app bundle info by id (getMobileAppBundleInfoById)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getMobileAppBundleInfoById", "parameters": [ { "name": "id", @@ -74234,7 +74713,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MobileAppBundleInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -74367,189 +74853,70 @@ ] } }, - "/api/noauth/mobile": { + "/api/mobile/bundle/infos": { "get": { "tags": [ - "mobile-app-controller" + "mobile-app-bundle-controller" ], - "summary": "Get mobile app login info (getLoginMobileInfo)", - "operationId": "getLoginMobileInfo", + "summary": "Get mobile app bundle infos (getTenantMobileAppBundleInfos)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getTenantMobileAppBundleInfos", "parameters": [ { - "name": "pkgName", + "name": "pageSize", "in": "query", - "description": "Mobile application package name", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "platform", + "name": "page", "in": "query", - "description": "Platform type", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginMobileInfo" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + "type": "integer", + "format": "int32" } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on app's name", + "required": false, + "schema": { + "type": "string" } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" } }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" } } - } - } - }, - "/api/notification/deliveryMethods": { - "get": { - "tags": [ - "notification-controller" ], - "summary": "Get available delivery methods (getAvailableDeliveryMethods)", - "description": "Returns the list of delivery methods that are properly configured and are allowed to be used for sending notifications.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getAvailableDeliveryMethods", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationDeliveryMethod" - } + "$ref": "#/components/schemas/PageDataMobileAppBundleInfo" } } } @@ -74685,34 +75052,22 @@ ] } }, - "/api/notification/entitiesLimitIncreaseRequest/{entityType}": { - "post": { + "/api/mobile/bundle/{id}": { + "delete": { "tags": [ - "notification-controller" + "mobile-app-bundle-controller" ], - "summary": "Send entity limit increase request notification to System/Tenant administrators (sendEntitiesLimitIncreaseRequest)", - "description": "Send entity limit increase request notification by Tenant Administrator or Customer User to System/Tenant administrators.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "sendEntitiesLimitIncreaseRequest", + "summary": "Delete Mobile App Bundle by ID (deleteMobileAppBundle)", + "description": "Deletes Mobile App Bundle by ID. Referencing non-existing mobile app bundle Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteMobileAppBundle", "parameters": [ { - "name": "entityType", + "name": "id", "in": "path", - "description": "Entity type", "required": true, "schema": { "type": "string", - "enum": [ - "DEVICE", - "ASSET", - "CUSTOMER", - "USER", - "DASHBOARD", - "RULE_CHAIN", - "EDGE", - "INTEGRATION", - "CONVERTER", - "SCHEDULER_EVENT" - ] + "format": "uuid" } } ], @@ -74731,7 +75086,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -74851,19 +75206,34 @@ ] } }, - "/api/notification/request": { - "post": { + "/api/mobile/bundle/{id}/oauth2Clients": { + "put": { "tags": [ - "notification-controller" + "mobile-app-bundle-controller" + ], + "summary": "Update oauth2 clients (updateMobileAppBundleOauth2Clients)", + "description": "Update oauth2 clients of the specified mobile app bundle.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "updateMobileAppBundleOauth2Clients", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - "summary": "Create notification request (createNotificationRequest)", - "description": "Processes notification request.\nMandatory request properties are `targets` (list of targets ids to send notification to), and either `templateId` (existing notification template id) or `template` (to send notification without saving the template).\nOptionally, you can set `sendingDelayInSec` inside the `additionalConfig` field to schedule the notification.\n\nFor each enabled delivery method in the notification template, there must be a target in the `targets` list that supports this delivery method: if you chose `WEB`, `EMAIL` or `SMS` - there must be at least one target in `targets` of `PLATFORM_USERS` type.\nFor `SLACK` delivery method - you need to chose at least one `SLACK` notification target.\n\nNotification request object with `PROCESSING` status will be returned immediately, and the notification sending itself is done asynchronously. After all notifications are sent, the `status` of the request becomes `SENT`. Use `getNotificationRequestById` to see the notification request processing status and some sending stats. \n\nHere is an example of notification request to one target using saved template:\n```json\n{\n \"templateId\": {\n \"entityType\": \"NOTIFICATION_TEMPLATE\",\n \"id\": \"6dbc3670-e4dd-11ed-9401-dbcc5dff78be\"\n },\n \"targets\": [\n \"320e3ed0-d785-11ed-a06c-21dd57dd88ca\"\n ],\n \"additionalConfig\": {\n \"sendingDelayInSec\": 0\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "createNotificationRequest", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationRequest" + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } } } }, @@ -74871,14 +75241,7 @@ }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationRequest" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -74891,7 +75254,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -75011,44 +75374,45 @@ ] } }, - "/api/notification/request/preview": { - "post": { + "/api/mobile": { + "get": { "tags": [ - "notification-controller" + "mobile-app-controller" ], - "summary": "Get notification request preview (getNotificationRequestPreview)", - "description": "Returns preview for notification request.\n\n`processedTemplates` shows how the notifications for each delivery method will look like for the first recipient of the corresponding notification target.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationRequestPreview", + "summary": "Get user mobile app basic info (getUserMobileInfo)", + "description": "\n\nAvailable for any authorized user. ", + "operationId": "getUserMobileInfo", "parameters": [ { - "name": "recipientsPreviewSize", + "name": "pkgName", "in": "query", - "description": "Amount of the recipients to show in preview", - "required": false, + "description": "Mobile application package name", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 20 + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ANDROID", + "IOS" + ] } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationRequest" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationRequestPreview" + "$ref": "#/components/schemas/UserMobileInfo" } } } @@ -75064,7 +75428,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -75184,22 +75548,69 @@ ] } }, - "/api/notification/request/{id}": { + "/api/mobile/app": { "get": { "tags": [ - "notification-controller" + "mobile-app-controller" ], - "summary": "Get notification request by id (getNotificationRequestById)", - "description": "Fetches notification request info by request id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationRequestById", + "summary": "Get mobile app infos (getTenantMobileApps)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getTenantMobileApps", "parameters": [ { - "name": "id", - "in": "path", + "name": "platformType", + "in": "query", + "description": "Platform type: ANDROID or IOS", + "required": false, + "schema": { + "$ref": "#/components/schemas/PlatformType" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on app's name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" } } ], @@ -75209,7 +75620,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationRequestInfo" + "$ref": "#/components/schemas/PageDataMobileApp" } } } @@ -75344,27 +75755,33 @@ } ] }, - "delete": { + "post": { "tags": [ - "notification-controller" + "mobile-app-controller" ], - "summary": "Delete notification request (deleteNotificationRequest)", - "description": "Deletes notification request by its id.\n\nIf the request has status `SENT` - all sent notifications for this request will be deleted. If it is `SCHEDULED`, the request will be cancelled.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "deleteNotificationRequest", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Save Or update Mobile app (saveMobileApp)", + "description": "Create or update the Mobile app. When creating mobile app, platform generates Mobile App Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Mobile App Id will be present in the response. Specify existing Mobile App Id to update the mobile app. Referencing non-existing Mobile App Id will cause 'Not Found' error.\n\nThe pair of mobile app package name and platform type is unique for entire platform setup.\n\n\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveMobileApp", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MobileApp" + } } - } - ], + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MobileApp" + } + } + } }, "400": { "description": "Bad Request", @@ -75377,7 +75794,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -75497,60 +75914,22 @@ ] } }, - "/api/notification/requests": { + "/api/mobile/app/{id}": { "get": { "tags": [ - "notification-controller" + "mobile-app-controller" ], - "summary": "Get notification requests (getNotificationRequests)", - "description": "Returns the page of notification requests submitted by users of this tenant or sysadmins.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationRequests", + "summary": "Get mobile info by id (getMobileAppById)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getMobileAppById", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "id", + "in": "path", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filed based on the used template name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], @@ -75560,7 +75939,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataNotificationRequestInfo" + "$ref": "#/components/schemas/MobileApp" } } } @@ -75694,29 +76073,22 @@ "ApiKeyForm": [] } ] - } - }, - "/api/notification/sendAddonAccessError/{addonType}": { - "post": { + }, + "delete": { "tags": [ - "notification-controller" + "mobile-app-controller" ], - "summary": "Send add-on access error notification to System/Tenant administrators (sendAddonAccessError)", - "description": "Send add-on access error notification by Tenant Administrator or Customer User to System/Tenant administrators.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "sendAddonAccessError", + "summary": "Delete Mobile App by ID (deleteMobileApp)", + "description": "Deletes Mobile App by ID. Referencing non-existing mobile app Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteMobileApp", "parameters": [ { - "name": "addonType", + "name": "id", "in": "path", - "description": "Addon type", "required": true, "schema": { "type": "string", - "enum": [ - "EDGE", - "TRENDZ", - "WHITE_LABELING" - ] + "format": "uuid" } } ], @@ -75735,7 +76107,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -75855,33 +76227,47 @@ ] } }, - "/api/notification/sendAddonAccessRequest/{addonType}": { - "post": { + "/api/noauth/mobile": { + "get": { "tags": [ - "notification-controller" + "mobile-app-controller" ], - "summary": "Send add-on access request notification to System/Tenant administrators (sendAddonAccessRequest)", - "description": "Send add-on access request notification by Tenant Administrator or Customer User to System/Tenant administrators.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "sendAddonAccessRequest", + "summary": "Get mobile app login info (getLoginMobileInfo)", + "operationId": "getLoginMobileInfo", "parameters": [ { - "name": "addonType", - "in": "path", - "description": "Addon type", + "name": "pkgName", + "in": "query", + "description": "Mobile application package name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", "required": true, "schema": { "type": "string", "enum": [ - "EDGE", - "TRENDZ", - "WHITE_LABELING" + "ANDROID", + "IOS" ] } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginMobileInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -75894,7 +76280,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -76003,39 +76389,30 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/notification/sendPlanUpgradeRequest/{planName}": { - "post": { + "/api/notification/deliveryMethods": { + "get": { "tags": [ "notification-controller" ], - "summary": "Send plan upgrade request notification to Tenant administrators (sendPlanUpgradeRequest)", - "description": "Send plan upgrade access request notification by Tenant user to Tenant administrators.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "sendPlanUpgradeRequest", - "parameters": [ - { - "name": "planName", - "in": "path", - "description": "Plan name", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Get available delivery methods (getAvailableDeliveryMethods)", + "description": "Returns the list of delivery methods that are properly configured and are allowed to be used for sending notifications.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getAvailableDeliveryMethods", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationDeliveryMethod" + } + } + } + } }, "400": { "description": "Bad Request", @@ -76048,7 +76425,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -76168,24 +76545,40 @@ ] } }, - "/api/notification/settings": { - "get": { + "/api/notification/entitiesLimitIncreaseRequest/{entityType}": { + "post": { "tags": [ "notification-controller" ], - "summary": "Get notification settings (getNotificationSettings)", - "description": "Retrieves notification settings for this tenant or sysadmin.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationSettings", + "summary": "Send entity limit increase request notification to System/Tenant administrators (sendEntitiesLimitIncreaseRequest)", + "description": "Send entity limit increase request notification by Tenant Administrator or Customer User to System/Tenant administrators.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "sendEntitiesLimitIncreaseRequest", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "Entity type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "DEVICE", + "ASSET", + "CUSTOMER", + "USER", + "DASHBOARD", + "RULE_CHAIN", + "EDGE", + "INTEGRATION", + "CONVERTER", + "SCHEDULER_EVENT" + ] + } + } + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationSettings" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -76198,7 +76591,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -76316,19 +76709,21 @@ "ApiKeyForm": [] } ] - }, + } + }, + "/api/notification/request": { "post": { "tags": [ "notification-controller" ], - "summary": "Save notification settings (saveNotificationSettings)", - "description": "Saves notification settings for this tenant or sysadmin.\n`deliveryMethodsConfigs` of the settings must be specified.\n\nHere is an example of the notification settings with Slack configuration:\n```json\n{\n \"deliveryMethodsConfigs\": {\n \"SLACK\": {\n \"method\": \"SLACK\",\n \"botToken\": \"xoxb-....\"\n }\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveNotificationSettings", + "summary": "Create notification request (createNotificationRequest)", + "description": "Processes notification request.\nMandatory request properties are `targets` (list of targets ids to send notification to), and either `templateId` (existing notification template id) or `template` (to send notification without saving the template).\nOptionally, you can set `sendingDelayInSec` inside the `additionalConfig` field to schedule the notification.\n\nFor each enabled delivery method in the notification template, there must be a target in the `targets` list that supports this delivery method: if you chose `WEB`, `EMAIL` or `SMS` - there must be at least one target in `targets` of `PLATFORM_USERS` type.\nFor `SLACK` delivery method - you need to chose at least one `SLACK` notification target.\n\nNotification request object with `PROCESSING` status will be returned immediately, and the notification sending itself is done asynchronously. After all notifications are sent, the `status` of the request becomes `SENT`. Use `getNotificationRequestById` to see the notification request processing status and some sending stats. \n\nHere is an example of notification request to one target using saved template:\n```json\n{\n \"templateId\": {\n \"entityType\": \"NOTIFICATION_TEMPLATE\",\n \"id\": \"6dbc3670-e4dd-11ed-9401-dbcc5dff78be\"\n },\n \"targets\": [\n \"320e3ed0-d785-11ed-a06c-21dd57dd88ca\"\n ],\n \"additionalConfig\": {\n \"sendingDelayInSec\": 0\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "createNotificationRequest", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationSettings" + "$ref": "#/components/schemas/NotificationRequest" } } }, @@ -76340,7 +76735,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationSettings" + "$ref": "#/components/schemas/NotificationRequest" } } } @@ -76476,165 +76871,32 @@ ] } }, - "/api/notification/settings/user": { - "get": { + "/api/notification/request/preview": { + "post": { "tags": [ "notification-controller" ], - "summary": "getUserNotificationSettings", - "operationId": "getUserNotificationSettings", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserNotificationSettings" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, + "summary": "Get notification request preview (getNotificationRequestPreview)", + "description": "Returns preview for notification request.\n\n`processedTemplates` shows how the notifications for each delivery method will look like for the first recipient of the corresponding notification target.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationRequestPreview", + "parameters": [ { - "ApiKeyForm": [] + "name": "recipientsPreviewSize", + "in": "query", + "description": "Amount of the recipients to show in preview", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 20 + } } - ] - }, - "post": { - "tags": [ - "notification-controller" ], - "summary": "saveUserNotificationSettings", - "operationId": "saveUserNotificationSettings", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserNotificationSettings" + "$ref": "#/components/schemas/NotificationRequest" } } }, @@ -76646,7 +76908,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserNotificationSettings" + "$ref": "#/components/schemas/NotificationRequestPreview" } } } @@ -76782,14 +77044,14 @@ ] } }, - "/api/notification/{id}": { - "delete": { + "/api/notification/request/{id}": { + "get": { "tags": [ "notification-controller" ], - "summary": "Delete notification (deleteNotification)", - "description": "Deletes notification by its id.\n\nAvailable for any authorized user. ", - "operationId": "deleteNotification", + "summary": "Get notification request by id (getNotificationRequestById)", + "description": "Fetches notification request info by request id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationRequestById", "parameters": [ { "name": "id", @@ -76803,7 +77065,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationRequestInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -76934,16 +77203,14 @@ "ApiKeyForm": [] } ] - } - }, - "/api/notification/{id}/read": { - "put": { + }, + "delete": { "tags": [ "notification-controller" ], - "summary": "Mark notification as read (markNotificationAsRead)", - "description": "Marks notification as read by its id.\n\nAvailable for any authorized user. ", - "operationId": "markNotificationAsRead", + "summary": "Delete notification request (deleteNotificationRequest)", + "description": "Deletes notification request by its id.\n\nIf the request has status `SENT` - all sent notifications for this request will be deleted. If it is `SCHEDULED`, the request will be cancelled.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteNotificationRequest", "parameters": [ { "name": "id", @@ -77090,14 +77357,14 @@ ] } }, - "/api/notifications": { + "/api/notification/requests": { "get": { "tags": [ "notification-controller" ], - "summary": "Get notifications (getNotifications)", - "description": "Returns the page of notifications for current user.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for any authorized user. \n\n**WebSocket API**:\n\nThere are 2 types of subscriptions: one for unread notifications count, another for unread notifications themselves.\n\nThe URI for opening WS session for notifications: `/api/ws/plugins/notifications`.\n\nSubscription command for unread notifications count:\n```\n{\n \"unreadCountSubCmd\": {\n \"cmdId\": 1234\n }\n}\n```\nTo subscribe for latest unread notifications:\n```\n{\n \"unreadSubCmd\": {\n \"cmdId\": 1234,\n \"limit\": 10\n }\n}\n```\nTo unsubscribe from any subscription:\n```\n{\n \"unsubCmd\": {\n \"cmdId\": 1234\n }\n}\n```\nTo mark certain notifications as read, use following command:\n```\n{\n \"markAsReadCmd\": {\n \"cmdId\": 1234,\n \"notifications\": [\n \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\",\n \"5b6dfee0-8d0d-11ed-b61f-35a57b03dade\"\n ]\n }\n}\n\n```\nTo mark all notifications as read:\n```\n{\n \"markAllAsReadCmd\": {\n \"cmdId\": 1234\n }\n}\n```\n\n\nUpdate structure for unread **notifications count subscription**:\n```\n{\n \"cmdId\": 1234,\n \"totalUnreadCount\": 55\n}\n```\nFor **notifications subscription**:\n- full update of latest unread notifications:\n```\n{\n \"cmdId\": 1234,\n \"notifications\": [\n {\n \"id\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\"\n },\n ...\n }\n ],\n \"totalUnreadCount\": 1\n}\n```\n- when new notification arrives or shown notification is updated:\n```\n{\n \"cmdId\": 1234,\n \"update\": {\n \"id\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\"\n },\n # updated notification info, text, subject etc.\n ...\n },\n \"totalUnreadCount\": 2\n}\n```\n- when unread notifications count changes:\n```\n{\n \"cmdId\": 1234,\n \"totalUnreadCount\": 5\n}\n```", - "operationId": "getNotifications", + "summary": "Get notification requests (getNotificationRequests)", + "description": "Returns the page of notification requests submitted by users of this tenant or sysadmins.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationRequests", "parameters": [ { "name": "pageSize", @@ -77122,7 +77389,7 @@ { "name": "textSearch", "in": "query", - "description": "Case-insensitive 'substring' filter based on notification subject or text", + "description": "Case-insensitive 'substring' filed based on the used template name", "required": false, "schema": { "type": "string" @@ -77145,29 +77412,6 @@ "schema": { "type": "string" } - }, - { - "name": "unreadOnly", - "in": "query", - "description": "To search for unread notifications only", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "deliveryMethod", - "in": "query", - "description": "Delivery method", - "required": false, - "schema": { - "type": "string", - "enum": [ - "WEB", - "MOBILE_APP" - ] - } } ], "responses": { @@ -77176,7 +77420,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataNotification" + "$ref": "#/components/schemas/PageDataNotificationRequestInfo" } } } @@ -77312,25 +77556,26 @@ ] } }, - "/api/notifications/read": { - "put": { + "/api/notification/sendAddonAccessError/{addonType}": { + "post": { "tags": [ "notification-controller" ], - "summary": "Mark all notifications as read (markAllNotificationsAsRead)", - "description": "Marks all unread notifications as read.\n\nAvailable for any authorized user. ", - "operationId": "markAllNotificationsAsRead", + "summary": "Send add-on access error notification to System/Tenant administrators (sendAddonAccessError)", + "description": "Send add-on access error notification by Tenant Administrator or Customer User to System/Tenant administrators.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "sendAddonAccessError", "parameters": [ { - "name": "deliveryMethod", - "in": "query", - "description": "Delivery method", - "required": false, + "name": "addonType", + "in": "path", + "description": "Addon type", + "required": true, "schema": { "type": "string", "enum": [ - "WEB", - "MOBILE_APP" + "EDGE", + "TRENDZ", + "WHITE_LABELING" ] } } @@ -77350,7 +77595,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -77470,41 +77715,188 @@ ] } }, - "/api/notifications/unread/count": { - "get": { + "/api/notification/sendAddonAccessRequest/{addonType}": { + "post": { "tags": [ "notification-controller" ], - "summary": "Get unread notifications count (getUnreadNotificationsCount)", - "description": "Returns unread notifications count for chosen delivery method.\n\nAvailable for any authorized user. ", - "operationId": "getUnreadNotificationsCount", + "summary": "Send add-on access request notification to System/Tenant administrators (sendAddonAccessRequest)", + "description": "Send add-on access request notification by Tenant Administrator or Customer User to System/Tenant administrators.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "sendAddonAccessRequest", "parameters": [ { - "name": "deliveryMethod", - "in": "query", - "description": "Delivery method", - "required": false, + "name": "addonType", + "in": "path", + "description": "Addon type", + "required": true, "schema": { "type": "string", "enum": [ - "WEB", - "MOBILE_APP" + "EDGE", + "TRENDZ", + "WHITE_LABELING" ] } } ], "responses": { "200": { - "description": "OK", + "description": "OK" + }, + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } } } } }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/notification/sendPlanUpgradeRequest/{planName}": { + "post": { + "tags": [ + "notification-controller" + ], + "summary": "Send plan upgrade request notification to Tenant administrators (sendPlanUpgradeRequest)", + "description": "Send plan upgrade access request notification by Tenant user to Tenant administrators.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "sendPlanUpgradeRequest", + "parameters": [ + { + "name": "planName", + "in": "path", + "description": "Plan name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -77516,7 +77908,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -77636,31 +78028,21 @@ ] } }, - "/api/notification/rule": { - "post": { + "/api/notification/settings": { + "get": { "tags": [ - "notification-rule-controller" + "notification-controller" ], - "summary": "Save notification rule (saveNotificationRule)", - "description": "Creates or updates notification rule. \n\nMandatory properties are `name`, `templateId` (of a template with `notificationType` matching to rule's `triggerType`), `triggerType`, `triggerConfig` and `recipientConfig`. Additionally, you may specify rule `description` inside of `additionalConfig`.\n\nTrigger type of the rule cannot be changed. Available trigger types for tenant: `ENTITY_ACTION`, `ALARM`, `ALARM_COMMENT`, `ALARM_ASSIGNMENT`, `DEVICE_ACTIVITY`, `RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT`.\nFor sysadmin, there are following trigger types available: `ENTITIES_LIMIT`, `API_USAGE_LIMIT`, `NEW_PLATFORM_VERSION`.\n\nHere is an example of notification rule to send notification when a device, asset or customer is created or deleted:\n```json\n{\n \"name\": \"Entity action\",\n \"templateId\": {\n \"entityType\": \"NOTIFICATION_TEMPLATE\",\n \"id\": \"32117320-d785-11ed-a06c-21dd57dd88ca\"\n },\n \"triggerType\": \"ENTITY_ACTION\",\n \"triggerConfig\": {\n \"entityTypes\": [\n \"CUSTOMER\",\n \"DEVICE\",\n \"ASSET\"\n ],\n \"created\": true,\n \"updated\": false,\n \"deleted\": true,\n \"triggerType\": \"ENTITY_ACTION\"\n },\n \"recipientsConfig\": {\n \"targets\": [\n \"320f2930-d785-11ed-a06c-21dd57dd88ca\"\n ],\n \"triggerType\": \"ENTITY_ACTION\"\n },\n \"additionalConfig\": {\n \"description\": \"Send notification to tenant admins or customer users when a device, asset or customer is created\"\n },\n \"templateName\": \"Entity action notification\",\n \"deliveryMethods\": [\n \"WEB\"\n ]\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveNotificationRule", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationRule" - } - } - }, - "required": true - }, + "summary": "Get notification settings (getNotificationSettings)", + "description": "Retrieves notification settings for this tenant or sysadmin.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationSettings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationRule" + "$ref": "#/components/schemas/NotificationSettings" } } } @@ -77676,7 +78058,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -77794,34 +78176,31 @@ "ApiKeyForm": [] } ] - } - }, - "/api/notification/rule/{id}": { - "get": { + }, + "post": { "tags": [ - "notification-rule-controller" + "notification-controller" ], - "summary": "Get notification rule by id (getNotificationRuleById)", - "description": "Fetches notification rule info by rule's id.\nIn addition to regular notification rule fields, there are `templateName` and `deliveryMethods` in the response.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationRuleById", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Save notification settings (saveNotificationSettings)", + "description": "Saves notification settings for this tenant or sysadmin.\n`deliveryMethodsConfigs` of the settings must be specified.\n\nHere is an example of the notification settings with Slack configuration:\n```json\n{\n \"deliveryMethodsConfigs\": {\n \"SLACK\": {\n \"method\": \"SLACK\",\n \"botToken\": \"xoxb-....\"\n }\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveNotificationSettings", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationSettings" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationRuleInfo" + "$ref": "#/components/schemas/NotificationSettings" } } } @@ -77837,7 +78216,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -77955,28 +78334,25 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/notification/settings/user": { + "get": { "tags": [ - "notification-rule-controller" - ], - "summary": "Delete notification rule (deleteNotificationRule)", - "description": "Deletes notification rule by id.\nCancels all related scheduled notification requests (e.g. due to escalation table)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "deleteNotificationRule", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "notification-controller" ], + "summary": "getUserNotificationSettings", + "operationId": "getUserNotificationSettings", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserNotificationSettings" + } + } + } }, "400": { "description": "Bad Request", @@ -78107,72 +78483,30 @@ "ApiKeyForm": [] } ] - } - }, - "/api/notification/rules": { - "get": { + }, + "post": { "tags": [ - "notification-rule-controller" + "notification-controller" ], - "summary": "Get notification rules (getNotificationRules)", - "description": "Returns the page of notification rules.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationRules", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on rule's name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" + "summary": "saveUserNotificationSettings", + "operationId": "saveUserNotificationSettings", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserNotificationSettings" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataNotificationRuleInfo" + "$ref": "#/components/schemas/UserNotificationSettings" } } } @@ -78188,7 +78522,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -78308,34 +78642,28 @@ ] } }, - "/api/notification/target": { - "post": { + "/api/notification/{id}": { + "delete": { "tags": [ - "notification-target-controller" + "notification-controller" ], - "summary": "Save notification target (saveNotificationTarget)", - "description": "Creates or updates notification target.\n\nAvailable `configuration` types are `PLATFORM_USERS` and `SLACK`.\nFor `PLATFORM_USERS` the `usersFilter` must be specified. For tenant, there are following users filter types available: `USER_LIST`, `CUSTOMER_USERS`, `USER_GROUP_LIST`, `TENANT_ADMINISTRATORS`, `USER_ROLE`, `ALL_USERS`, `ORIGINATOR_ENTITY_OWNER_USERS`, `AFFECTED_USER`.\nFor sysadmin: `TENANT_ADMINISTRATORS`, `AFFECTED_TENANT_ADMINISTRATORS`, `SYSTEM_ADMINISTRATORS`, `ALL_USERS`.\n\nHere is an example of tenant-level notification target to send notification to customer's users:\n```json\n{\n \"name\": \"Users of Customer A\",\n \"configuration\": {\n \"type\": \"PLATFORM_USERS\",\n \"usersFilter\": {\n \"type\": \"CUSTOMER_USERS\",\n \"customerId\": \"32499a20-d785-11ed-a06c-21dd57dd88ca\"\n },\n \"description\": \"Users of Customer A\"\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveNotificationTarget", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationTarget" - } + "summary": "Delete notification (deleteNotification)", + "description": "Deletes notification by its id.\n\nAvailable for any authorized user. ", + "operationId": "deleteNotification", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" } - }, - "required": true - }, + } + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationTarget" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -78348,7 +78676,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -78468,56 +78796,28 @@ ] } }, - "/api/notification/target/recipients": { - "post": { + "/api/notification/{id}/read": { + "put": { "tags": [ - "notification-target-controller" + "notification-controller" ], - "summary": "Get recipients for notification target config (getRecipientsForNotificationTargetConfig)", - "description": "Returns the page of recipients for such notification target configuration.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getRecipientsForNotificationTargetConfig", + "summary": "Mark notification as read (markNotificationAsRead)", + "description": "Marks notification as read by its id.\n\nAvailable for any authorized user. ", + "operationId": "markNotificationAsRead", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "id", + "in": "path", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "format": "uuid" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationTarget" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataUser" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -78530,7 +78830,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -78650,22 +78950,83 @@ ] } }, - "/api/notification/target/{id}": { + "/api/notifications": { "get": { "tags": [ - "notification-target-controller" + "notification-controller" ], - "summary": "Get notification target by id (getNotificationTargetById)", - "description": "Fetches notification target by id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTargetById", + "summary": "Get notifications (getNotifications)", + "description": "Returns the page of notifications for current user.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for any authorized user. \n\n**WebSocket API**:\n\nThere are 2 types of subscriptions: one for unread notifications count, another for unread notifications themselves.\n\nThe URI for opening WS session for notifications: `/api/ws/plugins/notifications`.\n\nSubscription command for unread notifications count:\n```\n{\n \"unreadCountSubCmd\": {\n \"cmdId\": 1234\n }\n}\n```\nTo subscribe for latest unread notifications:\n```\n{\n \"unreadSubCmd\": {\n \"cmdId\": 1234,\n \"limit\": 10\n }\n}\n```\nTo unsubscribe from any subscription:\n```\n{\n \"unsubCmd\": {\n \"cmdId\": 1234\n }\n}\n```\nTo mark certain notifications as read, use following command:\n```\n{\n \"markAsReadCmd\": {\n \"cmdId\": 1234,\n \"notifications\": [\n \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\",\n \"5b6dfee0-8d0d-11ed-b61f-35a57b03dade\"\n ]\n }\n}\n\n```\nTo mark all notifications as read:\n```\n{\n \"markAllAsReadCmd\": {\n \"cmdId\": 1234\n }\n}\n```\n\n\nUpdate structure for unread **notifications count subscription**:\n```\n{\n \"cmdId\": 1234,\n \"totalUnreadCount\": 55\n}\n```\nFor **notifications subscription**:\n- full update of latest unread notifications:\n```\n{\n \"cmdId\": 1234,\n \"notifications\": [\n {\n \"id\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\"\n },\n ...\n }\n ],\n \"totalUnreadCount\": 1\n}\n```\n- when new notification arrives or shown notification is updated:\n```\n{\n \"cmdId\": 1234,\n \"update\": {\n \"id\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\"\n },\n # updated notification info, text, subject etc.\n ...\n },\n \"totalUnreadCount\": 2\n}\n```\n- when unread notifications count changes:\n```\n{\n \"cmdId\": 1234,\n \"totalUnreadCount\": 5\n}\n```", + "operationId": "getNotifications", "parameters": [ { - "name": "id", - "in": "path", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on notification subject or text", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "unreadOnly", + "in": "query", + "description": "To search for unread notifications only", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "deliveryMethod", + "in": "query", + "description": "Delivery method", + "required": false, "schema": { "type": "string", - "format": "uuid" + "enum": [ + "WEB", + "MOBILE_APP" + ] } } ], @@ -78675,7 +79036,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationTarget" + "$ref": "#/components/schemas/PageDataNotification" } } } @@ -78809,22 +79170,28 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/notifications/read": { + "put": { "tags": [ - "notification-target-controller" + "notification-controller" ], - "summary": "Delete notification target by id (deleteNotificationTargetById)", - "description": "Deletes notification target by its id.\n\nThis target cannot be referenced by existing scheduled notification requests or any notification rules.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "deleteNotificationTargetById", + "summary": "Mark all notifications as read (markAllNotificationsAsRead)", + "description": "Marks all unread notifications as read.\n\nAvailable for any authorized user. ", + "operationId": "markAllNotificationsAsRead", "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "deliveryMethod", + "in": "query", + "description": "Delivery method", + "required": false, "schema": { "type": "string", - "format": "uuid" + "enum": [ + "WEB", + "MOBILE_APP" + ] } } ], @@ -78963,60 +79330,26 @@ ] } }, - "/api/notification/targets": { + "/api/notifications/unread/count": { "get": { "tags": [ - "notification-target-controller" + "notification-controller" ], - "summary": "Get notification targets (getNotificationTargets)", - "description": "Returns the page of notification targets owned by sysadmin or tenant.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTargets", + "summary": "Get unread notifications count (getUnreadNotificationsCount)", + "description": "Returns unread notifications count for chosen delivery method.\n\nAvailable for any authorized user. ", + "operationId": "getUnreadNotificationsCount", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filed based on the target's name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", + "name": "deliveryMethod", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Delivery method", "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "WEB", + "MOBILE_APP" + ] } } ], @@ -79026,7 +79359,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataNotificationTarget" + "type": "integer", + "format": "int32" } } } @@ -79162,38 +79496,31 @@ ] } }, - "/api/notification/targets/list": { - "get": { + "/api/notification/rule": { + "post": { "tags": [ - "notification-target-controller" + "notification-rule-controller" ], - "summary": "Get notification targets by ids (getNotificationTargetsByIds)", - "description": "Returns the list of notification targets found by provided ids.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTargetsByIds", - "parameters": [ - { - "name": "ids", - "in": "query", - "description": "Comma-separated list of uuids representing targets ids", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" + "summary": "Save notification rule (saveNotificationRule)", + "description": "Creates or updates notification rule. \n\nMandatory properties are `name`, `templateId` (of a template with `notificationType` matching to rule's `triggerType`), `triggerType`, `triggerConfig` and `recipientConfig`. Additionally, you may specify rule `description` inside of `additionalConfig`.\n\nTrigger type of the rule cannot be changed. Available trigger types for tenant: `ENTITY_ACTION`, `ALARM`, `ALARM_COMMENT`, `ALARM_ASSIGNMENT`, `DEVICE_ACTIVITY`, `RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT`.\nFor sysadmin, there are following trigger types available: `ENTITIES_LIMIT`, `API_USAGE_LIMIT`, `NEW_PLATFORM_VERSION`.\n\nHere is an example of notification rule to send notification when a device, asset or customer is created or deleted:\n```json\n{\n \"name\": \"Entity action\",\n \"templateId\": {\n \"entityType\": \"NOTIFICATION_TEMPLATE\",\n \"id\": \"32117320-d785-11ed-a06c-21dd57dd88ca\"\n },\n \"triggerType\": \"ENTITY_ACTION\",\n \"triggerConfig\": {\n \"entityTypes\": [\n \"CUSTOMER\",\n \"DEVICE\",\n \"ASSET\"\n ],\n \"created\": true,\n \"updated\": false,\n \"deleted\": true,\n \"triggerType\": \"ENTITY_ACTION\"\n },\n \"recipientsConfig\": {\n \"targets\": [\n \"320f2930-d785-11ed-a06c-21dd57dd88ca\"\n ],\n \"triggerType\": \"ENTITY_ACTION\"\n },\n \"additionalConfig\": {\n \"description\": \"Send notification to tenant admins or customer users when a device, asset or customer is created\"\n },\n \"templateName\": \"Entity action notification\",\n \"deliveryMethods\": [\n \"WEB\"\n ]\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveNotificationRule", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationRule" } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationTarget" - } + "$ref": "#/components/schemas/NotificationRule" } } } @@ -79209,7 +79536,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -79329,69 +79656,22 @@ ] } }, - "/api/notification/targets/notificationType/{notificationType}": { + "/api/notification/rule/{id}": { "get": { "tags": [ - "notification-target-controller" + "notification-rule-controller" ], - "summary": "Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType)", - "description": "Returns the page of notification targets filtered by notification type that they can be used for.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTargetsBySupportedNotificationType", + "summary": "Get notification rule by id (getNotificationRuleById)", + "description": "Fetches notification rule info by rule's id.\nIn addition to regular notification rule fields, there are `templateName` and `deliveryMethods` in the response.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationRuleById", "parameters": [ { - "name": "notificationType", + "name": "id", "in": "path", - "description": "Notification type to filter targets by", - "required": true, - "schema": { - "$ref": "#/components/schemas/NotificationType" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filed based on the target's name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], @@ -79401,7 +79681,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataNotificationTarget" + "$ref": "#/components/schemas/NotificationRuleInfo" } } } @@ -79535,48 +79815,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/notification/slack/conversations": { - "get": { + }, + "delete": { "tags": [ - "notification-template-controller" + "notification-rule-controller" ], - "summary": "List Slack conversations (listSlackConversations)", - "description": "List available Slack conversations by type.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "listSlackConversations", + "summary": "Delete notification rule (deleteNotificationRule)", + "description": "Deletes notification rule by id.\nCancels all related scheduled notification requests (e.g. due to escalation table)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteNotificationRule", "parameters": [ { - "name": "type", - "in": "query", + "name": "id", + "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/SlackConversationType" - } - }, - { - "name": "token", - "in": "query", - "description": "Slack bot token. If absent - system Slack settings will be used", - "required": false, - "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SlackConversation" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -79709,31 +79969,70 @@ ] } }, - "/api/notification/template": { - "post": { + "/api/notification/rules": { + "get": { "tags": [ - "notification-template-controller" + "notification-rule-controller" ], - "summary": "Save notification template (saveNotificationTemplate)", - "description": "Creates or updates notification template.\n\nHere is an example of template to send notification via Web, SMS and Slack:\n```json\n{\n \"name\": \"Greetings\",\n \"notificationType\": \"GENERAL\",\n \"configuration\": {\n \"deliveryMethodsTemplates\": {\n \"WEB\": {\n \"enabled\": true,\n \"subject\": \"Greetings\",\n \"body\": \"Hi there, ${recipientTitle}\",\n \"additionalConfig\": {\n \"icon\": {\n \"enabled\": true,\n \"icon\": \"back_hand\",\n \"color\": \"#757575\"\n },\n \"actionButtonConfig\": {\n \"enabled\": false\n }\n },\n \"method\": \"WEB\"\n },\n \"SMS\": {\n \"enabled\": true,\n \"body\": \"Hi there, ${recipientTitle}\",\n \"method\": \"SMS\"\n },\n \"SLACK\": {\n \"enabled\": true,\n \"body\": \"Hi there, @${recipientTitle}\",\n \"method\": \"SLACK\"\n }\n }\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveNotificationTemplate", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationTemplate" - } + "summary": "Get notification rules (getNotificationRules)", + "description": "Returns the page of notification rules.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationRules", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on rule's name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationTemplate" + "$ref": "#/components/schemas/PageDataNotificationRuleInfo" } } } @@ -79749,7 +80048,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -79869,32 +80168,31 @@ ] } }, - "/api/notification/template/{id}": { - "get": { + "/api/notification/target": { + "post": { "tags": [ - "notification-template-controller" + "notification-target-controller" ], - "summary": "Get notification template by id (getNotificationTemplateById)", - "description": "Fetches notification template by id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTemplateById", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Save notification target (saveNotificationTarget)", + "description": "Creates or updates notification target.\n\nAvailable `configuration` types are `PLATFORM_USERS` and `SLACK`.\nFor `PLATFORM_USERS` the `usersFilter` must be specified. For tenant, there are following users filter types available: `USER_LIST`, `CUSTOMER_USERS`, `USER_GROUP_LIST`, `TENANT_ADMINISTRATORS`, `USER_ROLE`, `ALL_USERS`, `ORIGINATOR_ENTITY_OWNER_USERS`, `AFFECTED_USER`.\nFor sysadmin: `TENANT_ADMINISTRATORS`, `AFFECTED_TENANT_ADMINISTRATORS`, `SYSTEM_ADMINISTRATORS`, `ALL_USERS`.\n\nHere is an example of tenant-level notification target to send notification to customer's users:\n```json\n{\n \"name\": \"Users of Customer A\",\n \"configuration\": {\n \"type\": \"PLATFORM_USERS\",\n \"usersFilter\": {\n \"type\": \"CUSTOMER_USERS\",\n \"customerId\": \"32499a20-d785-11ed-a06c-21dd57dd88ca\"\n },\n \"description\": \"Users of Customer A\"\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveNotificationTarget", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTarget" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationTemplate" + "$ref": "#/components/schemas/NotificationTarget" } } } @@ -79910,7 +80208,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -80028,28 +80326,58 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/notification/target/recipients": { + "post": { "tags": [ - "notification-template-controller" + "notification-target-controller" ], - "summary": "Delete notification template by id (deleteNotificationTemplateById", - "description": "Deletes notification template by its id.\n\nThis template cannot be referenced by existing scheduled notification requests or any notification rules.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "deleteNotificationTemplateById", + "summary": "Get recipients for notification target config (getRecipientsForNotificationTargetConfig)", + "description": "Returns the page of recipients for such notification target configuration.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getRecipientsForNotificationTargetConfig", "parameters": [ { - "name": "id", - "in": "path", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTarget" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataUser" + } + } + } }, "400": { "description": "Bad Request", @@ -80062,7 +80390,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -80182,72 +80510,22 @@ ] } }, - "/api/notification/templates": { + "/api/notification/target/{id}": { "get": { "tags": [ - "notification-template-controller" + "notification-target-controller" ], - "summary": "Get notification templates (getNotificationTemplates)", - "description": "Returns the page of notification templates owned by sysadmin or tenant.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTemplates", + "summary": "Get notification target by id (getNotificationTargetById)", + "description": "Fetches notification target by id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationTargetById", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "id", + "in": "path", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on template's name and notification type", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "notificationTypes", - "in": "query", - "description": "Comma-separated list of notification types to filter the templates", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string", + "format": "uuid" } } ], @@ -80257,7 +80535,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataNotificationTemplate" + "$ref": "#/components/schemas/NotificationTarget" } } } @@ -80391,29 +80669,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/oauth2/config/template": { - "get": { + }, + "delete": { "tags": [ - "o-auth-2-config-template-controller" + "notification-target-controller" + ], + "summary": "Delete notification target by id (deleteNotificationTargetById)", + "description": "Deletes notification target by its id.\n\nThis target cannot be referenced by existing scheduled notification requests or any notification rules.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteNotificationTargetById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - "summary": "Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", - "operationId": "getOAuth2ClientRegistrationTemplates", "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OAuth2ClientRegistrationTemplate" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -80544,31 +80821,72 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/notification/targets": { + "get": { "tags": [ - "o-auth-2-config-template-controller" + "notification-target-controller" ], - "summary": "Create or update OAuth2 client registration template (saveClientRegistrationTemplate)\n\nAvailable for users with 'SYS_ADMIN' authority.", - "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", - "operationId": "saveClientRegistrationTemplate", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuth2ClientRegistrationTemplate" - } + "summary": "Get notification targets (getNotificationTargets)", + "description": "Returns the page of notification targets owned by sysadmin or tenant.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationTargets", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filed based on the target's name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OAuth2ClientRegistrationTemplate" + "$ref": "#/components/schemas/PageDataNotificationTarget" } } } @@ -80584,7 +80902,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -80704,29 +81022,41 @@ ] } }, - "/api/oauth2/config/template/{clientRegistrationTemplateId}": { - "delete": { + "/api/notification/targets/list": { + "get": { "tags": [ - "o-auth-2-config-template-controller" + "notification-target-controller" ], - "summary": "Delete OAuth2 client registration template by id (deleteClientRegistrationTemplate)\n\nAvailable for users with 'SYS_ADMIN' authority.", - "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", - "operationId": "deleteClientRegistrationTemplate", + "summary": "Get notification targets by ids (getNotificationTargetsByIds)", + "description": "Returns the list of notification targets found by provided ids.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationTargetsByIds", "parameters": [ { - "name": "clientRegistrationTemplateId", - "in": "path", - "description": "String representation of client registration template id to delete", + "name": "ids", + "in": "query", + "description": "Comma-separated list of uuids representing targets ids", "required": true, "schema": { - "type": "string" - }, - "example": "139b1f81-2f5d-11ec-9dbe-9b627e1a88f4" + "type": "array", + "items": { + "type": "string" + } + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTarget" + } + } + } + } }, "400": { "description": "Bad Request", @@ -80859,36 +81189,69 @@ ] } }, - "/api/noauth/oauth2Clients": { - "post": { + "/api/notification/targets/notificationType/{notificationType}": { + "get": { "tags": [ - "o-auth-2-controller" + "notification-target-controller" ], - "summary": "Get OAuth2 clients (getOAuth2Clients)", - "description": "Get the list of OAuth2 clients to log in with, available for such domain scheme (HTTP or HTTPS) (if x-forwarded-proto request header is present - the scheme is known from it) and domain name and port (port may be known from x-forwarded-port header)", - "operationId": "getOAuth2Clients", + "summary": "Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType)", + "description": "Returns the page of notification targets filtered by notification type that they can be used for.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationTargetsBySupportedNotificationType", "parameters": [ { - "name": "pkgName", + "name": "notificationType", + "in": "path", + "description": "Notification type to filter targets by", + "required": true, + "schema": { + "$ref": "#/components/schemas/NotificationType" + } + }, + { + "name": "pageSize", "in": "query", - "description": "Mobile application package name, to find OAuth2 clients where there is configured mobile application with such package name", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filed based on the target's name", "required": false, "schema": { "type": "string" } }, { - "name": "platform", + "name": "sortProperty", "in": "query", - "description": "Platform type to search OAuth2 clients for which the usage with this platform type is allowed in the settings. If platform type is not one of allowable values - it will just be ignored", + "description": "Property of entity to sort by", "required": false, "schema": { - "type": "string", - "enum": [ - "WEB", - "ANDROID", - "IOS" - ] + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" } } ], @@ -80898,10 +81261,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OAuth2ClientLoginInfo" - } + "$ref": "#/components/schemas/PageDataNotificationTarget" } } } @@ -80917,7 +81277,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -81026,34 +81386,54 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/oauth2/client": { - "post": { + "/api/notification/slack/conversations": { + "get": { "tags": [ - "o-auth-2-controller" + "notification-template-controller" ], - "summary": "Save OAuth2 Client (saveOAuth2Client)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveOAuth2Client", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuth2Client" - } + "summary": "List Slack conversations (listSlackConversations)", + "description": "List available Slack conversations by type.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "listSlackConversations", + "parameters": [ + { + "name": "type", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/SlackConversationType" } }, - "required": true - }, + { + "name": "token", + "in": "query", + "description": "Slack bot token. If absent - system Slack settings will be used", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OAuth2Client" + "type": "array", + "items": { + "$ref": "#/components/schemas/SlackConversation" + } } } } @@ -81069,7 +81449,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -81189,70 +81569,31 @@ ] } }, - "/api/oauth2/client/infos": { - "get": { + "/api/notification/template": { + "post": { "tags": [ - "o-auth-2-controller" + "notification-template-controller" ], - "summary": "Get OAuth2 Client infos (findOAuth2ClientInfos)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findOAuth2ClientInfos", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on client's title", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" + "summary": "Save notification template (saveNotificationTemplate)", + "description": "Creates or updates notification template.\n\nHere is an example of template to send notification via Web, SMS and Slack:\n```json\n{\n \"name\": \"Greetings\",\n \"notificationType\": \"GENERAL\",\n \"configuration\": {\n \"deliveryMethodsTemplates\": {\n \"WEB\": {\n \"enabled\": true,\n \"subject\": \"Greetings\",\n \"body\": \"Hi there, ${recipientTitle}\",\n \"additionalConfig\": {\n \"icon\": {\n \"enabled\": true,\n \"icon\": \"back_hand\",\n \"color\": \"#757575\"\n },\n \"actionButtonConfig\": {\n \"enabled\": false\n }\n },\n \"method\": \"WEB\"\n },\n \"SMS\": {\n \"enabled\": true,\n \"body\": \"Hi there, ${recipientTitle}\",\n \"method\": \"SMS\"\n },\n \"SLACK\": {\n \"enabled\": true,\n \"body\": \"Hi there, @${recipientTitle}\",\n \"method\": \"SLACK\"\n }\n }\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveNotificationTemplate", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplate" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataOAuth2ClientInfo" + "$ref": "#/components/schemas/NotificationTemplate" } } } @@ -81268,7 +81609,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -81388,25 +81729,22 @@ ] } }, - "/api/oauth2/client/list": { + "/api/notification/template/{id}": { "get": { "tags": [ - "o-auth-2-controller" + "notification-template-controller" ], - "summary": "Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds)", - "description": "Fetch OAuth2 Client info objects based on the provided ids. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findTenantOAuth2ClientInfosByIds", + "summary": "Get notification template by id (getNotificationTemplateById)", + "description": "Fetches notification template by id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationTemplateById", "parameters": [ { - "name": "clientIds", - "in": "query", - "description": "A list of oauth2 ids, separated by comma ','", + "name": "id", + "in": "path", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string", + "format": "uuid" } } ], @@ -81416,10 +81754,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OAuth2ClientInfo" - } + "$ref": "#/components/schemas/NotificationTemplate" } } } @@ -81553,16 +81888,14 @@ "ApiKeyForm": [] } ] - } - }, - "/api/oauth2/client/{id}": { - "get": { + }, + "delete": { "tags": [ - "o-auth-2-controller" + "notification-template-controller" ], - "summary": "Get OAuth2 Client by id (getOAuth2ClientById)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getOAuth2ClientById", + "summary": "Delete notification template by id (deleteNotificationTemplateById", + "description": "Deletes notification template by its id.\n\nThis template cannot be referenced by existing scheduled notification requests or any notification rules.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteNotificationTemplateById", "parameters": [ { "name": "id", @@ -81576,14 +81909,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuth2Client" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -81714,28 +82040,87 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/notification/templates": { + "get": { "tags": [ - "o-auth-2-controller" + "notification-template-controller" ], - "summary": "Delete oauth2 client (deleteOauth2Client)", - "description": "Deletes the oauth2 client. Referencing non-existing oauth2 client Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "deleteOauth2Client", + "summary": "Get notification templates (getNotificationTemplates)", + "description": "Returns the page of notification templates owned by sysadmin or tenant.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationTemplates", "parameters": [ { - "name": "id", - "in": "path", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on template's name and notification type", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "notificationTypes", + "in": "query", + "description": "Comma-separated list of notification types to filter the templates", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataNotificationTemplate" + } + } + } }, "400": { "description": "Bad Request", @@ -81868,21 +82253,24 @@ ] } }, - "/api/oauth2/loginProcessingUrl": { + "/api/oauth2/config/template": { "get": { "tags": [ - "o-auth-2-controller" + "o-auth-2-config-template-controller" ], - "summary": "Get OAuth2 log in processing URL (getLoginProcessingUrl)", - "description": "Returns the URL enclosed in double quotes. After successful authentication with OAuth2 provider, it makes a redirect to this path so that the platform can do further log in processing. This URL may be configured as 'security.oauth2.loginProcessingUrl' property in yml configuration file, or as 'SECURITY_OAUTH2_LOGIN_PROCESSING_URL' env variable. By default it is '/login/oauth2/code/'\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getLoginProcessingUrl", + "summary": "Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", + "operationId": "getOAuth2ClientRegistrationTemplates", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/OAuth2ClientRegistrationTemplate" + } } } } @@ -82016,21 +82404,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/otaPackage": { + }, "post": { "tags": [ - "ota-package-controller" + "o-auth-2-config-template-controller" ], - "summary": "Create Or Update OTA Package Info (saveOtaPackageInfo)", - "description": "Create or update the OTA Package Info. When creating OTA Package Info, platform generates OTA Package id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created OTA Package id will be present in the response. Specify existing OTA Package id to update the OTA Package Info. Referencing non-existing OTA Package Id will cause 'Not Found' error. \n\nOTA Package combination of the title with the version is unique in the scope of tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveOtaPackageInfo", + "summary": "Create or update OAuth2 client registration template (saveClientRegistrationTemplate)\n\nAvailable for users with 'SYS_ADMIN' authority.", + "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", + "operationId": "saveClientRegistrationTemplate", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SaveOtaPackageInfoRequest" + "$ref": "#/components/schemas/OAuth2ClientRegistrationTemplate" } } }, @@ -82042,7 +82428,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OtaPackageInfo" + "$ref": "#/components/schemas/OAuth2ClientRegistrationTemplate" } } } @@ -82178,35 +82564,29 @@ ] } }, - "/api/otaPackage/info/{otaPackageId}": { - "get": { + "/api/oauth2/config/template/{clientRegistrationTemplateId}": { + "delete": { "tags": [ - "ota-package-controller" + "o-auth-2-config-template-controller" ], - "summary": "Get OTA Package Info (getOtaPackageInfoById)", - "description": "Fetch the OTA Package Info object based on the provided OTA Package Id. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getOtaPackageInfoById", + "summary": "Delete OAuth2 client registration template by id (deleteClientRegistrationTemplate)\n\nAvailable for users with 'SYS_ADMIN' authority.", + "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", + "operationId": "deleteClientRegistrationTemplate", "parameters": [ { - "name": "otaPackageId", + "name": "clientRegistrationTemplateId", "in": "path", - "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "String representation of client registration template id to delete", "required": true, "schema": { "type": "string" - } + }, + "example": "139b1f81-2f5d-11ec-9dbe-9b627e1a88f4" } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OtaPackageInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -82339,23 +82719,37 @@ ] } }, - "/api/otaPackage/{otaPackageId}": { - "get": { + "/api/noauth/oauth2Clients": { + "post": { "tags": [ - "ota-package-controller" + "o-auth-2-controller" ], - "summary": "Get OTA Package (getOtaPackageById)", - "description": "Fetch the OTA Package object based on the provided OTA Package Id. The server checks that the OTA Package is owned by the same tenant. OTA Package is a heavyweight object that includes main information about the OTA Package and also data. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getOtaPackageById", + "summary": "Get OAuth2 clients (getOAuth2Clients)", + "description": "Get the list of OAuth2 clients to log in with, available for such domain scheme (HTTP or HTTPS) (if x-forwarded-proto request header is present - the scheme is known from it) and domain name and port (port may be known from x-forwarded-port header)", + "operationId": "getOAuth2Clients", "parameters": [ { - "name": "otaPackageId", - "in": "path", - "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "pkgName", + "in": "query", + "description": "Mobile application package name, to find OAuth2 clients where there is configured mobile application with such package name", + "required": false, "schema": { "type": "string" } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type to search OAuth2 clients for which the usage with this platform type is allowed in the settings. If platform type is not one of allowable values - it will just be ignored", + "required": false, + "schema": { + "type": "string", + "enum": [ + "WEB", + "ANDROID", + "IOS" + ] + } } ], "responses": { @@ -82364,7 +82758,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OtaPackage" + "type": "array", + "items": { + "$ref": "#/components/schemas/OAuth2ClientLoginInfo" + } } } } @@ -82380,7 +82777,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -82489,79 +82886,26 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - }, + } + } + }, + "/api/oauth2/client": { "post": { "tags": [ - "ota-package-controller" - ], - "summary": "Save OTA Package data (saveOtaPackageData)", - "description": "Update the OTA Package. Adds the date to the existing OTA Package Info\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveOtaPackageData", - "parameters": [ - { - "name": "otaPackageId", - "in": "path", - "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "checksum", - "in": "query", - "description": "OTA Package checksum. For example, '0xd87f7e0c'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "checksumAlgorithm", - "in": "query", - "description": "OTA Package checksum algorithm.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "MD5", - "SHA256", - "SHA384", - "SHA512", - "CRC32", - "MURMUR3_32", - "MURMUR3_128" - ] - } - } + "o-auth-2-controller" ], + "summary": "Save OAuth2 Client (saveOAuth2Client)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveOAuth2Client", "requestBody": { "content": { - "multipart/form-data": { + "application/json": { "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary", - "description": "OTA Package data." - } - }, - "required": [ - "file" - ] + "$ref": "#/components/schemas/OAuth2Client" } } - } + }, + "required": true }, "responses": { "200": { @@ -82569,7 +82913,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OtaPackageInfo" + "$ref": "#/components/schemas/OAuth2Client" } } } @@ -82703,20 +83047,60 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/oauth2/client/infos": { + "get": { "tags": [ - "ota-package-controller" + "o-auth-2-controller" ], - "summary": "Delete OTA Package (deleteOtaPackage)", - "description": "Deletes the OTA Package. Referencing non-existing OTA Package Id will cause an error. Can't delete the OTA Package if it is referenced by existing devices or device profile.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteOtaPackage", + "summary": "Get OAuth2 Client infos (findOAuth2ClientInfos)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findOAuth2ClientInfos", "parameters": [ { - "name": "otaPackageId", - "in": "path", - "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on client's title", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, "schema": { "type": "string" } @@ -82724,7 +83108,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataOAuth2ClientInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -82857,22 +83248,25 @@ ] } }, - "/api/otaPackage/{otaPackageId}/download": { + "/api/oauth2/client/list": { "get": { "tags": [ - "ota-package-controller" + "o-auth-2-controller" ], - "summary": "Download OTA Package (downloadOtaPackage)", - "description": "Download OTA Package based on the provided OTA Package Id.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "downloadOtaPackage", + "summary": "Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds)", + "description": "Fetch OAuth2 Client info objects based on the provided ids. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findTenantOAuth2ClientInfosByIds", "parameters": [ { - "name": "otaPackageId", - "in": "path", - "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "clientIds", + "in": "query", + "description": "A list of oauth2 ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -82882,8 +83276,10 @@ "content": { "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "array", + "items": { + "$ref": "#/components/schemas/OAuth2ClientInfo" + } } } } @@ -83019,75 +83415,22 @@ ] } }, - "/api/otaPackages": { + "/api/oauth2/client/{id}": { "get": { "tags": [ - "ota-package-controller" + "o-auth-2-controller" ], - "summary": "Get OTA Package Infos (getOtaPackages)", - "description": "Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getOtaPackages", + "summary": "Get OAuth2 Client by id (getOAuth2ClientById)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getOAuth2ClientById", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "id", + "in": "path", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the ota package title.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string", - "enum": [ - "createdTime", - "type", - "title", - "version", - "tag", - "url", - "fileName", - "dataSize", - "checksum" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "format": "uuid" } } ], @@ -83097,7 +83440,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataOtaPackageInfo" + "$ref": "#/components/schemas/OAuth2Client" } } } @@ -83231,112 +83574,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/otaPackages/group/{groupId}/{type}": { - "get": { + }, + "delete": { "tags": [ - "ota-package-controller" + "o-auth-2-controller" ], - "summary": "Get group OTA Package Infos (getGroupOtaPackages)", - "description": "Returns a page of OTA Package Info objects owned by tenant, and by entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getGroupOtaPackages", + "summary": "Delete oauth2 client (deleteOauth2Client)", + "description": "Deletes the oauth2 client. Referencing non-existing oauth2 client Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteOauth2Client", "parameters": [ { - "name": "groupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "type", + "name": "id", "in": "path", - "description": "OTA Package type.", "required": true, "schema": { "type": "string", - "enum": [ - "FIRMWARE", - "SOFTWARE" - ] - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the ota package title.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "type", - "title", - "version", - "tag", - "url", - "fileName", - "dataSize", - "checksum" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "format": "uuid" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataOtaPackageInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -83469,107 +83728,21 @@ ] } }, - "/api/otaPackages/{deviceProfileId}/{type}": { + "/api/oauth2/loginProcessingUrl": { "get": { "tags": [ - "ota-package-controller" - ], - "summary": "Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType)", - "description": "Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getOtaPackagesByDeviceProfileIdAndType", - "parameters": [ - { - "name": "deviceProfileId", - "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "type", - "in": "path", - "description": "OTA Package type.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "FIRMWARE", - "SOFTWARE" - ] - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the ota package title.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "type", - "title", - "version", - "tag", - "url", - "fileName", - "dataSize", - "checksum" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } + "o-auth-2-controller" ], + "summary": "Get OAuth2 log in processing URL (getLoginProcessingUrl)", + "description": "Returns the URL enclosed in double quotes. After successful authentication with OAuth2 provider, it makes a redirect to this path so that the platform can do further log in processing. This URL may be configured as 'security.oauth2.loginProcessingUrl' property in yml configuration file, or as 'SECURITY_OAUTH2_LOGIN_PROCESSING_URL' env variable. By default it is '/login/oauth2/code/'\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getLoginProcessingUrl", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataOtaPackageInfo" + "type": "string" } } } @@ -83705,59 +83878,34 @@ ] } }, - "/api/owner/CUSTOMER/{ownerId}/{entityType}/{entityId}": { + "/api/otaPackage": { "post": { "tags": [ - "owner-controller" - ], - "summary": "Change owner to customer (changeOwnerToCustomer)", - "description": "Tenant/Customer changes Owner to Customer or sub-Customer. Sub-Customer can`t perform this operation! \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "changeOwnerToCustomer", - "parameters": [ - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "ota-package-controller" ], + "summary": "Create Or Update OTA Package Info (saveOtaPackageInfo)", + "description": "Create or update the OTA Package Info. When creating OTA Package Info, platform generates OTA Package id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created OTA Package id will be present in the response. Specify existing OTA Package id to update the OTA Package Info. Referencing non-existing OTA Package Id will cause 'Not Found' error. \n\nOTA Package combination of the title with the version is unique in the scope of tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveOtaPackageInfo", "requestBody": { "content": { "application/json": { "schema": { - "type": "array", - "description": "An optional list of additional entity group ids", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/SaveOtaPackageInfoRequest" } } - } + }, + "required": true }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OtaPackageInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -83890,59 +84038,35 @@ ] } }, - "/api/owner/TENANT/{ownerId}/{entityType}/{entityId}": { - "post": { + "/api/otaPackage/info/{otaPackageId}": { + "get": { "tags": [ - "owner-controller" + "ota-package-controller" ], - "summary": "Change owner to tenant (changeOwnerToTenant)", - "description": "Tenant changes Owner from Customer or sub-Customer to Tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "changeOwnerToTenant", + "summary": "Get OTA Package Info (getOtaPackageInfoById)", + "description": "Fetch the OTA Package Info object based on the provided OTA Package Id. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getOtaPackageInfoById", "parameters": [ { - "name": "ownerId", - "in": "path", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "otaPackageId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "An optional list of additional entity group ids", - "items": { - "type": "string" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OtaPackageInfo" } } } - } - }, - "responses": { - "200": { - "description": "OK" }, "400": { "description": "Bad Request", @@ -83955,7 +84079,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -84075,21 +84199,32 @@ ] } }, - "/api/mobile/qr/deepLink": { + "/api/otaPackage/{otaPackageId}": { "get": { "tags": [ - "qr-code-settings-controller" + "ota-package-controller" + ], + "summary": "Get OTA Package (getOtaPackageById)", + "description": "Fetch the OTA Package object based on the provided OTA Package Id. The server checks that the OTA Package is owned by the same tenant. OTA Package is a heavyweight object that includes main information about the OTA Package and also data. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getOtaPackageById", + "parameters": [ + { + "name": "otaPackageId", + "in": "path", + "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Get the deep link to the associated mobile application (getMobileAppDeepLink)", - "description": "Fetch the url that takes user to linked mobile application \n\nAvailable for any authorized user. ", - "operationId": "getMobileAppDeepLink", "responses": { "200": { "description": "OK", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/OtaPackage" } } } @@ -84223,23 +84358,78 @@ "ApiKeyForm": [] } ] - } - }, - "/api/mobile/qr/merged": { - "get": { + }, + "post": { "tags": [ - "qr-code-settings-controller" + "ota-package-controller" ], - "summary": "Get QR code configuration for home page (getMergedMobileAppSettings)", - "description": "The response payload contains ui configuration of qr code\n\nAvailable for any authorized user. ", - "operationId": "getMergedMobileAppSettings", + "summary": "Save OTA Package data (saveOtaPackageData)", + "description": "Update the OTA Package. Adds the date to the existing OTA Package Info\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveOtaPackageData", + "parameters": [ + { + "name": "otaPackageId", + "in": "path", + "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "checksum", + "in": "query", + "description": "OTA Package checksum. For example, '0xd87f7e0c'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "checksumAlgorithm", + "in": "query", + "description": "OTA Package checksum algorithm.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "MD5", + "SHA256", + "SHA384", + "SHA512", + "CRC32", + "MURMUR3_32", + "MURMUR3_128" + ] + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary", + "description": "OTA Package data." + } + }, + "required": [ + "file" + ] + } + } + } + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QrCodeSettings" + "$ref": "#/components/schemas/OtaPackageInfo" } } } @@ -84255,7 +84445,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -84373,26 +84563,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/mobile/qr/settings": { - "get": { + }, + "delete": { "tags": [ - "qr-code-settings-controller" + "ota-package-controller" + ], + "summary": "Delete OTA Package (deleteOtaPackage)", + "description": "Deletes the OTA Package. Referencing non-existing OTA Package Id will cause an error. Can't delete the OTA Package if it is referenced by existing devices or device profile.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteOtaPackage", + "parameters": [ + { + "name": "otaPackageId", + "in": "path", + "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Get Mobile application settings (getQrCodeSettings)", - "description": "The response payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for any authorized user. ", - "operationId": "getQrCodeSettings", "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QrCodeSettings" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -84523,31 +84715,35 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/otaPackage/{otaPackageId}/download": { + "get": { "tags": [ - "qr-code-settings-controller" + "ota-package-controller" ], - "summary": "Create Or Update the Mobile application settings (saveQrCodeSettings)", - "description": "The request payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveQrCodeSettings", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QrCodeSettings" - } + "summary": "Download OTA Package (downloadOtaPackage)", + "description": "Download OTA Package based on the provided OTA Package Id.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "downloadOtaPackage", + "parameters": [ + { + "name": "otaPackageId", + "in": "path", + "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QrCodeSettings" + "type": "string", + "format": "binary" } } } @@ -84563,7 +84759,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -84683,21 +84879,76 @@ ] } }, - "/api/noauth/qr": { + "/api/otaPackages": { "get": { "tags": [ - "qr-code-settings-controller" + "ota-package-controller" ], - "summary": "getApplicationRedirect", - "operationId": "getApplicationRedirect", + "summary": "Get OTA Package Infos (getOtaPackages)", + "description": "Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getOtaPackages", "parameters": [ { - "name": "User-Agent", - "in": "header", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the ota package title.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "type", + "title", + "version", + "tag", + "url", + "fileName", + "dataSize", + "checksum" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -84706,7 +84957,7 @@ "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/PageDataOtaPackageInfo" } } } @@ -84831,26 +85082,109 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/qr/{secret}": { + "/api/otaPackages/group/{groupId}/{type}": { "get": { "tags": [ - "qr-code-settings-controller" + "ota-package-controller" ], - "summary": "Get User Token (getUserTokenByMobileSecret)", - "description": "Returns the token of the User based on the provided secret key.", - "operationId": "getUserTokenByMobileSecret", + "summary": "Get group OTA Package Infos (getGroupOtaPackages)", + "description": "Returns a page of OTA Package Info objects owned by tenant, and by entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getGroupOtaPackages", "parameters": [ { - "name": "secret", + "name": "groupId", "in": "path", - "description": "A string value representing short-lived secret key", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "type", + "in": "path", + "description": "OTA Package type.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the ota package title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "type", + "title", + "version", + "tag", + "url", + "fileName", + "dataSize", + "checksum" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -84859,7 +85193,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "$ref": "#/components/schemas/PageDataOtaPackageInfo" } } } @@ -84984,30 +85318,45 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/queues": { + "/api/otaPackages/{deviceProfileId}/{type}": { "get": { "tags": [ - "queue-controller" + "ota-package-controller" ], - "summary": "Get Queues (getTenantQueuesByServiceType)", - "description": "Returns a page of queues registered in the platform. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getTenantQueuesByServiceType", + "summary": "Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType)", + "description": "Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getOtaPackagesByDeviceProfileIdAndType", "parameters": [ { - "name": "serviceType", - "in": "query", - "description": "Service type (implemented only for the TB-RULE-ENGINE)", + "name": "deviceProfileId", + "in": "path", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "path", + "description": "OTA Package type.", "required": true, "schema": { "type": "string", "enum": [ - "TB-RULE-ENGINE", - "TB-CORE", - "TB-TRANSPORT", - "JS-EXECUTOR" + "FIRMWARE", + "SOFTWARE" ] } }, @@ -85034,7 +85383,7 @@ { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the queue name.", + "description": "The case insensitive 'substring' filter based on the ota package title.", "required": false, "schema": { "type": "string" @@ -85049,8 +85398,14 @@ "type": "string", "enum": [ "createdTime", - "name", - "topic" + "type", + "title", + "version", + "tag", + "url", + "fileName", + "dataSize", + "checksum" ] } }, @@ -85074,7 +85429,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataQueue" + "$ref": "#/components/schemas/PageDataOtaPackageInfo" } } } @@ -85208,28 +85563,42 @@ "ApiKeyForm": [] } ] - }, + } + }, + "/api/owner/CUSTOMER/{ownerId}/{entityType}/{entityId}": { "post": { "tags": [ - "queue-controller" + "owner-controller" ], - "summary": "Create Or Update Queue (saveQueue)", - "description": "Create or update the Queue. When creating queue, platform generates Queue Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Specify existing Queue id to update the queue. Referencing non-existing Queue Id will cause 'Not Found' error.\n\nQueue name is unique in the scope of sysadmin. Remove 'id', 'tenantId' from the request body example (below) to create new Queue entity. \n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "saveQueue", + "summary": "Change owner to customer (changeOwnerToCustomer)", + "description": "Tenant/Customer changes Owner to Customer or sub-Customer. Sub-Customer can`t perform this operation! \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "changeOwnerToCustomer", "parameters": [ { - "name": "serviceType", - "in": "query", - "description": "Service type (implemented only for the TB-RULE-ENGINE)", + "name": "ownerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "enum": [ - "TB-RULE-ENGINE", - "TB-CORE", - "TB-TRANSPORT", - "JS-EXECUTOR" - ] + "type": "string" + } + }, + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } } ], @@ -85237,22 +85606,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Queue" + "type": "array", + "description": "An optional list of additional entity group ids", + "items": { + "type": "string" + } } } - }, - "required": true + } }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Queue" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -85385,35 +85750,59 @@ ] } }, - "/api/queues/name/{queueName}": { - "get": { + "/api/owner/TENANT/{ownerId}/{entityType}/{entityId}": { + "post": { "tags": [ - "queue-controller" + "owner-controller" ], - "summary": "Get Queue (getQueueByName)", - "description": "Fetch the Queue object based on the provided Queue name. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getQueueByName", + "summary": "Change owner to tenant (changeOwnerToTenant)", + "description": "Tenant changes Owner from Customer or sub-Customer to Tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "changeOwnerToTenant", "parameters": [ { - "name": "queueName", + "name": "ownerId", "in": "path", - "description": "A string value representing the queue id. For example, 'Main'", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Queue" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "An optional list of additional entity group ids", + "items": { + "type": "string" } } } + } + }, + "responses": { + "200": { + "description": "OK" }, "400": { "description": "Bad Request", @@ -85426,7 +85815,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -85546,32 +85935,21 @@ ] } }, - "/api/queues/{queueId}": { + "/api/mobile/qr/deepLink": { "get": { "tags": [ - "queue-controller" - ], - "summary": "Get Queue (getQueueById)", - "description": "Fetch the Queue object based on the provided Queue Id. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getQueueById", - "parameters": [ - { - "name": "queueId", - "in": "path", - "description": "A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "qr-code-settings-controller" ], + "summary": "Get the deep link to the associated mobile application (getMobileAppDeepLink)", + "description": "Fetch the url that takes user to linked mobile application \n\nAvailable for any authorized user. ", + "operationId": "getMobileAppDeepLink", "responses": { "200": { "description": "OK", "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/Queue" + "type": "string" } } } @@ -85705,28 +86083,26 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/mobile/qr/merged": { + "get": { "tags": [ - "queue-controller" - ], - "summary": "Delete Queue (deleteQueue)", - "description": "Deletes the Queue. \n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "deleteQueue", - "parameters": [ - { - "name": "queueId", - "in": "path", - "description": "A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "qr-code-settings-controller" ], + "summary": "Get QR code configuration for home page (getMergedMobileAppSettings)", + "description": "The response payload contains ui configuration of qr code\n\nAvailable for any authorized user. ", + "operationId": "getMergedMobileAppSettings", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QrCodeSettings" + } + } + } }, "400": { "description": "Bad Request", @@ -85859,77 +86235,21 @@ ] } }, - "/api/queueStats": { + "/api/mobile/qr/settings": { "get": { "tags": [ - "queue-stats-controller" - ], - "summary": "Get Queue Stats entities (getTenantQueueStats)", - "description": "Returns a page of queue stats objects that are designed to collect queue statistics for every service. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getTenantQueueStats", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the queue name or service id.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } + "qr-code-settings-controller" ], + "summary": "Get Mobile application settings (getQrCodeSettings)", + "description": "The response payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for any authorized user. ", + "operationId": "getQrCodeSettings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataQueueStats" + "$ref": "#/components/schemas/QrCodeSettings" } } } @@ -86063,40 +86383,31 @@ "ApiKeyForm": [] } ] - } - }, - "/api/queueStats/list": { - "get": { + }, + "post": { "tags": [ - "queue-stats-controller" + "qr-code-settings-controller" ], - "summary": "Get QueueStats By Ids (getQueueStatsByIds)", - "description": "Fetch the Queue stats objects based on the provided ids. ", - "operationId": "getQueueStatsByIds", - "parameters": [ - { - "name": "queueStatsIds", - "in": "query", - "description": "A list of queue stats ids, separated by comma ','", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" + "summary": "Create Or Update the Mobile application settings (saveQrCodeSettings)", + "description": "The request payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveQrCodeSettings", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QrCodeSettings" } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueueStats" - } + "$ref": "#/components/schemas/QrCodeSettings" } } } @@ -86112,7 +86423,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -86232,19 +86543,17 @@ ] } }, - "/api/queueStats/{queueStatsId}": { + "/api/noauth/qr": { "get": { "tags": [ - "queue-stats-controller" + "qr-code-settings-controller" ], - "summary": "Get Queue stats entity by id (getQueueStatsById)", - "description": "Fetch the Queue stats object based on the provided Queue stats id. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getQueueStatsById", + "summary": "getApplicationRedirect", + "operationId": "getApplicationRedirect", "parameters": [ { - "name": "queueStatsId", - "in": "path", - "description": "A string value representing the queue stats id. For example, '687f294c-42b6-435a-983c-b7beff2784f9'", + "name": "User-Agent", + "in": "header", "required": true, "schema": { "type": "string" @@ -86257,7 +86566,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QueueStats" + "type": "object" } } } @@ -86382,53 +86691,35 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/v2/report": { - "post": { + "/api/noauth/qr/{secret}": { + "get": { "tags": [ - "report-controller" + "qr-code-settings-controller" ], - "summary": "createReport", - "operationId": "createReport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "info": { - "type": "string" - } - }, - "required": [ - "file", - "info" - ] - } + "summary": "Get User Token (getUserTokenByMobileSecret)", + "description": "Returns the token of the User based on the provided secret key.", + "operationId": "getUserTokenByMobileSecret", + "parameters": [ + { + "name": "secret", + "in": "path", + "description": "A string value representing short-lived secret key", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Report" + "$ref": "#/components/schemas/JwtPair" } } } @@ -86444,7 +86735,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -86553,41 +86844,97 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/v2/report/request": { - "post": { + "/api/queues": { + "get": { "tags": [ - "report-controller" + "queue-controller" ], - "summary": "requestReport", - "operationId": "requestReport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportRequest" - } + "summary": "Get Queues (getTenantQueuesByServiceType)", + "description": "Returns a page of queues registered in the platform. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getTenantQueuesByServiceType", + "parameters": [ + { + "name": "serviceType", + "in": "query", + "description": "Service type (implemented only for the TB-RULE-ENGINE)", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TB-RULE-ENGINE", + "TB-CORE", + "TB-TRANSPORT", + "JS-EXECUTOR" + ] } }, - "required": true - }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the queue name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "topic" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Job" + "$ref": "#/components/schemas/PageDataQueue" } } } @@ -86603,7 +86950,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -86721,21 +87068,36 @@ "ApiKeyForm": [] } ] - } - }, - "/api/v2/report/test": { + }, "post": { "tags": [ - "report-controller" + "queue-controller" + ], + "summary": "Create Or Update Queue (saveQueue)", + "description": "Create or update the Queue. When creating queue, platform generates Queue Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Specify existing Queue id to update the queue. Referencing non-existing Queue Id will cause 'Not Found' error.\n\nQueue name is unique in the scope of sysadmin. Remove 'id', 'tenantId' from the request body example (below) to create new Queue entity. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "saveQueue", + "parameters": [ + { + "name": "serviceType", + "in": "query", + "description": "Service type (implemented only for the TB-RULE-ENGINE)", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TB-RULE-ENGINE", + "TB-CORE", + "TB-TRANSPORT", + "JS-EXECUTOR" + ] + } + } ], - "summary": "Download test report (testReportAndDownload)", - "description": "Generate and download test report.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "testReportAndDownload", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportRequest" + "$ref": "#/components/schemas/Queue" } } }, @@ -86747,8 +87109,7 @@ "content": { "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/Queue" } } } @@ -86884,19 +87245,19 @@ ] } }, - "/api/v2/report/{reportId}": { + "/api/queues/name/{queueName}": { "get": { "tags": [ - "report-controller" + "queue-controller" ], - "summary": "Get Report (getReportById)", - "description": "Fetch the Report object based on the provided report Id. The platform uses Report to store generated reports information.Referencing non-existing Report Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getReportById", + "summary": "Get Queue (getQueueByName)", + "description": "Fetch the Queue object based on the provided Queue name. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getQueueByName", "parameters": [ { - "name": "reportId", + "name": "queueName", "in": "path", - "description": "A string value representing the report id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the queue id. For example, 'Main'", "required": true, "schema": { "type": "string" @@ -86909,7 +87270,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Report" + "$ref": "#/components/schemas/Queue" } } } @@ -87043,175 +87404,24 @@ "ApiKeyForm": [] } ] - }, - "delete": { - "tags": [ - "report-controller" - ], - "summary": "Delete Report (deleteReport)", - "description": "Deletes the report. Referencing non-existing Report Id will cause 'Not Found' error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteReport", - "parameters": [ - { - "name": "reportId", - "in": "path", - "description": "A string value representing the report id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] } }, - "/api/v2/report/{reportId}/download": { + "/api/queues/{queueId}": { "get": { "tags": [ - "report-controller" + "queue-controller" ], - "summary": "downloadReport", - "operationId": "downloadReport", + "summary": "Get Queue (getQueueById)", + "description": "Fetch the Queue object based on the provided Queue Id. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getQueueById", "parameters": [ { - "name": "reportId", + "name": "queueId", "in": "path", + "description": "A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], @@ -87221,8 +87431,7 @@ "content": { "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/Queue" } } } @@ -87356,42 +87565,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/v2/reportInfos": { - "get": { + }, + "delete": { "tags": [ - "report-controller" + "queue-controller" ], - "summary": "getReportInfosByIds", - "operationId": "getReportInfosByIds", + "summary": "Delete Queue (deleteQueue)", + "description": "Deletes the Queue. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "deleteQueue", "parameters": [ { - "name": "strReportIds", - "in": "query", - "description": "A list of report ids, separated by comma ','", + "name": "queueId", + "in": "path", + "description": "A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReportInfo" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -87524,43 +87719,15 @@ ] } }, - "/api/v2/reportInfos/all": { + "/api/queueStats": { "get": { "tags": [ - "report-controller" + "queue-stats-controller" ], - "summary": "getReportInfos", - "operationId": "getReportInfos", + "summary": "Get Queue Stats entities (getTenantQueueStats)", + "description": "Returns a page of queue stats objects that are designed to collect queue statistics for every service. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getTenantQueueStats", "parameters": [ - { - "name": "reportTemplateId", - "in": "query", - "description": "Report template id", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "userId", - "in": "query", - "description": "The user used for report generation.", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, { "name": "pageSize", "in": "query", @@ -87584,7 +87751,7 @@ { "name": "textSearch", "in": "query", - "description": "Case-insensitive 'substring' filter based on report's name or customer title", + "description": "The case insensitive 'substring' filter based on the queue name or service id.", "required": false, "schema": { "type": "string" @@ -87596,7 +87763,10 @@ "description": "Property of entity to sort by", "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "createdTime" + ] } }, { @@ -87605,7 +87775,11 @@ "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -87615,7 +87789,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataReportInfo" + "$ref": "#/components/schemas/PageDataQueueStats" } } } @@ -87751,57 +87925,187 @@ ] } }, - "/api/v2/reports": { + "/api/queueStats/list": { "get": { "tags": [ - "report-controller" + "queue-stats-controller" ], - "summary": "getReports", - "operationId": "getReports", + "summary": "Get QueueStats By Ids (getQueueStatsByIds)", + "description": "Fetch the Queue stats objects based on the provided ids. ", + "operationId": "getQueueStatsByIds", "parameters": [ { - "name": "pageSize", + "name": "queueStatsIds", "in": "query", - "description": "Maximum amount of entities in a one page", + "description": "A list of queue stats ids, separated by comma ','", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueStats" + } + } + } } }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on report's name or customer title", - "required": false, - "schema": { - "type": "string" + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/queueStats/{queueStatsId}": { + "get": { + "tags": [ + "queue-stats-controller" + ], + "summary": "Get Queue stats entity by id (getQueueStatsById)", + "description": "Fetch the Queue stats object based on the provided Queue stats id. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getQueueStatsById", + "parameters": [ + { + "name": "queueStatsId", + "in": "path", + "description": "A string value representing the queue stats id. For example, '687f294c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } @@ -87813,7 +88117,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataReport" + "$ref": "#/components/schemas/QueueStats" } } } @@ -87949,23 +88253,34 @@ ] } }, - "/api/reportTemplate": { + "/api/v2/report": { "post": { "tags": [ - "report-template-controller" + "report-controller" ], - "summary": "Save Report Template (saveReportTemplate)", - "description": "Creates or Updates report template. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. When creating report template, platform generates report template Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created report template id will be present in the response. Specify existing report template id to update the report template. Referencing non-existing report template Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Report Template entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveReportTemplate", + "summary": "createReport", + "operationId": "createReport", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportTemplate" + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + }, + "info": { + "type": "string" + } + }, + "required": [ + "file", + "info" + ] } } - }, - "required": true + } }, "responses": { "200": { @@ -87973,7 +88288,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportTemplate" + "$ref": "#/components/schemas/Report" } } } @@ -88109,32 +88424,30 @@ ] } }, - "/api/reportTemplate/info/{reportTemplateId}": { - "get": { + "/api/v2/report/request": { + "post": { "tags": [ - "report-template-controller" + "report-controller" ], - "summary": "Get Report Template Info (getReportTemplateInfoById)", - "description": "Fetch the ReportTemplateInfo object based on the provided report template Id. Report Templates allows you to create reports according to the report template configuration. Report service uses report template configuration to generate report. See the 'Model' tab of the Response Class for more details. Referencing non-existing Report Template Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getReportTemplateInfoById", - "parameters": [ - { - "name": "reportTemplateId", - "in": "path", - "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "requestReport", + "operationId": "requestReport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportTemplateInfo" + "$ref": "#/components/schemas/Job" } } } @@ -88150,7 +88463,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -88270,32 +88583,32 @@ ] } }, - "/api/reportTemplate/{reportTemplateId}": { - "get": { + "/api/v2/report/test": { + "post": { "tags": [ - "report-template-controller" + "report-controller" ], - "summary": "Get Report Template (getReportTemplateById)", - "description": "Fetch the ReportTemplate object based on the provided report template Id. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. Referencing non-existing Report Template Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getReportTemplateById", - "parameters": [ - { - "name": "reportTemplateId", - "in": "path", - "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Download test report (testReportAndDownload)", + "description": "Generate and download test report.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "testReportAndDownload", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportTemplate" + "type": "string", + "format": "binary" } } } @@ -88311,7 +88624,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -88429,19 +88742,21 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/v2/report/{reportId}": { + "get": { "tags": [ - "report-template-controller" + "report-controller" ], - "summary": "Delete Report Template (deleteReportTemplate)", - "description": "Deletes the report template. Referencing non-existing Report Template Id will cause 'Not Found' error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteReportTemplate", + "summary": "Get Report (getReportById)", + "description": "Fetch the Report object based on the provided report Id. The platform uses Report to store generated reports information.Referencing non-existing Report Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getReportById", "parameters": [ { - "name": "reportTemplateId", + "name": "reportId", "in": "path", - "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the report id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -88450,7 +88765,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Report" + } + } + } }, "400": { "description": "Bad Request", @@ -88581,112 +88903,175 @@ "ApiKeyForm": [] } ] - } - }, - "/api/reportTemplateInfos/all": { - "get": { + }, + "delete": { "tags": [ - "report-template-controller" + "report-controller" ], - "summary": "Get All Report Templates for current user (getAllReportTemplateInfos)", - "description": "Returns a page of report template info objects owned by the tenant or the customer of a current user. Report Templates allows you to create reports according to the report template configuration. Report service uses report template configuration to generate report. See the 'Model' tab of the Response Class for more details. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllReportTemplateInfos", + "summary": "Delete Report (deleteReport)", + "description": "Deletes the report. Referencing non-existing Report Id will cause 'Not Found' error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteReport", "parameters": [ { - "name": "typeList", - "in": "query", - "description": "A list of string values separated by comma ',' representing one of the ReportTemplateType enumeration value.", - "required": false, + "name": "reportId", + "in": "path", + "description": "A string value representing the report id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "REPORT", - "SUB_REPORT" - ] - } + "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK" }, - { - "name": "formatList", - "in": "query", - "description": "A list of string values separated by comma ',' representing one of the TbReportFormat enumeration value.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "PDF", - "CSV" - ] + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } } } }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the report template name or customer title.", - "required": false, - "schema": { - "type": "string" + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } - }, + } + }, + "security": [ { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "ownerName" - ] - } + "HttpLoginForm": [] }, { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "ApiKeyForm": [] + } + ] + } + }, + "/api/v2/report/{reportId}/download": { + "get": { + "tags": [ + "report-controller" + ], + "summary": "downloadReport", + "operationId": "downloadReport", + "parameters": [ + { + "name": "reportId", + "in": "path", + "required": true, "schema": { "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "format": "uuid" } } ], @@ -88696,7 +89081,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataReportTemplateInfo" + "type": "string", + "format": "binary" } } } @@ -88832,19 +89218,18 @@ ] } }, - "/api/reportTemplates": { + "/api/v2/reportInfos": { "get": { "tags": [ - "report-template-controller" + "report-controller" ], - "summary": "Get report templates by Report Template Ids (getReportTemplatesByIds)", - "description": "Returns a list of ReportTemplateInfo objects based on the provided ids. Filters the list based on the user permissions. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getReportTemplatesByIds", + "summary": "getReportInfosByIds", + "operationId": "getReportInfosByIds", "parameters": [ { - "name": "reportTemplateIds", + "name": "strReportIds", "in": "query", - "description": "A list of report template ids, separated by comma ','", + "description": "A list of report ids, separated by comma ','", "required": true, "schema": { "type": "array", @@ -88862,7 +89247,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/ReportTemplateInfo" + "$ref": "#/components/schemas/ReportInfo" } } } @@ -88999,31 +89384,98 @@ ] } }, - "/api/role": { - "post": { + "/api/v2/reportInfos/all": { + "get": { "tags": [ - "role-controller" + "report-controller" ], - "summary": "Create Or Update Role (saveRole)", - "description": "Creates or Updates the Role. When creating Role, platform generates Role Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Role id will be present in the response. Specify existing Role id to update the permission. Referencing non-existing Group Permission Id will cause 'Not Found' error.\n\nRole Contains a set of permissions. Role has two types. Generic Role may be assigned to the user group and will provide permissions for all entities of a certain type. Group Role may be assigned to both user and entity group and will provides permissions only for the entities that belong to specified entity group. The assignment of the Role to the User Group is done using [Group Permission Controller](/swagger-ui.html#/group-permission-controller).\n\nExample of Generic Role with read-only permissions for any resource and all permissions for the 'DEVICE' and 'PROFILE' resources is listed below: \n\n```json\n{\n \"name\": \"Read-Only User\",\n \"type\": \"GENERIC\",\n \"permissions\": {\n \"ALL\": [\n \"READ\",\n \"RPC_CALL\",\n \"READ_CREDENTIALS\",\n \"READ_ATTRIBUTES\",\n \"READ_TELEMETRY\"\n ],\n \"DEVICE\": [\n \"ALL\"\n ]\n \"PROFILE\": [\n \"ALL\"\n ]\n },\n \"additionalInfo\": {\n \"description\": \"Read-only permissions for everything, Write permissions for devices and own profile.\"\n }\n}\n```\n\nExample of Group Role with read-only permissions. Note that the group role has no association with the resources. The type of the resource is taken from the entity group that this role is assigned to: \n\n```json\n{\n \"name\": \"Entity Group Read-only User\",\n \"type\": \"GROUP\",\n \"permissions\": [\n \"READ\",\n \"RPC_CALL\",\n \"READ_CREDENTIALS\",\n \"READ_ATTRIBUTES\",\n \"READ_TELEMETRY\"\n ],\n \"additionalInfo\": {\n \"description\": \"Read-only permissions.\"\n }\n}\n```\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveRole", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Role" - } + "summary": "getReportInfos", + "operationId": "getReportInfos", + "parameters": [ + { + "name": "reportTemplateId", + "in": "query", + "description": "Report template id", + "required": false, + "schema": { + "type": "string", + "format": "uuid" } }, - "required": true - }, + { + "name": "userId", + "in": "query", + "description": "The user used for report generation.", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on report's name or customer title", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Role" + "$ref": "#/components/schemas/PageDataReportInfo" } } } @@ -89039,7 +89491,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -89159,20 +89611,57 @@ ] } }, - "/api/role/{roleId}": { + "/api/v2/reports": { "get": { "tags": [ - "role-controller" + "report-controller" ], - "summary": "Get Role by Id (getRoleById)", - "description": "Fetch the Role object based on the provided Role Id. Role Contains a set of permissions. Role has two types. Generic Role may be assigned to the user group and will provide permissions for all entities of a certain type. Group Role may be assigned to both user and entity group and will provides permissions only for the entities that belong to specified entity group. The assignment of the Role to the User Group is done using [Group Permission Controller](/swagger-ui.html#/group-permission-controller). Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getRoleById", + "summary": "getReports", + "operationId": "getReports", "parameters": [ { - "name": "roleId", - "in": "path", - "description": "A string value representing the role id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on report's name or customer title", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, "schema": { "type": "string" } @@ -89184,7 +89673,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Role" + "$ref": "#/components/schemas/PageDataReport" } } } @@ -89318,28 +89807,36 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/reportTemplate": { + "post": { "tags": [ - "role-controller" + "report-template-controller" ], - "summary": "Delete role (deleteRole)", - "description": "Deletes the role. Referencing non-existing role Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteRole", - "parameters": [ - { - "name": "roleId", - "in": "path", - "description": "A string value representing the role id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Save Report Template (saveReportTemplate)", + "description": "Creates or Updates report template. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. When creating report template, platform generates report template Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created report template id will be present in the response. Specify existing report template id to update the report template. Referencing non-existing report template Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Report Template entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveReportTemplate", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportTemplate" + } } - } - ], + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportTemplate" + } + } + } }, "400": { "description": "Bad Request", @@ -89352,7 +89849,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -89472,84 +89969,23 @@ ] } }, - "/api/roles": { + "/api/reportTemplate/info/{reportTemplateId}": { "get": { "tags": [ - "role-controller" + "report-template-controller" ], - "summary": "Get Roles (getRoles)", - "description": "Returns a page of roles that are available for the current user. Role Contains a set of permissions. Role has two types. Generic Role may be assigned to the user group and will provide permissions for all entities of a certain type. Group Role may be assigned to both user and entity group and will provides permissions only for the entities that belong to specified entity group. The assignment of the Role to the User Group is done using [Group Permission Controller](/swagger-ui.html#/group-permission-controller).You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getRoles", + "summary": "Get Report Template Info (getReportTemplateInfoById)", + "description": "Fetch the ReportTemplateInfo object based on the provided report template Id. Report Templates allows you to create reports according to the report template configuration. Report service uses report template configuration to generate report. See the 'Model' tab of the Response Class for more details. Referencing non-existing Report Template Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getReportTemplateInfoById", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "reportTemplateId", + "in": "path", + "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "type", - "in": "query", - "description": "Type of the role", - "required": false, - "schema": { - "type": "string", - "enum": [ - "GENERIC", - "GROUP" - ] - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the role name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "description" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -89558,7 +89994,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataRole" + "$ref": "#/components/schemas/ReportTemplateInfo" } } } @@ -89694,25 +90130,22 @@ ] } }, - "/api/roles/list": { + "/api/reportTemplate/{reportTemplateId}": { "get": { "tags": [ - "role-controller" + "report-template-controller" ], - "summary": "Get Roles By Ids (getRolesByIds)", - "description": "Returns the list of rows based on their ids. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getRolesByIds", + "summary": "Get Report Template (getReportTemplateById)", + "description": "Fetch the ReportTemplate object based on the provided report template Id. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. Referencing non-existing Report Template Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getReportTemplateById", "parameters": [ { - "name": "roleIds", - "in": "query", - "description": "A list of role ids, separated by comma ','", + "name": "reportTemplateId", + "in": "path", + "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -89722,10 +90155,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Role" - } + "$ref": "#/components/schemas/ReportTemplate" } } } @@ -89859,48 +90289,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/plugins/rpc/oneway/{deviceId}": { - "post": { + }, + "delete": { "tags": [ - "rpc-v-1-controller" + "report-template-controller" ], - "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV1)", - "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleOneWayDeviceRPCRequestV1", + "summary": "Delete Report Template (deleteReportTemplate)", + "description": "Deletes the report template. Referencing non-existing Report Template Id will cause 'Not Found' error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteReportTemplate", "parameters": [ { - "name": "deviceId", + "name": "reportTemplateId", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "A JSON value representing the RPC request." - } - } - }, - "required": true - }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -89913,7 +90323,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -90033,43 +90443,120 @@ ] } }, - "/api/plugins/rpc/twoway/{deviceId}": { - "post": { + "/api/reportTemplateInfos/all": { + "get": { "tags": [ - "rpc-v-1-controller" + "report-template-controller" ], - "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequestV1)", - "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleTwoWayDeviceRPCRequestV1", + "summary": "Get All Report Templates for current user (getAllReportTemplateInfos)", + "description": "Returns a page of report template info objects owned by the tenant or the customer of a current user. Report Templates allows you to create reports according to the report template configuration. Report service uses report template configuration to generate report. See the 'Model' tab of the Response Class for more details. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllReportTemplateInfos", "parameters": [ { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "typeList", + "in": "query", + "description": "A list of string values separated by comma ',' representing one of the ReportTemplateType enumeration value.", + "required": false, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string", + "enum": [ + "REPORT", + "SUB_REPORT" + ] + } } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { + }, + { + "name": "formatList", + "in": "query", + "description": "A list of string values separated by comma ',' representing one of the TbReportFormat enumeration value.", + "required": false, + "schema": { + "type": "array", + "items": { "type": "string", - "description": "A JSON value representing the RPC request." + "enum": [ + "PDF", + "CSV" + ] } } }, - "required": true - }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the report template name or customer title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "ownerName" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/PageDataReportTemplateInfo" } } } @@ -90085,7 +90572,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -90205,83 +90692,86 @@ ] } }, - "/api/rpc/oneway/{deviceId}": { - "post": { + "/api/reportTemplates": { + "get": { "tags": [ - "rpc-v-2-controller" + "report-template-controller" ], - "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV2)", - "description": "Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleOneWayDeviceRPCRequestV2", + "summary": "Get report templates by Report Template Ids (getReportTemplatesByIds)", + "description": "Returns a list of ReportTemplateInfo objects based on the provided ids. Filters the list based on the user permissions. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getReportTemplatesByIds", "parameters": [ { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "reportTemplateIds", + "in": "query", + "description": "A list of report template ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "A JSON value representing the RPC request." - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Persistent RPC request was saved to the database or lightweight RPC request was sent to the device.", + "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/ReportTemplateInfo" + } } } } }, "400": { - "description": "Invalid structure of the request.", + "description": "Bad Request", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } } } } }, "401": { - "description": "User is not authorized to send the RPC request. Most likely, User belongs to different Customer or Tenant.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "413": { - "description": "Request payload is too large", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "504": { - "description": "Timeout to process the RPC call. Most likely, device is offline.", + "description": "Unauthorized", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } } } } @@ -90369,107 +90859,31 @@ ] } }, - "/api/rpc/persistent/device/{deviceId}": { - "get": { + "/api/role": { + "post": { "tags": [ - "rpc-v-2-controller" + "role-controller" ], - "summary": "Get persistent RPC requests", - "description": "Allows to query RPC calls for specific device using pagination.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getPersistedRpcByDevice", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "rpcStatus", - "in": "query", - "description": "Status of the RPC", - "required": false, - "schema": { - "type": "string", - "enum": [ - "QUEUED", - "SENT", - "DELIVERED", - "SUCCESSFUL", - "TIMEOUT", - "EXPIRED", - "FAILED" - ] - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Not implemented. Leave empty.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "expirationTime", - "request", - "response" - ] + "summary": "Create Or Update Role (saveRole)", + "description": "Creates or Updates the Role. When creating Role, platform generates Role Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Role id will be present in the response. Specify existing Role id to update the permission. Referencing non-existing Group Permission Id will cause 'Not Found' error.\n\nRole Contains a set of permissions. Role has two types. Generic Role may be assigned to the user group and will provide permissions for all entities of a certain type. Group Role may be assigned to both user and entity group and will provides permissions only for the entities that belong to specified entity group. The assignment of the Role to the User Group is done using [Group Permission Controller](/swagger-ui.html#/group-permission-controller).\n\nExample of Generic Role with read-only permissions for any resource and all permissions for the 'DEVICE' and 'PROFILE' resources is listed below: \n\n```json\n{\n \"name\": \"Read-Only User\",\n \"type\": \"GENERIC\",\n \"permissions\": {\n \"ALL\": [\n \"READ\",\n \"RPC_CALL\",\n \"READ_CREDENTIALS\",\n \"READ_ATTRIBUTES\",\n \"READ_TELEMETRY\"\n ],\n \"DEVICE\": [\n \"ALL\"\n ]\n \"PROFILE\": [\n \"ALL\"\n ]\n },\n \"additionalInfo\": {\n \"description\": \"Read-only permissions for everything, Write permissions for devices and own profile.\"\n }\n}\n```\n\nExample of Group Role with read-only permissions. Note that the group role has no association with the resources. The type of the resource is taken from the entity group that this role is assigned to: \n\n```json\n{\n \"name\": \"Entity Group Read-only User\",\n \"type\": \"GROUP\",\n \"permissions\": [\n \"READ\",\n \"RPC_CALL\",\n \"READ_CREDENTIALS\",\n \"READ_ATTRIBUTES\",\n \"READ_TELEMETRY\"\n ],\n \"additionalInfo\": {\n \"description\": \"Read-only permissions.\"\n }\n}\n```\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveRole", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Role" } } } @@ -90485,7 +90899,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -90605,19 +91019,19 @@ ] } }, - "/api/rpc/persistent/{rpcId}": { + "/api/role/{roleId}": { "get": { "tags": [ - "rpc-v-2-controller" + "role-controller" ], - "summary": "Get persistent RPC request", - "description": "Get information about the status of the RPC call.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getPersistedRpc", + "summary": "Get Role by Id (getRoleById)", + "description": "Fetch the Role object based on the provided Role Id. Role Contains a set of permissions. Role has two types. Generic Role may be assigned to the user group and will provide permissions for all entities of a certain type. Group Role may be assigned to both user and entity group and will provides permissions only for the entities that belong to specified entity group. The assignment of the Role to the User Group is done using [Group Permission Controller](/swagger-ui.html#/group-permission-controller). Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getRoleById", "parameters": [ { - "name": "rpcId", + "name": "roleId", "in": "path", - "description": "A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the role id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -90630,7 +91044,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Rpc" + "$ref": "#/components/schemas/Role" } } } @@ -90767,16 +91181,16 @@ }, "delete": { "tags": [ - "rpc-v-2-controller" + "role-controller" ], - "summary": "Delete persistent RPC", - "description": "Deletes the persistent RPC request.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteRpc", + "summary": "Delete role (deleteRole)", + "description": "Deletes the role. Referencing non-existing role Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteRole", "parameters": [ { - "name": "rpcId", + "name": "roleId", "in": "path", - "description": "A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the role id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -90918,83 +91332,141 @@ ] } }, - "/api/rpc/twoway/{deviceId}": { - "post": { + "/api/roles": { + "get": { "tags": [ - "rpc-v-2-controller" + "role-controller" ], - "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequestV2)", - "description": "Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is the response from device, or 504 Gateway Timeout if device is offline.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleTwoWayDeviceRPCRequestV2", + "summary": "Get Roles (getRoles)", + "description": "Returns a page of roles that are available for the current user. Role Contains a set of permissions. Role has two types. Generic Role may be assigned to the user group and will provide permissions for all entities of a certain type. Group Role may be assigned to both user and entity group and will provides permissions only for the entities that belong to specified entity group. The assignment of the Role to the User Group is done using [Group Permission Controller](/swagger-ui.html#/group-permission-controller).You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getRoles", "parameters": [ { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "type", + "in": "query", + "description": "Type of the role", + "required": false, + "schema": { + "type": "string", + "enum": [ + "GENERIC", + "GROUP" + ] + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the role name.", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "A JSON value representing the RPC request." - } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "description" + ] } }, - "required": true - }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { - "description": "Persistent RPC request was saved to the database or lightweight RPC response received.", + "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/PageDataRole" } } } }, "400": { - "description": "Invalid structure of the request.", + "description": "Bad Request", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } } } } }, "401": { - "description": "User is not authorized to send the RPC request. Most likely, User belongs to different Customer or Tenant.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "413": { - "description": "Request payload is too large", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "504": { - "description": "Timeout to process the RPC call. Most likely, device is offline.", + "description": "Unauthorized", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } } } } @@ -91082,29 +91554,25 @@ ] } }, - "/api/edge/{edgeId}/ruleChain/{ruleChainId}": { - "post": { + "/api/roles/list": { + "get": { "tags": [ - "rule-chain-controller" + "role-controller" ], - "summary": "Assign rule chain to edge (assignRuleChainToEdge)", - "description": "Creates assignment of an existing rule chain to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment rule chain (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once rule chain will be delivered to edge service, it's going to start processing messages locally. \n\nOnly rule chain with type 'EDGE' can be assigned to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignRuleChainToEdge", + "summary": "Get Roles By Ids (getRolesByIds)", + "description": "Returns the list of rows based on their ids. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getRolesByIds", "parameters": [ { - "name": "edgeId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ruleChainId", - "in": "path", + "name": "roleIds", + "in": "query", + "description": "A list of role ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -91114,7 +91582,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } } } } @@ -91130,7 +91601,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -91248,39 +91719,45 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/plugins/rpc/oneway/{deviceId}": { + "post": { "tags": [ - "rule-chain-controller" + "rpc-v-1-controller" ], - "summary": "Unassign rule chain from edge (unassignRuleChainFromEdge)", - "description": "Clears assignment of the rule chain to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove rule chain (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove rule chain locally.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "unassignRuleChainFromEdge", + "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV1)", + "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "handleOneWayDeviceRPCRequestV1", "parameters": [ { - "name": "edgeId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ruleChainId", + "name": "deviceId", "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "A JSON value representing the RPC request." + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "type": "string" } } } @@ -91296,7 +91773,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -91416,88 +91893,43 @@ ] } }, - "/api/edge/{edgeId}/ruleChains": { - "get": { + "/api/plugins/rpc/twoway/{deviceId}": { + "post": { "tags": [ - "rule-chain-controller" + "rpc-v-1-controller" ], - "summary": "Get Edge Rule Chains (getEdgeRuleChains)", - "description": "Returns a page of Rule Chains assigned to the specified edge. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEdgeRuleChains", + "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequestV1)", + "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "handleTwoWayDeviceRPCRequestV1", "parameters": [ { - "name": "edgeId", + "name": "deviceId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the rule chain name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "root" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "A JSON value representing the RPC request." + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataRuleChain" + "type": "string" } } } @@ -91513,7 +91945,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -91633,19 +92065,31 @@ ] } }, - "/api/ruleChain": { + "/api/rpc/oneway/{deviceId}": { "post": { "tags": [ - "rule-chain-controller" + "rpc-v-2-controller" + ], + "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV2)", + "description": "Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "handleOneWayDeviceRPCRequestV2", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Create Or Update Rule Chain (saveRuleChain)", - "description": "Create or update the Rule Chain. When creating Rule Chain, platform generates Rule Chain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Rule Chain Id will be present in the response. Specify existing Rule Chain id to update the rule chain. Referencing non-existing rule chain Id will cause 'Not Found' error.\n\nThe rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.Remove 'id', 'tenantId' from the request body example (below) to create new Rule Chain entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveRuleChain", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "type": "string", + "description": "A JSON value representing the RPC request." } } }, @@ -91653,59 +92097,51 @@ }, "responses": { "200": { - "description": "OK", + "description": "Persistent RPC request was saved to the database or lightweight RPC request was sent to the device.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "type": "string" } } } }, "400": { - "description": "Bad Request", + "description": "Invalid structure of the request.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid request body", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } + "type": "string" } } } }, "401": { - "description": "Unauthorized", + "description": "User is not authorized to send the RPC request. Most likely, User belongs to different Customer or Tenant.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } + "type": "string" + } + } + } + }, + "413": { + "description": "Request payload is too large", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "504": { + "description": "Timeout to process the RPC call. Most likely, device is offline.", + "content": { + "application/json": { + "schema": { + "type": "string" } } } @@ -91793,24 +92229,107 @@ ] } }, - "/api/ruleChain/autoAssignToEdgeRuleChains": { + "/api/rpc/persistent/device/{deviceId}": { "get": { "tags": [ - "rule-chain-controller" + "rpc-v-2-controller" + ], + "summary": "Get persistent RPC requests", + "description": "Allows to query RPC calls for specific device using pagination.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getPersistedRpcByDevice", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "rpcStatus", + "in": "query", + "description": "Status of the RPC", + "required": false, + "schema": { + "type": "string", + "enum": [ + "QUEUED", + "SENT", + "DELIVERED", + "SUCCESSFUL", + "TIMEOUT", + "EXPIRED", + "FAILED" + ] + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Not implemented. Leave empty.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "expirationTime", + "request", + "response" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } ], - "summary": "Get Auto Assign To Edge Rule Chains (getAutoAssignToEdgeRuleChains)", - "description": "Returns a list of Rule Chains that will be assigned to a newly created edge. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAutoAssignToEdgeRuleChains", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RuleChain" - } + "type": "string" } } } @@ -91946,31 +92465,32 @@ ] } }, - "/api/ruleChain/device/default": { - "post": { + "/api/rpc/persistent/{rpcId}": { + "get": { "tags": [ - "rule-chain-controller" + "rpc-v-2-controller" ], - "summary": "Create Default Rule Chain (setDeviceDefaultRuleChain)", - "description": "Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setDeviceDefaultRuleChain", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DefaultRuleChainCreateRequest" - } + "summary": "Get persistent RPC request", + "description": "Get information about the status of the RPC call.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getPersistedRpc", + "parameters": [ + { + "name": "rpcId", + "in": "path", + "description": "A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "$ref": "#/components/schemas/Rpc" } } } @@ -91986,7 +92506,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -92104,48 +92624,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/ruleChain/metadata": { - "post": { + }, + "delete": { "tags": [ - "rule-chain-controller" + "rpc-v-2-controller" ], - "summary": "Update Rule Chain Metadata", - "description": "Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveRuleChainMetaData", + "summary": "Delete persistent RPC", + "description": "Deletes the persistent RPC request.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteRpc", "parameters": [ { - "name": "updateRelated", - "in": "query", - "description": "Update related rule nodes.", - "required": false, + "name": "rpcId", + "in": "path", + "description": "A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "boolean", - "default": true + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleChainMetaData" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleChainMetaData" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -92158,7 +92658,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -92278,69 +92778,83 @@ ] } }, - "/api/ruleChain/tbelEnabled": { - "get": { + "/api/rpc/twoway/{deviceId}": { + "post": { "tags": [ - "rule-chain-controller" + "rpc-v-2-controller" ], - "summary": "Is TBEL script executor enabled", - "description": "Returns 'True' if the TBEL script execution is enabled\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "isTbelEnabled", + "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequestV2)", + "description": "Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is the response from device, or 504 Gateway Timeout if device is offline.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "handleTwoWayDeviceRPCRequestV2", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "A JSON value representing the RPC request." + } + } + }, + "required": true + }, "responses": { "200": { - "description": "OK", + "description": "Persistent RPC request was saved to the database or lightweight RPC response received.", "content": { "application/json": { "schema": { - "type": "boolean" + "type": "string" } } } }, "400": { - "description": "Bad Request", + "description": "Invalid structure of the request.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } + "type": "string" } } } }, "401": { - "description": "Unauthorized", + "description": "User is not authorized to send the RPC request. Most likely, User belongs to different Customer or Tenant.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } + "type": "string" + } + } + } + }, + "413": { + "description": "Request payload is too large", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "504": { + "description": "Timeout to process the RPC call. Most likely, device is offline.", + "content": { + "application/json": { + "schema": { + "type": "string" } } } @@ -92428,43 +92942,39 @@ ] } }, - "/api/ruleChain/testScript": { + "/api/edge/{edgeId}/ruleChain/{ruleChainId}": { "post": { "tags": [ "rule-chain-controller" ], - "summary": "Test Script function", - "description": "Execute the Script function and return the result. The format of request: \n\n```json\n{\n \"script\": \"Your Function as String\",\n \"scriptType\": \"One of: update, generate, filter, switch, json, string\",\n \"argNames\": [\"msg\", \"metadata\", \"type\"],\n \"msg\": \"{\\\"temperature\\\": 42}\", \n \"metadata\": {\n \"deviceName\": \"Device A\",\n \"deviceType\": \"Thermometer\"\n },\n \"msgType\": \"POST_TELEMETRY_REQUEST\"\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "testRuleChainScript", + "summary": "Assign rule chain to edge (assignRuleChainToEdge)", + "description": "Creates assignment of an existing rule chain to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment rule chain (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once rule chain will be delivered to edge service, it's going to start processing messages locally. \n\nOnly rule chain with type 'EDGE' can be assigned to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignRuleChainToEdge", "parameters": [ { - "name": "scriptLang", - "in": "query", - "description": "Script language: JS or TBEL", - "required": false, + "name": "edgeId", + "in": "path", + "required": true, "schema": { - "$ref": "#/components/schemas/ScriptLanguage" + "type": "string" + } + }, + { + "name": "ruleChainId", + "in": "path", + "required": true, + "schema": { + "type": "string" } } ], - "requestBody": { - "description": "Test JS request. See API call description above.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/RuleChain" } } } @@ -92598,21 +93108,26 @@ "ApiKeyForm": [] } ] - } - }, - "/api/ruleChain/{ruleChainId}": { - "get": { + }, + "delete": { "tags": [ "rule-chain-controller" ], - "summary": "Get Rule Chain (getRuleChainById)", - "description": "Fetch the Rule Chain object based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getRuleChainById", + "summary": "Unassign rule chain from edge (unassignRuleChainFromEdge)", + "description": "Clears assignment of the rule chain to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove rule chain (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove rule chain locally.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unassignRuleChainFromEdge", "parameters": [ + { + "name": "edgeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "ruleChainId", "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -92759,28 +93274,93 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/edge/{edgeId}/ruleChains": { + "get": { "tags": [ "rule-chain-controller" ], - "summary": "Delete rule chain (deleteRuleChain)", - "description": "Deletes the rule chain. Referencing non-existing rule chain Id will cause an error. Referencing rule chain that is used in the device profiles will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteRuleChain", + "summary": "Get Edge Rule Chains (getEdgeRuleChains)", + "description": "Returns a page of Rule Chains assigned to the specified edge. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEdgeRuleChains", "parameters": [ { - "name": "ruleChainId", + "name": "edgeId", "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the rule chain name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "root" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataRuleChain" + } + } + } }, "400": { "description": "Bad Request", @@ -92913,25 +93493,24 @@ ] } }, - "/api/ruleChain/{ruleChainId}/autoAssignToEdge": { + "/api/ruleChain": { "post": { "tags": [ "rule-chain-controller" ], - "summary": "Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain)", - "description": "Makes the rule chain to be automatically assigned for any new edge that will be created. Does not assign this rule chain for already created edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setAutoAssignToEdgeRuleChain", - "parameters": [ - { - "name": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Create Or Update Rule Chain (saveRuleChain)", + "description": "Create or update the Rule Chain. When creating Rule Chain, platform generates Rule Chain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Rule Chain Id will be present in the response. Specify existing Rule Chain id to update the rule chain. Referencing non-existing rule chain Id will cause 'Not Found' error.\n\nThe rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.Remove 'id', 'tenantId' from the request body example (below) to create new Rule Chain entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveRuleChain", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChain" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -93072,25 +93651,179 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/ruleChain/autoAssignToEdgeRuleChains": { + "get": { "tags": [ "rule-chain-controller" ], - "summary": "Unset Auto Assign To Edge Rule Chain (unsetAutoAssignToEdgeRuleChain)", - "description": "Removes the rule chain from the list of rule chains that are going to be automatically assigned for any new edge that will be created. Does not unassign this rule chain for already assigned edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "unsetAutoAssignToEdgeRuleChain", - "parameters": [ - { - "name": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Get Auto Assign To Edge Rule Chains (getAutoAssignToEdgeRuleChains)", + "description": "Returns a list of Rule Chains that will be assigned to a newly created edge. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAutoAssignToEdgeRuleChains", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RuleChain" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] } + ] + } + }, + "/api/ruleChain/device/default": { + "post": { + "tags": [ + "rule-chain-controller" ], + "summary": "Create Default Rule Chain (setDeviceDefaultRuleChain)", + "description": "Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setDeviceDefaultRuleChain", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultRuleChainCreateRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -93113,7 +93846,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -93233,32 +93966,43 @@ ] } }, - "/api/ruleChain/{ruleChainId}/edgeTemplateRoot": { + "/api/ruleChain/metadata": { "post": { "tags": [ "rule-chain-controller" ], - "summary": "Set Edge Template Root Rule Chain (setEdgeTemplateRootRuleChain)", - "description": "Makes the rule chain to be root rule chain for any new edge that will be created. Does not update root rule chain for already created edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setEdgeTemplateRootRuleChain", + "summary": "Update Rule Chain Metadata", + "description": "Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveRuleChainMetaData", "parameters": [ { - "name": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "updateRelated", + "in": "query", + "description": "Update related rule nodes.", + "required": false, "schema": { - "type": "string" + "type": "boolean", + "default": true } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChainMetaData" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "$ref": "#/components/schemas/RuleChainMetaData" } } } @@ -93394,32 +94138,21 @@ ] } }, - "/api/ruleChain/{ruleChainId}/metadata": { + "/api/ruleChain/tbelEnabled": { "get": { "tags": [ "rule-chain-controller" ], - "summary": "Get Rule Chain (getRuleChainById)", - "description": "Fetch the Rule Chain Metadata object based on the provided Rule Chain Id. The metadata object contains information about the rule nodes and their connections.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getRuleChainMetaData", - "parameters": [ - { - "name": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Is TBEL script executor enabled", + "description": "Returns 'True' if the TBEL script execution is enabled\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "isTbelEnabled", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChainMetaData" + "type": "boolean" } } } @@ -93555,36 +94288,43 @@ ] } }, - "/api/ruleChain/{ruleChainId}/output/labels": { - "get": { + "/api/ruleChain/testScript": { + "post": { "tags": [ "rule-chain-controller" ], - "summary": "Get Rule Chain output labels (getRuleChainOutputLabels)", - "description": "Fetch the unique labels for the \"output\" Rule Nodes that belong to the Rule Chain based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getRuleChainOutputLabels", + "summary": "Test Script function", + "description": "Execute the Script function and return the result. The format of request: \n\n```json\n{\n \"script\": \"Your Function as String\",\n \"scriptType\": \"One of: update, generate, filter, switch, json, string\",\n \"argNames\": [\"msg\", \"metadata\", \"type\"],\n \"msg\": \"{\\\"temperature\\\": 42}\", \n \"metadata\": {\n \"deviceName\": \"Device A\",\n \"deviceType\": \"Thermometer\"\n },\n \"msgType\": \"POST_TELEMETRY_REQUEST\"\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "testRuleChainScript", "parameters": [ { - "name": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "scriptLang", + "in": "query", + "description": "Script language: JS or TBEL", + "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/ScriptLanguage" } } ], + "requestBody": { + "description": "Test JS request. See API call description above.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true + "$ref": "#/components/schemas/JsonNode" } } } @@ -93600,7 +94340,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -93720,14 +94460,14 @@ ] } }, - "/api/ruleChain/{ruleChainId}/output/labels/usage": { + "/api/ruleChain/{ruleChainId}": { "get": { "tags": [ "rule-chain-controller" ], - "summary": "Get output labels usage (getRuleChainOutputLabelsUsage)", - "description": "Fetch the list of rule chains and the relation types (labels) they use to process output of the current rule chain based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getRuleChainOutputLabelsUsage", + "summary": "Get Rule Chain (getRuleChainById)", + "description": "Fetch the Rule Chain object based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChainById", "parameters": [ { "name": "ruleChainId", @@ -93745,10 +94485,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RuleChainOutputLabelsUsage" - } + "$ref": "#/components/schemas/RuleChain" } } } @@ -93882,16 +94619,14 @@ "ApiKeyForm": [] } ] - } - }, - "/api/ruleChain/{ruleChainId}/root": { - "post": { + }, + "delete": { "tags": [ "rule-chain-controller" ], - "summary": "Set Root Rule Chain (setRootRuleChain)", - "description": "Makes the rule chain to be root rule chain. Updates previous root rule chain as well. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setRootRuleChain", + "summary": "Delete rule chain (deleteRuleChain)", + "description": "Deletes the rule chain. Referencing non-existing rule chain Id will cause an error. Referencing rule chain that is used in the device profiles will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteRuleChain", "parameters": [ { "name": "ruleChainId", @@ -93905,14 +94640,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleChain" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -93925,7 +94653,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -94045,82 +94773,181 @@ ] } }, - "/api/ruleChains": { - "get": { + "/api/ruleChain/{ruleChainId}/autoAssignToEdge": { + "post": { "tags": [ "rule-chain-controller" ], - "summary": "Get Rule Chains (getRuleChains)", - "description": "Returns a page of Rule Chains owned by tenant. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getRuleChains", + "summary": "Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain)", + "description": "Makes the rule chain to be automatically assigned for any new edge that will be created. Does not assign this rule chain for already created edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setAutoAssignToEdgeRuleChain", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChain" + } + } } }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "type", - "in": "query", - "description": "Rule chain type (CORE or EDGE)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "CORE", - "EDGE" - ] + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the rule chain name.", - "required": false, - "schema": { - "type": "string" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "root" - ] + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } + } + }, + "security": [ + { + "HttpLoginForm": [] }, { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "ApiKeyForm": [] + } + ] + }, + "delete": { + "tags": [ + "rule-chain-controller" + ], + "summary": "Unset Auto Assign To Edge Rule Chain (unsetAutoAssignToEdgeRuleChain)", + "description": "Removes the rule chain from the list of rule chains that are going to be automatically assigned for any new edge that will be created. Does not unassign this rule chain for already assigned edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unsetAutoAssignToEdgeRuleChain", + "parameters": [ + { + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -94130,7 +94957,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataRuleChain" + "$ref": "#/components/schemas/RuleChain" } } } @@ -94266,23 +95093,22 @@ ] } }, - "/api/ruleChains/export": { - "get": { + "/api/ruleChain/{ruleChainId}/edgeTemplateRoot": { + "post": { "tags": [ "rule-chain-controller" ], - "summary": "Export Rule Chains", - "description": "Exports all tenant rule chains as one JSON.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "exportRuleChains", + "summary": "Set Edge Template Root Rule Chain (setEdgeTemplateRootRuleChain)", + "description": "Makes the rule chain to be root rule chain for any new edge that will be created. Does not update root rule chain for already created edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setEdgeTemplateRootRuleChain", "parameters": [ { - "name": "limit", - "in": "query", - "description": "A limit of rule chains to export.", + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } } ], @@ -94292,7 +95118,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChainData" + "$ref": "#/components/schemas/RuleChain" } } } @@ -94308,7 +95134,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -94428,46 +95254,32 @@ ] } }, - "/api/ruleChains/import": { - "post": { + "/api/ruleChain/{ruleChainId}/metadata": { + "get": { "tags": [ "rule-chain-controller" ], - "summary": "Import Rule Chains", - "description": "Imports all tenant rule chains as one JSON.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "importRuleChains", + "summary": "Get Rule Chain (getRuleChainById)", + "description": "Fetch the Rule Chain Metadata object based on the provided Rule Chain Id. The metadata object contains information about the rule nodes and their connections.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChainMetaData", "parameters": [ { - "name": "overwrite", - "in": "query", - "description": "Enables overwrite for existing rule chains with the same name.", - "required": false, + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "boolean", - "default": false + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleChainData" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RuleChainImportResult" - } + "$ref": "#/components/schemas/RuleChainMetaData" } } } @@ -94483,7 +95295,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -94603,25 +95415,22 @@ ] } }, - "/api/ruleChains/list": { + "/api/ruleChain/{ruleChainId}/output/labels": { "get": { "tags": [ "rule-chain-controller" ], - "summary": "Get Rule Chains By Ids (getRuleChainsByIds)", - "description": "Requested rule chains must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getRuleChainsByIds", + "summary": "Get Rule Chain output labels (getRuleChainOutputLabels)", + "description": "Fetch the unique labels for the \"output\" Rule Nodes that belong to the Rule Chain based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChainOutputLabels", "parameters": [ { - "name": "ruleChainIds", - "in": "query", - "description": "A list of rule chain ids, separated by comma ','", + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -94633,8 +95442,9 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/RuleChain" - } + "type": "string" + }, + "uniqueItems": true } } } @@ -94770,19 +95580,19 @@ ] } }, - "/api/ruleNode/{ruleNodeId}/debugIn": { + "/api/ruleChain/{ruleChainId}/output/labels/usage": { "get": { "tags": [ "rule-chain-controller" ], - "summary": "Get latest input message (getLatestRuleNodeDebugInput)", - "description": "Gets the input message from the debug events for specified Rule Chain Id. Referencing non-existing rule chain Id will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getLatestRuleNodeDebugInput", + "summary": "Get output labels usage (getRuleChainOutputLabelsUsage)", + "description": "Fetch the list of rule chains and the relation types (labels) they use to process output of the current rule chain based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChainOutputLabelsUsage", "parameters": [ { - "name": "ruleNodeId", + "name": "ruleChainId", "in": "path", - "description": "A string value representing the rule node id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -94795,7 +95605,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "type": "array", + "items": { + "$ref": "#/components/schemas/RuleChainOutputLabelsUsage" + } } } } @@ -94931,32 +95744,32 @@ ] } }, - "/api/rule-engine/": { + "/api/ruleChain/{ruleChainId}/root": { "post": { "tags": [ - "rule-engine-controller" + "rule-chain-controller" ], - "summary": "Push user message to the rule engine (handleRuleEngineRequestForUser)", - "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequestForUser", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "A JSON value representing the message." - } + "summary": "Set Root Rule Chain (setRootRuleChain)", + "description": "Makes the rule chain to be root rule chain. Updates previous root rule chain as well. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setRootRuleChain", + "parameters": [ + { + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/RuleChain" } } } @@ -95092,52 +95905,92 @@ ] } }, - "/api/rule-engine/{entityType}/{entityId}": { - "post": { + "/api/ruleChains": { + "get": { "tags": [ - "rule-engine-controller" + "rule-chain-controller" ], - "summary": "Push entity message to the rule engine (handleRuleEngineRequestForEntity)", - "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequestForEntity", + "summary": "Get Rule Chains (getRuleChains)", + "description": "Returns a page of Rule Chains owned by tenant. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChains", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "entityId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "Rule chain type (CORE or EDGE)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "CORE", + "EDGE" + ] + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the rule chain name.", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "A JSON value representing the message." - } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "root" + ] } }, - "required": true - }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/PageDataRuleChain" } } } @@ -95153,7 +96006,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -95273,46 +96126,19 @@ ] } }, - "/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}": { - "post": { + "/api/ruleChains/export": { + "get": { "tags": [ - "rule-engine-controller" + "rule-chain-controller" ], - "summary": "Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout)", - "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequestForEntityWithQueueAndTimeout", + "summary": "Export Rule Chains", + "description": "Exports all tenant rule chains as one JSON.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "exportRuleChains", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "queueName", - "in": "path", - "description": "Queue name to process the request in the rule engine", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "timeout", - "in": "path", - "description": "Timeout to process the request in milliseconds", + "name": "limit", + "in": "query", + "description": "A limit of rule chains to export.", "required": true, "schema": { "type": "integer", @@ -95320,24 +96146,13 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "A JSON value representing the message." - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/RuleChainData" } } } @@ -95353,7 +96168,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -95473,41 +96288,23 @@ ] } }, - "/api/rule-engine/{entityType}/{entityId}/{timeout}": { + "/api/ruleChains/import": { "post": { "tags": [ - "rule-engine-controller" + "rule-chain-controller" ], - "summary": "Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout)", - "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequestForEntityWithTimeout", + "summary": "Import Rule Chains", + "description": "Imports all tenant rule chains as one JSON.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "importRuleChains", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "timeout", - "in": "path", - "description": "Timeout to process the request in milliseconds", - "required": true, + "name": "overwrite", + "in": "query", + "description": "Enables overwrite for existing rule chains with the same name.", + "required": false, "schema": { - "type": "integer", - "format": "int32" + "type": "boolean", + "default": false } } ], @@ -95515,8 +96312,7 @@ "content": { "application/json": { "schema": { - "type": "string", - "description": "A JSON value representing the message." + "$ref": "#/components/schemas/RuleChainData" } } }, @@ -95528,7 +96324,10 @@ "content": { "application/json": { "schema": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/RuleChainImportResult" + } } } } @@ -95664,22 +96463,25 @@ ] } }, - "/api/edge/{edgeId}/allSchedulerEvents": { + "/api/ruleChains/list": { "get": { "tags": [ - "scheduler-event-controller" + "rule-chain-controller" ], - "summary": "Get All Edge Scheduler Events (getAllEdgeSchedulerEvents)", - "description": "Fetch the list of Scheduler Event Info objects based on the provided Edge entity. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllEdgeSchedulerEvents", + "summary": "Get Rule Chains By Ids (getRuleChainsByIds)", + "description": "Requested rule chains must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getRuleChainsByIds", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "ruleChainIds", + "in": "query", + "description": "A list of rule chain ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -95691,7 +96493,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/SchedulerEventInfo" + "$ref": "#/components/schemas/RuleChain" } } } @@ -95828,41 +96630,193 @@ ] } }, - "/api/edge/{edgeId}/schedulerEvent/{schedulerEventId}": { - "post": { + "/api/ruleNode/{ruleNodeId}/debugIn": { + "get": { "tags": [ - "scheduler-event-controller" + "rule-chain-controller" ], - "summary": "Assign scheduler event to edge (assignSchedulerEventToEdge)", - "description": "Creates assignment of an existing scheduler event to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment scheduler event (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once scheduler event will be delivered to edge service, it is going to be available for usage on remote edge instance. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "assignSchedulerEventToEdge", + "summary": "Get latest input message (getLatestRuleNodeDebugInput)", + "description": "Gets the input message from the debug events for specified Rule Chain Id. Referencing non-existing rule chain Id will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getLatestRuleNodeDebugInput", "parameters": [ { - "name": "edgeId", + "name": "ruleNodeId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the rule node id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + } }, - { - "name": "schedulerEventId", - "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/rule-engine/": { + "post": { + "tags": [ + "rule-engine-controller" ], + "summary": "Push user message to the rule engine (handleRuleEngineRequestForUser)", + "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "handleRuleEngineRequestForUser", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "A JSON value representing the message." + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEventInfo" + "type": "string" } } } @@ -95996,41 +96950,54 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/rule-engine/{entityType}/{entityId}": { + "post": { "tags": [ - "scheduler-event-controller" + "rule-engine-controller" ], - "summary": "Unassign scheduler event from edge (unassignSchedulerEventFromEdge)", - "description": "Clears assignment of the scheduler event to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity group and entities inside this group locally.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "unassignSchedulerEventFromEdge", + "summary": "Push entity message to the rule engine (handleRuleEngineRequestForEntity)", + "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "handleRuleEngineRequestForEntity", "parameters": [ { - "name": "edgeId", + "name": "entityType", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } }, { - "name": "schedulerEventId", + "name": "entityId", "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "A JSON value representing the message." + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEventInfo" + "type": "string" } } } @@ -96046,7 +97013,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -96166,83 +97133,71 @@ ] } }, - "/api/edge/{edgeId}/schedulerEvents": { - "get": { + "/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}": { + "post": { "tags": [ - "scheduler-event-controller" + "rule-engine-controller" ], - "summary": "Get Edge Scheduler Events (getEdgeSchedulerEvents)", - "description": "Returns a page of Scheduler Events Info objects based on the provided Edge entity. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getEdgeSchedulerEvents", + "summary": "Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout)", + "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "handleRuleEngineRequestForEntityWithQueueAndTimeout", "parameters": [ { - "name": "edgeId", + "name": "entityType", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } }, { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the scheduler event name.", - "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, + "name": "queueName", + "in": "path", + "description": "Queue name to process the request in the rule engine", + "required": true, "schema": { "type": "string" } }, { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "name": "timeout", + "in": "path", + "description": "Timeout to process the request in milliseconds", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "integer", + "format": "int32" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "A JSON value representing the message." + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataSchedulerEventInfo" + "type": "string" } } } @@ -96258,7 +97213,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -96378,103 +97333,62 @@ ] } }, - "/api/scheduledReports": { - "get": { + "/api/rule-engine/{entityType}/{entityId}/{timeout}": { + "post": { "tags": [ - "scheduler-event-controller" + "rule-engine-controller" ], - "summary": "Get Scheduled Report Events (getScheduledReportEvents)", - "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getScheduledReportEvents", + "summary": "Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout)", + "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "handleRuleEngineRequestForEntityWithTimeout", "parameters": [ { - "name": "reportTemplateId", - "in": "query", - "description": "Report template id", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "userId", - "in": "query", - "description": "The user used for report generation.", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the scheduler event name or customer title.", - "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } }, { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "name": "timeout", + "in": "path", + "description": "Timeout to process the request in milliseconds", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "integer", + "format": "int32" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "A JSON value representing the message." + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataScheduledReportInfo" + "type": "string" } } } @@ -96490,7 +97404,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -96610,31 +97524,35 @@ ] } }, - "/api/schedulerEvent": { - "post": { + "/api/edge/{edgeId}/allSchedulerEvents": { + "get": { "tags": [ "scheduler-event-controller" ], - "summary": "Save Scheduler Event (saveSchedulerEvent)", - "description": "Creates or Updates scheduler event. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. When creating scheduler event, platform generates scheduler event Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created scheduler event id will be present in the response. Specify existing scheduler event id to update the scheduler event. Referencing non-existing scheduler event Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Scheduler Event entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveSchedulerEvent", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SchedulerEvent" - } + "summary": "Get All Edge Scheduler Events (getAllEdgeSchedulerEvents)", + "description": "Fetch the list of Scheduler Event Info objects based on the provided Edge entity. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllEdgeSchedulerEvents", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEvent" + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventInfo" + } } } } @@ -96650,7 +97568,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -96770,15 +97688,24 @@ ] } }, - "/api/schedulerEvent/info/{schedulerEventId}": { - "get": { + "/api/edge/{edgeId}/schedulerEvent/{schedulerEventId}": { + "post": { "tags": [ "scheduler-event-controller" ], - "summary": "Get Scheduler Event With Customer Info (getSchedulerEventInfoById)", - "description": "Fetch the SchedulerEventWithCustomerInfo object based on the provided scheduler event Id. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEventInfoById", + "summary": "Assign scheduler event to edge (assignSchedulerEventToEdge)", + "description": "Creates assignment of an existing scheduler event to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment scheduler event (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once scheduler event will be delivered to edge service, it is going to be available for usage on remote edge instance. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "assignSchedulerEventToEdge", "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "schedulerEventId", "in": "path", @@ -96795,7 +97722,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + "$ref": "#/components/schemas/SchedulerEventInfo" } } } @@ -96811,7 +97738,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -96929,17 +97856,24 @@ "ApiKeyForm": [] } ] - } - }, - "/api/schedulerEvent/{schedulerEventId}": { - "get": { + }, + "delete": { "tags": [ "scheduler-event-controller" ], - "summary": "Get Scheduler Event (getSchedulerEventById)", - "description": "Fetch the SchedulerEvent object based on the provided scheduler event Id. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEventById", + "summary": "Unassign scheduler event from edge (unassignSchedulerEventFromEdge)", + "description": "Clears assignment of the scheduler event to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity group and entities inside this group locally.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "unassignSchedulerEventFromEdge", "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "schedulerEventId", "in": "path", @@ -96956,7 +97890,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEvent" + "$ref": "#/components/schemas/SchedulerEventInfo" } } } @@ -97090,28 +98024,88 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/edge/{edgeId}/schedulerEvents": { + "get": { "tags": [ "scheduler-event-controller" ], - "summary": "Delete Scheduler Event (deleteSchedulerEvent)", - "description": "Deletes the scheduler event. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteSchedulerEvent", + "summary": "Get Edge Scheduler Events (getEdgeSchedulerEvents)", + "description": "Returns a page of Scheduler Events Info objects based on the provided Edge entity. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getEdgeSchedulerEvents", "parameters": [ { - "name": "schedulerEventId", + "name": "edgeId", "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the scheduler event name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataSchedulerEventInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -97244,31 +98238,93 @@ ] } }, - "/api/schedulerEvent/{schedulerEventId}/enabled/{enabledValue}": { - "put": { + "/api/scheduledReports": { + "get": { "tags": [ "scheduler-event-controller" ], - "summary": "Enable or disable Scheduler Event (enableSchedulerEvent)", - "description": "Updates scheduler event with enabled = true/false. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "enableSchedulerEvent", + "summary": "Get Scheduled Report Events (getScheduledReportEvents)", + "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getScheduledReportEvents", "parameters": [ { - "name": "schedulerEventId", - "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "reportTemplateId", + "in": "query", + "description": "Report template id", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "The user used for report generation.", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "string", + "minimum": 1 } }, { - "name": "enabledValue", - "in": "path", - "description": "Enabled or disabled scheduler", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "boolean" + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the scheduler event name or customer title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -97278,7 +98334,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEvent" + "$ref": "#/components/schemas/PageDataScheduledReportInfo" } } } @@ -97414,89 +98470,31 @@ ] } }, - "/api/schedulerEvents": { - "get": { + "/api/schedulerEvent": { + "post": { "tags": [ "scheduler-event-controller" ], - "summary": "Get scheduler events (getSchedulerEvents)", - "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEvents", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on event's name, type, or customer's name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the scheduler type. For example, 'generateReport'", - "required": false, - "schema": { - "type": "string" + "summary": "Save Scheduler Event (saveSchedulerEvent)", + "description": "Creates or Updates scheduler event. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. When creating scheduler event, platform generates scheduler event Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created scheduler event id will be present in the response. Specify existing scheduler event id to update the scheduler event. Referencing non-existing scheduler event Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Scheduler Event entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveSchedulerEvent", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchedulerEvent" + } } }, - { - "name": "edgeId", - "in": "query", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataSchedulerEventWithCustomerInfo" + "$ref": "#/components/schemas/SchedulerEvent" } } } @@ -97512,7 +98510,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -97632,20 +98630,20 @@ ] } }, - "/api/schedulerEvents/all": { + "/api/schedulerEvent/info/{schedulerEventId}": { "get": { "tags": [ "scheduler-event-controller" ], - "summary": "Get all scheduler events (getAllSchedulerEvents)", - "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllSchedulerEvents", + "summary": "Get Scheduler Event With Customer Info (getSchedulerEventInfoById)", + "description": "Fetch the SchedulerEventWithCustomerInfo object based on the provided scheduler event Id. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSchedulerEventInfoById", "parameters": [ { - "name": "type", - "in": "query", - "description": "A string value representing the scheduler type. For example, 'generateReport'", - "required": false, + "name": "schedulerEventId", + "in": "path", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } @@ -97657,10 +98655,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" - } + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" } } } @@ -97796,25 +98791,22 @@ ] } }, - "/api/schedulerEvents/list": { + "/api/schedulerEvent/{schedulerEventId}": { "get": { "tags": [ "scheduler-event-controller" ], - "summary": "Get Scheduler Events By Ids (getSchedulerEventsByIds)", - "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEventsByIds", + "summary": "Get Scheduler Event (getSchedulerEventById)", + "description": "Fetch the SchedulerEvent object based on the provided scheduler event Id. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSchedulerEventById", "parameters": [ { - "name": "schedulerEventIds", - "in": "query", - "description": "A list of scheduler event ids, separated by comma ','", + "name": "schedulerEventId", + "in": "path", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -97824,10 +98816,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SchedulerEventInfo" - } + "$ref": "#/components/schemas/SchedulerEvent" } } } @@ -97961,61 +98950,20 @@ "ApiKeyForm": [] } ] - } - }, - "/api/schedulerEvents/startTime/{startTime}/endTime/{endTime}": { - "get": { + }, + "delete": { "tags": [ "scheduler-event-controller" ], - "summary": "Get scheduler events (getSchedulerEventsByRange)", - "description": "Retrieves scheduler events filtering by event run time. Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEventsByRange", + "summary": "Delete Scheduler Event (deleteSchedulerEvent)", + "description": "Deletes the scheduler event. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteSchedulerEvent", "parameters": [ { - "name": "startTime", - "in": "path", - "description": "Start time filter in milliseconds for scheduler event run time", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", + "name": "schedulerEventId", "in": "path", - "description": "End time filter in milliseconds for scheduler event run time", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the scheduler type. For example, 'generateReport'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "edgeId", - "in": "query", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on event's name, type, or customer's name", - "required": false, "schema": { "type": "string" } @@ -98023,17 +98971,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -98166,22 +99104,32 @@ ] } }, - "/api/secret": { - "get": { + "/api/schedulerEvent/{schedulerEventId}/enabled/{enabledValue}": { + "put": { "tags": [ - "secret-controller" + "scheduler-event-controller" ], - "summary": "Get Secret info by name (getSecretInfoByName)", - "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getSecretInfoByName", + "summary": "Enable or disable Scheduler Event (enableSchedulerEvent)", + "description": "Updates scheduler event with enabled = true/false. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "enableSchedulerEvent", "parameters": [ { - "name": "name", - "in": "query", + "name": "schedulerEventId", + "in": "path", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "enabledValue", + "in": "path", + "description": "Enabled or disabled scheduler", + "required": true, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -98190,7 +99138,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecretInfo" + "$ref": "#/components/schemas/SchedulerEvent" } } } @@ -98324,31 +99272,91 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/schedulerEvents": { + "get": { "tags": [ - "secret-controller" + "scheduler-event-controller" ], - "summary": "Save or Update Secret (saveSecret)", - "description": "Create or update the Secret. When creating secret, platform generates Secret Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Secret Id will be present in the response. Specify existing Secret Id to update the secret. Secret name is not updatable, only value could be changed. Referencing non-existing Secret Id will cause 'Not Found' error.\n\nSecret name is unique in the scope of tenant.", - "operationId": "saveSecret", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Secret" - } + "summary": "Get scheduler events (getSchedulerEvents)", + "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSchedulerEvents", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on event's name, type, or customer's name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the scheduler type. For example, 'generateReport'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "edgeId", + "in": "query", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecretInfo" + "$ref": "#/components/schemas/PageDataSchedulerEventWithCustomerInfo" } } } @@ -98364,7 +99372,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -98484,14 +99492,25 @@ ] } }, - "/api/secret/names": { + "/api/schedulerEvents/all": { "get": { "tags": [ - "secret-controller" + "scheduler-event-controller" + ], + "summary": "Get all scheduler events (getAllSchedulerEvents)", + "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllSchedulerEvents", + "parameters": [ + { + "name": "type", + "in": "query", + "description": "A string value representing the scheduler type. For example, 'generateReport'", + "required": false, + "schema": { + "type": "string" + } + } ], - "summary": "Get Tenant Secret names (getSecretNames)", - "description": "Returns a page of secret names owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getSecretNames", "responses": { "200": { "description": "OK", @@ -98500,7 +99519,7 @@ "schema": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" } } } @@ -98637,22 +99656,25 @@ ] } }, - "/api/secret/{id}": { - "delete": { + "/api/schedulerEvents/list": { + "get": { "tags": [ - "secret-controller" + "scheduler-event-controller" ], - "summary": "Delete secret by ID (deleteSecret)", - "description": "Deletes the secret. Referencing non-existing Secret Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteSecret", + "summary": "Get Scheduler Events By Ids (getSchedulerEventsByIds)", + "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSchedulerEventsByIds", "parameters": [ { - "name": "id", - "in": "path", + "name": "schedulerEventIds", + "in": "query", + "description": "A list of scheduler event ids, separated by comma ','", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -98662,7 +99684,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbSecretDeleteResult" + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventInfo" + } } } } @@ -98798,43 +99823,74 @@ ] } }, - "/api/secret/{id}/description": { - "put": { + "/api/schedulerEvents/startTime/{startTime}/endTime/{endTime}": { + "get": { "tags": [ - "secret-controller" + "scheduler-event-controller" ], - "summary": "Update Secret Description", - "description": "Updates the description of the existing Secret by secretId. Only the description can be updated. Referencing a non-existing Secret Id will cause a 'Not Found' error.", - "operationId": "updateSecretDescription", + "summary": "Get scheduler events (getSchedulerEventsByRange)", + "description": "Retrieves scheduler events filtering by event run time. Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSchedulerEventsByRange", "parameters": [ { - "name": "id", + "name": "startTime", "in": "path", - "description": "Unique identifier of the Secret to update", + "description": "Start time filter in milliseconds for scheduler event run time", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "path", + "description": "End time filter in milliseconds for scheduler event run time", "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the scheduler type. For example, 'generateReport'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "edgeId", + "in": "query", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, "schema": { "type": "string", "format": "uuid" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "New description for the Secret" - } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on event's name, type, or customer's name", + "required": false, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecretInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + } } } } @@ -98970,22 +100026,21 @@ ] } }, - "/api/secret/{id}/info": { + "/api/secret": { "get": { "tags": [ "secret-controller" ], - "summary": "Get Secret info by Id (getSecretInfoById)", + "summary": "Get Secret info by name (getSecretInfoByName)", "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getSecretInfoById", + "operationId": "getSecretInfoByName", "parameters": [ { - "name": "id", - "in": "path", + "name": "name", + "in": "query", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], @@ -99129,34 +100184,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/secret/{id}/value": { - "put": { + }, + "post": { "tags": [ "secret-controller" ], - "summary": "Update Secret value", - "description": "Updates the value of the existing Secret by secretId. Referencing a non-existing Secret Id will cause a 'Not Found' error.", - "operationId": "updateSecretValue", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "Unique identifier of the Secret to update", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], + "summary": "Save or Update Secret (saveSecret)", + "description": "Create or update the Secret. When creating secret, platform generates Secret Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Secret Id will be present in the response. Specify existing Secret Id to update the secret. Secret name is not updatable, only value could be changed. Referencing non-existing Secret Id will cause 'Not Found' error.\n\nSecret name is unique in the scope of tenant.", + "operationId": "saveSecret", "requestBody": { "content": { "application/json": { "schema": { - "type": "string", - "description": "New value for the Secret" + "$ref": "#/components/schemas/Secret" } } }, @@ -99184,7 +100224,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -99304,77 +100344,24 @@ ] } }, - "/api/secrets": { + "/api/secret/names": { "get": { "tags": [ "secret-controller" ], - "summary": "Get Tenant Secret infos (getSecretInfos)", - "description": "Returns a page of secret infos owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getSecretInfos", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the secret name and description.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "name" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "summary": "Get Tenant Secret names (getSecretNames)", + "description": "Returns a page of secret names owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getSecretNames", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataSecretInfo" + "type": "array", + "items": { + "type": "string" + } } } } @@ -99510,29 +100497,22 @@ ] } }, - "/api/noauth/selfRegistration/privacyPolicy": { - "get": { + "/api/secret/{id}": { + "delete": { "tags": [ - "self-registration-controller" + "secret-controller" ], - "summary": "Get Privacy Policy for Self Registration form (getPrivacyPolicy)", - "description": "Fetch the Privacy Policy based on the domain name from the request. Available for non-authorized users. ", - "operationId": "getPrivacyPolicy", + "summary": "Delete secret by ID (deleteSecret)", + "description": "Deletes the secret. Referencing non-existing Secret Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteSecret", "parameters": [ { - "name": "pkgName", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "platform", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { - "$ref": "#/components/schemas/PlatformType" + "type": "string", + "format": "uuid" } } ], @@ -99542,7 +100522,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/TbSecretDeleteResult" } } } @@ -99667,47 +100647,54 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/selfRegistration/signUpSelfRegistrationParams": { - "get": { + "/api/secret/{id}/description": { + "put": { "tags": [ - "self-registration-controller" + "secret-controller" ], - "summary": "Get Self Registration form parameters without authentication (getSignUpSelfRegistrationParams)", - "description": "Fetch the Self Registration parameters based on the domain name from the request. Available for non-authorized users. Contains the information to customize the sign-up form.", - "operationId": "getSignUpSelfRegistrationParams", + "summary": "Update Secret Description", + "description": "Updates the description of the existing Secret by secretId. Only the description can be updated. Referencing a non-existing Secret Id will cause a 'Not Found' error.", + "operationId": "updateSecretDescription", "parameters": [ { - "name": "pkgName", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "platformType", - "in": "query", - "description": "Platform type", - "required": false, + "name": "id", + "in": "path", + "description": "Unique identifier of the Secret to update", + "required": true, "schema": { "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] + "format": "uuid" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "New description for the Secret" + } + } + } + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignUpSelfRegistrationParams" + "$ref": "#/components/schemas/SecretInfo" } } } @@ -99832,32 +100819,33 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/selfRegistration/termsOfUse": { + "/api/secret/{id}/info": { "get": { "tags": [ - "self-registration-controller" + "secret-controller" ], - "summary": "Get Terms of Use for Self Registration form (getTermsOfUse)", - "description": "Fetch the Terms of Use based on the domain name from the request. Available for non-authorized users. ", - "operationId": "getTermsOfUse", + "summary": "Get Secret info by Id (getSecretInfoById)", + "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getSecretInfoById", "parameters": [ { - "name": "pkgName", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "platform", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { - "$ref": "#/components/schemas/PlatformType" + "type": "string", + "format": "uuid" } } ], @@ -99867,7 +100855,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/SecretInfo" } } } @@ -99992,24 +100980,55 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/selfRegistration/selfRegistrationParams": { - "get": { + "/api/secret/{id}/value": { + "put": { "tags": [ - "self-registration-controller" + "secret-controller" ], - "summary": "Get Self Registration parameters (getSelfRegistrationParams)", - "description": "Fetch the Self Registration parameters object for the tenant of the current user. \n\nAvailable for users with 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", - "operationId": "getWebSelfRegistrationParams", + "summary": "Update Secret value", + "description": "Updates the value of the existing Secret by secretId. Referencing a non-existing Secret Id will cause a 'Not Found' error.", + "operationId": "updateSecretValue", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Unique identifier of the Secret to update", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "New value for the Secret" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SelfRegistrationParams" + "$ref": "#/components/schemas/SecretInfo" } } } @@ -100143,31 +101162,79 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/secrets": { + "get": { "tags": [ - "self-registration-controller" + "secret-controller" ], - "summary": "Create Or Update Self Registration parameters (saveSelfRegistrationParams)", - "description": "Creates or Updates the Self Registration parameters. When creating, platform generates Admin Settings Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Admin Settings Id will be present in the response. Specify existing Admin Settings Id to update the Self Registration parameters. Referencing non-existing Admin Settings Id will cause 'Not Found' error.\n\nSelf Registration allows users to signup for using the platform and automatically create a Customer account for them. You may configure default dashboard and user roles that will be assigned for this Customer. This allows you to build out-of-the-box solutions for customers. Ability to white-label the login and main pages helps to brand the platform.\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", - "operationId": "saveWebSelfRegistrationParams", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebSelfRegistrationParams" - } + "summary": "Get Tenant Secret infos (getSecretInfos)", + "description": "Returns a page of secret infos owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getSecretInfos", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the secret name and description.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "name" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WebSelfRegistrationParams" + "$ref": "#/components/schemas/PageDataSecretInfo" } } } @@ -100183,7 +101250,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -100301,16 +101368,44 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/noauth/selfRegistration/privacyPolicy": { + "get": { "tags": [ "self-registration-controller" ], - "summary": "deleteWebSelfRegistrationParams", - "operationId": "deleteWebSelfRegistrationParams", + "summary": "Get Privacy Policy for Self Registration form (getPrivacyPolicy)", + "description": "Fetch the Privacy Policy based on the domain name from the request. Available for non-authorized users. ", + "operationId": "getPrivacyPolicy", + "parameters": [ + { + "name": "pkgName", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PlatformType" + } + } + ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } }, "400": { "description": "Bad Request", @@ -100432,46 +101527,28 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/noauth/activateByEmailCode": { - "post": { + "/api/noauth/selfRegistration/signUpSelfRegistrationParams": { + "get": { "tags": [ - "sign-up-controller" + "self-registration-controller" ], - "summary": "Activate and login using code from Email (activateUserByEmailCode)", - "description": "Activate the user using code(link) from the activation email and return the JWT Token. Sends the notification and email about user activation. Checks that user was not activated yet.", - "operationId": "activateUserByEmailCode", + "summary": "Get Self Registration form parameters without authentication (getSignUpSelfRegistrationParams)", + "description": "Fetch the Self Registration parameters based on the domain name from the request. Available for non-authorized users. Contains the information to customize the sign-up form.", + "operationId": "getSignUpSelfRegistrationParams", "parameters": [ - { - "name": "emailCode", - "in": "query", - "description": "Activation token.", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pkgName", "in": "query", - "description": "Optional package name of the mobile application.", "required": false, "schema": { "type": "string" } }, { - "name": "platform", + "name": "platformType", "in": "query", "description": "Platform type", "required": false, @@ -100490,7 +101567,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "$ref": "#/components/schemas/SignUpSelfRegistrationParams" } } } @@ -100506,7 +101583,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -100618,28 +101695,18 @@ } } }, - "/api/noauth/activateEmail": { + "/api/noauth/selfRegistration/termsOfUse": { "get": { "tags": [ - "sign-up-controller" + "self-registration-controller" ], - "summary": "Activate User using code from Email (activateEmail)", - "description": "Activate the user using code(link) from the activation email. Validates the code an redirects according to the signup flow. Checks that user was not activated yet.", - "operationId": "activateEmail", + "summary": "Get Terms of Use for Self Registration form (getTermsOfUse)", + "description": "Fetch the Terms of Use based on the domain name from the request. Available for non-authorized users. ", + "operationId": "getTermsOfUse", "parameters": [ - { - "name": "emailCode", - "in": "query", - "description": "Activation token.", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pkgName", "in": "query", - "description": "Optional package name of the mobile application.", "required": false, "schema": { "type": "string" @@ -100648,14 +101715,9 @@ { "name": "platform", "in": "query", - "description": "Platform type", "required": false, "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] + "$ref": "#/components/schemas/PlatformType" } } ], @@ -100793,52 +101855,21 @@ } } }, - "/api/noauth/cloud/activateByEmailCode": { - "post": { + "/api/selfRegistration/selfRegistrationParams": { + "get": { "tags": [ - "sign-up-controller" - ], - "summary": "activateCloudUserByEmailCode", - "operationId": "activateCloudUserByEmailCode", - "parameters": [ - { - "name": "emailCode", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pkgName", - "in": "query", - "description": "Optional package name of the mobile application.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "platform", - "in": "query", - "description": "Platform type", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] - } - } + "self-registration-controller" ], + "summary": "Get Self Registration parameters (getSelfRegistrationParams)", + "description": "Fetch the Self Registration parameters object for the tenant of the current user. \n\nAvailable for users with 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", + "operationId": "getWebSelfRegistrationParams", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "$ref": "#/components/schemas/SelfRegistrationParams" } } } @@ -100854,7 +101885,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -100963,55 +101994,40 @@ } } } - } - } - }, - "/api/noauth/cloud/activateEmail": { - "get": { - "tags": [ - "sign-up-controller" - ], - "summary": "activateCloudEmail", - "operationId": "activateCloudEmail", - "parameters": [ - { - "name": "emailCode", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, + }, + "security": [ { - "name": "pkgName", - "in": "query", - "description": "Optional package name of the mobile application.", - "required": false, - "schema": { - "type": "string" - } + "HttpLoginForm": [] }, { - "name": "platform", - "in": "query", - "description": "Platform type", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] - } + "ApiKeyForm": [] } + ] + }, + "post": { + "tags": [ + "self-registration-controller" ], + "summary": "Create Or Update Self Registration parameters (saveSelfRegistrationParams)", + "description": "Creates or Updates the Self Registration parameters. When creating, platform generates Admin Settings Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Admin Settings Id will be present in the response. Specify existing Admin Settings Id to update the Self Registration parameters. Referencing non-existing Admin Settings Id will cause 'Not Found' error.\n\nSelf Registration allows users to signup for using the platform and automatically create a Customer account for them. You may configure default dashboard and user roles that will be assigned for this Customer. This allows you to build out-of-the-box solutions for customers. Ability to white-label the login and main pages helps to brand the platform.\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "saveWebSelfRegistrationParams", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebSelfRegistrationParams" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/WebSelfRegistrationParams" } } } @@ -101027,7 +102043,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -101136,51 +102152,25 @@ } } } - } - } - }, - "/api/noauth/cloud/login": { - "get": { - "tags": [ - "sign-up-controller" - ], - "summary": "Cloud mobile Login redirect (cloudMobileLogin)", - "description": "This method generates redirect to the special link that is handled by mobile application. Useful for email verification flow on cloud mobile app.", - "operationId": "cloudMobileLogin", - "parameters": [ + }, + "security": [ { - "name": "pkgName", - "in": "query", - "description": "Mobile app package name. Used to identify the application and build the redirect link.", - "required": true, - "schema": { - "type": "string" - } + "HttpLoginForm": [] }, { - "name": "platform", - "in": "query", - "description": "Platform type", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] - } + "ApiKeyForm": [] } + ] + }, + "delete": { + "tags": [ + "self-registration-controller" ], + "summary": "deleteWebSelfRegistrationParams", + "operationId": "deleteWebSelfRegistrationParams", "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -101302,20 +102292,30 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/cloud/resendEmailActivation": { + "/api/noauth/activateByEmailCode": { "post": { "tags": [ "sign-up-controller" ], - "summary": "resendCloudEmailActivation", - "operationId": "resendCloudEmailActivation", + "summary": "Activate and login using code from Email (activateUserByEmailCode)", + "description": "Activate the user using code(link) from the activation email and return the JWT Token. Sends the notification and email about user activation. Checks that user was not activated yet.", + "operationId": "activateUserByEmailCode", "parameters": [ { - "name": "email", + "name": "emailCode", "in": "query", + "description": "Activation token.", "required": true, "schema": { "type": "string" @@ -101324,6 +102324,7 @@ { "name": "pkgName", "in": "query", + "description": "Optional package name of the mobile application.", "required": false, "schema": { "type": "string" @@ -101345,7 +102346,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtPair" + } + } + } }, "400": { "description": "Bad Request", @@ -101470,29 +102478,38 @@ } } }, - "/api/noauth/login": { + "/api/noauth/activateEmail": { "get": { "tags": [ "sign-up-controller" ], - "summary": "Mobile Login redirect (mobileLogin)", - "description": "This method generates redirect to the special link that is handled by mobile application. Useful for email verification flow on mobile app.", - "operationId": "mobileLogin", + "summary": "Activate User using code from Email (activateEmail)", + "description": "Activate the user using code(link) from the activation email. Validates the code an redirects according to the signup flow. Checks that user was not activated yet.", + "operationId": "activateEmail", "parameters": [ { - "name": "pkgName", + "name": "emailCode", "in": "query", - "description": "Mobile app package name. Used to identify the application and build the redirect link.", + "description": "Activation token.", "required": true, "schema": { "type": "string" } }, + { + "name": "pkgName", + "in": "query", + "description": "Optional package name of the mobile application.", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "platform", "in": "query", "description": "Platform type", - "required": true, + "required": false, "schema": { "type": "string", "enum": [ @@ -101636,24 +102653,21 @@ } } }, - "/api/noauth/resendEmailActivation": { + "/api/noauth/cloud/activateByEmailCode": { "post": { "tags": [ "sign-up-controller" ], - "summary": "Resend Activation Email (resendEmailActivation)", - "description": "Request to resend the activation email for the user. Checks that user was not activated yet.", - "operationId": "resendEmailActivation", + "summary": "activateCloudUserByEmailCode", + "operationId": "activateCloudUserByEmailCode", "parameters": [ { - "name": "email", + "name": "emailCode", "in": "query", - "description": "Email of the user.", "required": true, "schema": { "type": "string" - }, - "example": "john.doe@company.com" + } }, { "name": "pkgName", @@ -101680,7 +102694,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtPair" + } + } + } }, "400": { "description": "Bad Request", @@ -101805,31 +102826,52 @@ } } }, - "/api/noauth/signup": { - "post": { + "/api/noauth/cloud/activateEmail": { + "get": { "tags": [ "sign-up-controller" ], - "summary": "User Sign Up (signUp)", - "description": "Process user sign up request. Creates the Customer and corresponding User based on self Registration parameters for the domain. See [Self Registration Controller](/swagger-ui.html#/self-registration-controller) for more details. The result is either 'SUCCESS' or 'INACTIVE_USER_EXISTS'. If Success, the user will receive an email with instruction to activate the account. The content of the email is customizable via the mail templates.", - "operationId": "signUp", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignUpRequest" - } + "summary": "activateCloudEmail", + "operationId": "activateCloudEmail", + "parameters": [ + { + "name": "emailCode", + "in": "query", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "pkgName", + "in": "query", + "description": "Optional package name of the mobile application.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignUpResult" + "type": "string" } } } @@ -101845,7 +102887,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -101957,20 +102999,45 @@ } } }, - "/api/noauth/signup/recaptchaParams": { + "/api/noauth/cloud/login": { "get": { "tags": [ "sign-up-controller" ], - "summary": "getRecaptchaParams", - "operationId": "getRecaptchaParams", + "summary": "Cloud mobile Login redirect (cloudMobileLogin)", + "description": "This method generates redirect to the special link that is handled by mobile application. Useful for email verification flow on cloud mobile app.", + "operationId": "cloudMobileLogin", + "parameters": [ + { + "name": "pkgName", + "in": "query", + "description": "Mobile app package name. Used to identify the application and build the redirect link.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CaptchaClientParams" + "type": "string" } } } @@ -102098,24 +103165,47 @@ } } }, - "/api/signup/acceptPrivacyPolicy": { + "/api/noauth/cloud/resendEmailActivation": { "post": { "tags": [ "sign-up-controller" ], - "summary": "Accept privacy policy (acceptPrivacyPolicy)", - "description": "Accept privacy policy by the current user.", - "operationId": "acceptPrivacyPolicy", + "summary": "resendCloudEmailActivation", + "operationId": "resendCloudEmailActivation", + "parameters": [ + { + "name": "email", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pkgName", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JwtPair" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -102237,31 +103327,48 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/signup/acceptPrivacyPolicyAndTermsOfUse": { - "post": { + "/api/noauth/login": { + "get": { "tags": [ "sign-up-controller" ], - "summary": "acceptPrivacyPolicyAndTermsOfUse", - "operationId": "acceptPrivacyPolicyAndTermsOfUse", + "summary": "Mobile Login redirect (mobileLogin)", + "description": "This method generates redirect to the special link that is handled by mobile application. Useful for email verification flow on mobile app.", + "operationId": "mobileLogin", + "parameters": [ + { + "name": "pkgName", + "in": "query", + "description": "Mobile app package name. Used to identify the application and build the redirect link.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "type": "string" } } } @@ -102277,7 +103384,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -102386,35 +103493,54 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/signup/acceptTermsOfUse": { + "/api/noauth/resendEmailActivation": { "post": { "tags": [ "sign-up-controller" ], - "summary": "Accept Terms of Use (acceptTermsOfUse)", - "description": "Accept Terms of Use by the current user.", - "operationId": "acceptTermsOfUse", + "summary": "Resend Activation Email (resendEmailActivation)", + "description": "Request to resend the activation email for the user. Checks that user was not activated yet.", + "operationId": "resendEmailActivation", + "parameters": [ + { + "name": "email", + "in": "query", + "description": "Email of the user.", + "required": true, + "schema": { + "type": "string" + }, + "example": "john.doe@company.com" + }, + { + "name": "pkgName", + "in": "query", + "description": "Optional package name of the mobile application.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JwtPair" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -102536,31 +103662,34 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/signup/displayWelcome": { - "get": { + "/api/noauth/signup": { + "post": { "tags": [ "sign-up-controller" ], - "summary": "isDisplayWelcome", - "operationId": "isDisplayWelcome", + "summary": "User Sign Up (signUp)", + "description": "Process user sign up request. Creates the Customer and corresponding User based on self Registration parameters for the domain. See [Self Registration Controller](/swagger-ui.html#/self-registration-controller) for more details. The result is either 'SUCCESS' or 'INACTIVE_USER_EXISTS'. If Success, the user will receive an email with instruction to activate the account. The content of the email is customizable via the mail templates.", + "operationId": "signUp", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignUpRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/SignUpResult" } } } @@ -102576,7 +103705,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -102685,27 +103814,26 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/signup/notDisplayWelcome": { - "post": { + "/api/noauth/signup/recaptchaParams": { + "get": { "tags": [ "sign-up-controller" ], - "summary": "setNotDisplayWelcome", - "operationId": "setNotDisplayWelcome", + "summary": "getRecaptchaParams", + "operationId": "getRecaptchaParams", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CaptchaClientParams" + } + } + } }, "400": { "description": "Bad Request", @@ -102718,7 +103846,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -102827,32 +103955,24 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/signup/privacyPolicyAccepted": { - "get": { + "/api/signup/acceptPrivacyPolicy": { + "post": { "tags": [ "sign-up-controller" ], - "summary": "Check privacy policy (privacyPolicyAccepted)", - "description": "Checks that current user accepted the privacy policy.", - "operationId": "privacyPolicyAccepted", + "summary": "Accept privacy policy (acceptPrivacyPolicy)", + "description": "Accept privacy policy by the current user.", + "operationId": "acceptPrivacyPolicy", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/JwtPair" } } } @@ -102868,7 +103988,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -102988,25 +104108,23 @@ ] } }, - "/api/signup/tenantAccount": { + "/api/signup/acceptPrivacyPolicyAndTermsOfUse": { "post": { "tags": [ "sign-up-controller" ], - "summary": "deleteTenantAccount", - "operationId": "deleteTenantAccount", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteTenantRequest" - } - } - } - }, + "summary": "acceptPrivacyPolicyAndTermsOfUse", + "operationId": "acceptPrivacyPolicyAndTermsOfUse", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtPair" + } + } + } }, "400": { "description": "Bad Request", @@ -103139,21 +104257,21 @@ ] } }, - "/api/signup/termsOfUseAccepted": { - "get": { + "/api/signup/acceptTermsOfUse": { + "post": { "tags": [ "sign-up-controller" ], - "summary": "Check Terms Of User (termsOfUseAccepted)", - "description": "Checks that current user accepted the privacy policy.", - "operationId": "termsOfUseAccepted", + "summary": "Accept Terms of Use (acceptTermsOfUse)", + "description": "Accept Terms of Use by the current user.", + "operationId": "acceptTermsOfUse", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/JwtPair" } } } @@ -103169,7 +104287,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -103289,32 +104407,20 @@ ] } }, - "/api/solutions/templates/details/{solutionTemplateId}": { + "/api/signup/displayWelcome": { "get": { "tags": [ - "solution-controller" - ], - "summary": "Get Solution template details (getSolutionTemplateDetails)", - "description": "Get a solution template details based on the provided id\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSolutionTemplateDetails", - "parameters": [ - { - "name": "solutionTemplateId", - "in": "path", - "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "sign-up-controller" ], + "summary": "isDisplayWelcome", + "operationId": "isDisplayWelcome", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TenantSolutionTemplateDetails" + "type": "boolean" } } } @@ -103450,27 +104556,16 @@ ] } }, - "/api/solutions/templates/infos": { - "get": { + "/api/signup/notDisplayWelcome": { + "post": { "tags": [ - "solution-controller" + "sign-up-controller" ], - "summary": "Get Solution templates (getSolutionTemplateInfos)", - "description": "Get a list of solution template descriptors\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSolutionTemplateInfos", + "summary": "setNotDisplayWelcome", + "operationId": "setNotDisplayWelcome", "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TenantSolutionTemplateInfo" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -103483,7 +104578,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -103603,32 +104698,21 @@ ] } }, - "/api/solutions/templates/instructions/{solutionTemplateId}": { + "/api/signup/privacyPolicyAccepted": { "get": { "tags": [ - "solution-controller" - ], - "summary": "Get Solution Template Instructions (getSolutionTemplateInstructions)", - "description": "Get a solution template instructions based on the provided id\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSolutionTemplateInstructions", - "parameters": [ - { - "name": "solutionTemplateId", - "in": "path", - "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "sign-up-controller" ], + "summary": "Check privacy policy (privacyPolicyAccepted)", + "description": "Checks that current user accepted the privacy policy.", + "operationId": "privacyPolicyAccepted", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TenantSolutionTemplateInstructions" + "type": "boolean" } } } @@ -103764,25 +104848,22 @@ ] } }, - "/api/solutions/templates/{solutionTemplateId}/delete": { - "delete": { + "/api/signup/tenantAccount": { + "post": { "tags": [ - "solution-controller" + "sign-up-controller" ], - "summary": "Uninstall Solution Template (uninstallSolutionTemplate)", - "description": "Uninstall solution template based on the provided id\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "uninstallSolutionTemplate", - "parameters": [ - { - "name": "solutionTemplateId", - "in": "path", - "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "deleteTenantAccount", + "operationId": "deleteTenantAccount", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteTenantRequest" + } } } - ], + }, "responses": { "200": { "description": "OK" @@ -103798,7 +104879,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -103918,32 +104999,21 @@ ] } }, - "/api/solutions/templates/{solutionTemplateId}/install": { - "post": { + "/api/signup/termsOfUseAccepted": { + "get": { "tags": [ - "solution-controller" - ], - "summary": "Install Solution Template (installSolutionTemplate)", - "description": "Install solution template based on the provided id\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "installSolutionTemplate", - "parameters": [ - { - "name": "solutionTemplateId", - "in": "path", - "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "sign-up-controller" ], + "summary": "Check Terms Of User (termsOfUseAccepted)", + "description": "Checks that current user accepted the privacy policy.", + "operationId": "termsOfUseAccepted", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SolutionInstallResponse" + "type": "boolean" } } } @@ -103959,7 +105029,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -104079,20 +105149,32 @@ ] } }, - "/api/tenant/subscription": { + "/api/solutions/templates/details/{solutionTemplateId}": { "get": { "tags": [ - "subscription-controller" + "solution-controller" + ], + "summary": "Get Solution template details (getSolutionTemplateDetails)", + "description": "Get a solution template details based on the provided id\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSolutionTemplateDetails", + "parameters": [ + { + "name": "solutionTemplateId", + "in": "path", + "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "getTenantSubscription", - "operationId": "getTenantSubscription", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubscriptionDetails" + "$ref": "#/components/schemas/TenantSolutionTemplateDetails" } } } @@ -104228,20 +105310,24 @@ ] } }, - "/api/tenant/subscription/mergedProfileConfig": { + "/api/solutions/templates/infos": { "get": { "tags": [ - "subscription-controller" + "solution-controller" ], - "summary": "getMergedTenantProfileConfiguration", - "operationId": "getMergedTenantProfileConfiguration", + "summary": "Get Solution templates (getSolutionTemplateInfos)", + "description": "Get a list of solution template descriptors\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSolutionTemplateInfos", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DefaultTenantProfileConfiguration" + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSolutionTemplateInfo" + } } } } @@ -104377,20 +105463,32 @@ ] } }, - "/api/tenant/subscription/trendzUsed": { + "/api/solutions/templates/instructions/{solutionTemplateId}": { "get": { "tags": [ - "subscription-controller" + "solution-controller" + ], + "summary": "Get Solution Template Instructions (getSolutionTemplateInstructions)", + "description": "Get a solution template instructions based on the provided id\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSolutionTemplateInstructions", + "parameters": [ + { + "name": "solutionTemplateId", + "in": "path", + "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "trendzUsed", - "operationId": "trendzUsed", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/TenantSolutionTemplateInstructions" } } } @@ -104526,23 +105624,28 @@ ] } }, - "/api/tenant/subscription/usage": { - "get": { + "/api/solutions/templates/{solutionTemplateId}/delete": { + "delete": { "tags": [ - "subscription-controller" + "solution-controller" + ], + "summary": "Uninstall Solution Template (uninstallSolutionTemplate)", + "description": "Uninstall solution template based on the provided id\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "uninstallSolutionTemplate", + "parameters": [ + { + "name": "solutionTemplateId", + "in": "path", + "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "getTenantSubscriptionUsage", - "operationId": "getTenantSubscriptionUsage", "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubscriptionUsage" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -104675,17 +105778,19 @@ ] } }, - "/api/tenantProfile/{tenantProfileId}/profileConfig": { - "get": { + "/api/solutions/templates/{solutionTemplateId}/install": { + "post": { "tags": [ - "subscription-controller" + "solution-controller" ], - "summary": "getTenantProfileConfigurationById", - "operationId": "getTenantProfileConfigurationById", + "summary": "Install Solution Template (installSolutionTemplate)", + "description": "Install solution template based on the provided id\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "installSolutionTemplate", "parameters": [ { - "name": "tenantProfileId", + "name": "solutionTemplateId", "in": "path", + "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -104698,7 +105803,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DefaultTenantProfileConfiguration" + "$ref": "#/components/schemas/SolutionInstallResponse" } } } @@ -104714,7 +105819,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -104834,108 +105939,169 @@ ] } }, - "/api/resource": { + "/api/tenant/subscription": { "get": { "tags": [ - "tb-resource-controller" + "subscription-controller" ], - "summary": "Get Resource Infos (getResources)", - "description": "Returns a page of Resource Info objects owned by tenant or sysadmin. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getResources", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" + "summary": "getTenantSubscription", + "operationId": "getTenantSubscription", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionDetails" + } + } } }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "resourceType", - "in": "query", - "description": "A string value representing the resource type.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "LWM2M_MODEL", - "JKS", - "PKCS_12", - "JS_MODULE" - ] + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "resourceSubType", - "in": "query", - "description": "A string value representing the resource sub-type.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "EXTENSION", - "MODULE" - ] + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the resource title.", - "required": false, - "schema": { - "type": "string" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "title", - "resourceType", - "tenantId" - ] + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } + } + }, + "security": [ + { + "HttpLoginForm": [] }, { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } + "ApiKeyForm": [] } + ] + } + }, + "/api/tenant/subscription/mergedProfileConfig": { + "get": { + "tags": [ + "subscription-controller" ], + "summary": "getMergedTenantProfileConfiguration", + "operationId": "getMergedTenantProfileConfiguration", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataTbResourceInfo" + "$ref": "#/components/schemas/DefaultTenantProfileConfiguration" } } } @@ -105069,31 +106235,22 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/tenant/subscription/trendzUsed": { + "get": { "tags": [ - "tb-resource-controller" + "subscription-controller" ], - "summary": "Create Or Update Resource (saveResource)", - "description": "Create or update the Resource. When creating the Resource, platform generates Resource id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Resource id will be present in the response. Specify existing Resource id to update the Resource. Referencing non-existing Resource Id will cause 'Not Found' error. \n\nResource combination of the title with the key is unique in the scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Resource entity.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveResource", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TbResource" - } - } - }, - "required": true - }, + "summary": "trendzUsed", + "operationId": "trendzUsed", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "type": "boolean" } } } @@ -105109,7 +106266,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -105219,7 +106376,6 @@ } } }, - "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -105230,32 +106386,20 @@ ] } }, - "/api/resource/info/{resourceId}": { + "/api/tenant/subscription/usage": { "get": { "tags": [ - "tb-resource-controller" - ], - "summary": "Get Resource Info (getResourceInfoById)", - "description": "Fetch the Resource Info object based on the provided Resource Id. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getResourceInfoById", - "parameters": [ - { - "name": "resourceId", - "in": "path", - "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "subscription-controller" ], + "summary": "getTenantSubscriptionUsage", + "operationId": "getTenantSubscriptionUsage", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "$ref": "#/components/schemas/SubscriptionUsage" } } } @@ -105391,41 +106535,30 @@ ] } }, - "/api/resource/jks/{resourceId}/download": { + "/api/tenantProfile/{tenantProfileId}/profileConfig": { "get": { "tags": [ - "tb-resource-controller" + "subscription-controller" ], - "summary": "Download JKS Resource (downloadJksResourceIfChanged)", - "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "downloadJksResourceIfChanged", + "summary": "getTenantProfileConfigurationById", + "operationId": "getTenantProfileConfigurationById", "parameters": [ { - "name": "resourceId", + "name": "tenantProfileId", "in": "path", - "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "If-None-Match", - "in": "header", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { "200": { "description": "OK", "content": { - "application/x-java-keystore": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/DefaultTenantProfileConfiguration" } } } @@ -105561,41 +106694,108 @@ ] } }, - "/api/resource/js/{resourceId}/download": { + "/api/resource": { "get": { "tags": [ "tb-resource-controller" ], - "summary": "Download JS Resource (downloadJsResourceIfChanged)", - "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for any authorized user. ", - "operationId": "downloadJsResourceIfChanged", + "summary": "Get Resource Infos (getResources)", + "description": "Returns a page of Resource Info objects owned by tenant or sysadmin. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getResources", "parameters": [ { - "name": "resourceId", - "in": "path", - "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "If-None-Match", - "in": "header", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "resourceType", + "in": "query", + "description": "A string value representing the resource type.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "LWM2M_MODEL", + "JKS", + "PKCS_12", + "JS_MODULE" + ] + } + }, + { + "name": "resourceSubType", + "in": "query", + "description": "A string value representing the resource sub-type.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "EXTENSION", + "MODULE" + ] + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the resource title.", "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "title", + "resourceType", + "tenantId" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { "200": { "description": "OK", "content": { - "application/javascript": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/PageDataTbResourceInfo" } } } @@ -105729,39 +106929,31 @@ "ApiKeyForm": [] } ] - } - }, - "/api/resource/list": { - "get": { + }, + "post": { "tags": [ "tb-resource-controller" ], - "summary": "Get Resource Infos by ids (getSystemOrTenantResourcesByIds)", - "operationId": "getSystemOrTenantResourcesByIds", - "parameters": [ - { - "name": "resourceIds", - "in": "query", - "description": "A list of resource ids, separated by comma ','", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" + "summary": "Create Or Update Resource (saveResource)", + "description": "Create or update the Resource. When creating the Resource, platform generates Resource id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Resource id will be present in the response. Specify existing Resource id to update the Resource. Referencing non-existing Resource Id will cause 'Not Found' error. \n\nResource combination of the title with the key is unique in the scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Resource entity.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveResource", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResource" } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TbResourceInfo" - } + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -105777,7 +106969,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -105887,6 +107079,7 @@ } } }, + "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -105897,51 +107090,22 @@ ] } }, - "/api/resource/lwm2m": { + "/api/resource/info/{resourceId}": { "get": { "tags": [ "tb-resource-controller" ], - "summary": "Get LwM2M Objects (getLwm2mListObjects)", - "description": "Returns a page of LwM2M objects parsed from Resources with type 'LWM2M_MODEL' owned by tenant or sysadmin. You can specify parameters to filter the results. LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getLwm2mListObjects", + "summary": "Get Resource Info (getResourceInfoById)", + "description": "Fetch the Resource Info object based on the provided Resource Id. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getResourceInfoById", "parameters": [ { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": true, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": true, - "schema": { - "type": "string", - "enum": [ - "id", - "name" - ] - } - }, - { - "name": "objectIds", - "in": "query", - "description": "LwM2M Object ids.", + "name": "resourceId", + "in": "path", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -105951,10 +107115,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LwM2mObject" - } + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -106090,68 +107251,30 @@ ] } }, - "/api/resource/lwm2m/page": { + "/api/resource/jks/{resourceId}/download": { "get": { "tags": [ "tb-resource-controller" ], - "summary": "Get LwM2M Objects (getLwm2mListObjectsPage)", - "description": "Returns a page of LwM2M objects parsed from Resources with type 'LWM2M_MODEL' owned by tenant or sysadmin. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getLwm2mListObjectsPage", + "summary": "Download JKS Resource (downloadJksResourceIfChanged)", + "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "downloadJksResourceIfChanged", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "resourceId", + "in": "path", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the resource title.", - "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "id", - "name" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "name": "If-None-Match", + "in": "header", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -106159,12 +107282,10 @@ "200": { "description": "OK", "content": { - "application/json": { + "application/x-java-keystore": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LwM2mObject" - } + "type": "string", + "format": "binary" } } } @@ -106300,14 +107421,14 @@ ] } }, - "/api/resource/lwm2m/{resourceId}/download": { + "/api/resource/js/{resourceId}/download": { "get": { "tags": [ "tb-resource-controller" ], - "summary": "Download LWM2M Resource (downloadLwm2mResourceIfChanged)", - "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "downloadLwm2mResourceIfChanged", + "summary": "Download JS Resource (downloadJsResourceIfChanged)", + "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for any authorized user. ", + "operationId": "downloadJsResourceIfChanged", "parameters": [ { "name": "resourceId", @@ -106331,7 +107452,7 @@ "200": { "description": "OK", "content": { - "application/xml": { + "application/javascript": { "schema": { "type": "string", "format": "binary" @@ -106470,30 +107591,24 @@ ] } }, - "/api/resource/pkcs12/{resourceId}/download": { + "/api/resource/list": { "get": { "tags": [ "tb-resource-controller" ], - "summary": "Download PKCS_12 Resource (downloadPkcs12ResourceIfChanged)", - "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "downloadPkcs12ResourceIfChanged", + "summary": "Get Resource Infos by ids (getSystemOrTenantResourcesByIds)", + "operationId": "getSystemOrTenantResourcesByIds", "parameters": [ { - "name": "resourceId", - "in": "path", - "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "resourceIds", + "in": "query", + "description": "A list of resource ids, separated by comma ','", "required": true, "schema": { - "type": "string" - } - }, - { - "name": "If-None-Match", - "in": "header", - "required": false, - "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -106501,10 +107616,12 @@ "200": { "description": "OK", "content": { - "application/x-pkcs12": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "array", + "items": { + "$ref": "#/components/schemas/TbResourceInfo" + } } } } @@ -106640,70 +107757,51 @@ ] } }, - "/api/resource/tenant": { + "/api/resource/lwm2m": { "get": { "tags": [ "tb-resource-controller" ], - "summary": "Get All Resource Infos (getTenantResources)", - "description": "Returns a page of Resource Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantResources", + "summary": "Get LwM2M Objects (getLwm2mListObjects)", + "description": "Returns a page of LwM2M objects parsed from Resources with type 'LWM2M_MODEL' owned by tenant or sysadmin. You can specify parameters to filter the results. LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getLwm2mListObjects", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "sortOrder", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the resource title.", - "required": false, - "schema": { - "type": "string" + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } }, { "name": "sortProperty", "in": "query", "description": "Property of entity to sort by", - "required": false, + "required": true, "schema": { "type": "string", "enum": [ - "createdTime", - "title", - "resourceType", - "tenantId" + "id", + "name" ] } }, { - "name": "sortOrder", + "name": "objectIds", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "description": "LwM2M Object ids.", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "array", + "items": { + "type": "string" + } } } ], @@ -106713,7 +107811,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataTbResourceInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/LwM2mObject" + } } } } @@ -106849,57 +107950,81 @@ ] } }, - "/api/resource/upload": { - "post": { + "/api/resource/lwm2m/page": { + "get": { "tags": [ "tb-resource-controller" ], - "summary": "Upload Resource via Multipart File (uploadResource)", - "description": "Create the Resource using multipart file upload. \n\nResource combination of the title with the key is unique in the scope of tenant. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "uploadResource", - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "Resource title." - }, - "resourceType": { - "type": "string", - "description": "Resource type." - }, - "descriptor": { - "type": "string", - "description": "Resource descriptor (JSON)." - }, - "resourceSubType": { - "type": "string", - "description": "Resource sub type." - }, - "file": { - "type": "string", - "format": "binary", - "description": "Resource file." - } - }, - "required": [ - "file", - "resourceType" - ] - } + "summary": "Get LwM2M Objects (getLwm2mListObjectsPage)", + "description": "Returns a page of LwM2M objects parsed from Resources with type 'LWM2M_MODEL' owned by tenant or sysadmin. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getLwm2mListObjectsPage", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the resource title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "id", + "name" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } - }, + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/LwM2mObject" + } } } } @@ -106915,7 +108040,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -107035,51 +108160,41 @@ ] } }, - "/api/resource/{id}/data": { - "put": { + "/api/resource/lwm2m/{resourceId}/download": { + "get": { "tags": [ "tb-resource-controller" ], - "summary": "updateResourceData", - "operationId": "updateResourceData", + "summary": "Download LWM2M Resource (downloadLwm2mResourceIfChanged)", + "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "downloadLwm2mResourceIfChanged", "parameters": [ { - "name": "id", + "name": "resourceId", "in": "path", - "description": "Unique identifier of the Resource to update", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary", - "description": "Resource file." - } - }, - "required": [ - "file" - ] - } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/xml": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "type": "string", + "format": "binary" } } } @@ -107215,42 +108330,41 @@ ] } }, - "/api/resource/{id}/info": { - "put": { + "/api/resource/pkcs12/{resourceId}/download": { + "get": { "tags": [ "tb-resource-controller" ], - "summary": "updateResourceInfo", - "operationId": "updateResourceInfo", + "summary": "Download PKCS_12 Resource (downloadPkcs12ResourceIfChanged)", + "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "downloadPkcs12ResourceIfChanged", "parameters": [ { - "name": "id", + "name": "resourceId", "in": "path", - "description": "Unique identifier of the Resource to update", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TbResourceInfo" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/x-pkcs12": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "type": "string", + "format": "binary" } } } @@ -107386,23 +108500,71 @@ ] } }, - "/api/resource/{resourceId}": { + "/api/resource/tenant": { "get": { "tags": [ "tb-resource-controller" ], - "summary": "Get Resource (getResourceById)", - "description": "Fetch the Resource object based on the provided Resource Id. Resource is a heavyweight object that includes main information about the Resource and also data. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getResourceById", + "summary": "Get All Resource Infos (getTenantResources)", + "description": "Returns a page of Resource Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantResources", "parameters": [ { - "name": "resourceId", - "in": "path", - "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the resource title.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "title", + "resourceType", + "tenantId" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -107411,7 +108573,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResource" + "$ref": "#/components/schemas/PageDataTbResourceInfo" } } } @@ -107537,7 +108699,6 @@ } } }, - "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -107546,40 +108707,59 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/resource/upload": { + "post": { "tags": [ "tb-resource-controller" ], - "summary": "Delete Resource (deleteResource)", - "description": "Deletes the Resource. Referencing non-existing Resource Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "deleteResource", - "parameters": [ - { - "name": "resourceId", - "in": "path", - "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "force", - "in": "query", - "required": false, - "schema": { - "type": "boolean" + "summary": "Upload Resource via Multipart File (uploadResource)", + "description": "Create the Resource using multipart file upload. \n\nResource combination of the title with the key is unique in the scope of tenant. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "uploadResource", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Resource title." + }, + "resourceType": { + "type": "string", + "description": "Resource type." + }, + "descriptor": { + "type": "string", + "description": "Resource descriptor (JSON)." + }, + "resourceSubType": { + "type": "string", + "description": "Resource sub type." + }, + "file": { + "type": "string", + "format": "binary", + "description": "Resource file." + } + }, + "required": [ + "file", + "resourceType" + ] + } } } - ], + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResourceDeleteResult" + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -107595,7 +108775,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -107715,33 +108895,51 @@ ] } }, - "/api/resource/{resourceId}/download": { - "get": { + "/api/resource/{id}/data": { + "put": { "tags": [ "tb-resource-controller" ], - "summary": "Download Resource (downloadResource)", - "description": "Download Resource based on the provided Resource Id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "downloadResource", + "summary": "updateResourceData", + "operationId": "updateResourceData", "parameters": [ { - "name": "resourceId", + "name": "id", "in": "path", - "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Unique identifier of the Resource to update", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary", + "description": "Resource file." + } + }, + "required": [ + "file" + ] + } + } + } + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -107877,70 +109075,732 @@ ] } }, - "/api/resource/{resourceType}/{scope}/{key}": { - "get": { + "/api/resource/{id}/info": { + "put": { "tags": [ "tb-resource-controller" ], - "summary": "Download resource (downloadResourceIfChanged)", - "description": "Download resource with a given type and key for the given scope\n\nAvailable for any authorized user. ", - "operationId": "downloadResourceIfChanged", + "summary": "updateResourceInfo", + "operationId": "updateResourceInfo", "parameters": [ { - "name": "resourceType", - "in": "path", - "description": "Type of the resource", - "required": true, - "schema": { - "type": "string", - "enum": [ - "lwm2m_model", - "jks", - "pkcs_12", - "js_module", - "dashboard" - ] - } - }, - { - "name": "scope", + "name": "id", "in": "path", - "description": "Scope of the resource", + "description": "Unique identifier of the Resource to update", "required": true, "schema": { "type": "string", - "enum": [ - "system", - "tenant" - ] - } - }, - { - "name": "key", - "in": "path", - "description": "Key of the resource, e.g. 'extension.js'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "If-None-Match", - "in": "header", - "required": false, - "schema": { - "type": "string" + "format": "uuid" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceInfo" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/TbResourceInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/resource/{resourceId}": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Get Resource (getResourceById)", + "description": "Fetch the Resource object based on the provided Resource Id. Resource is a heavyweight object that includes main information about the Resource and also data. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getResourceById", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "deprecated": true, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + }, + "delete": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Delete Resource (deleteResource)", + "description": "Deletes the Resource. Referencing non-existing Resource Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteResource", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "force", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceDeleteResult" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/resource/{resourceId}/download": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Download Resource (downloadResource)", + "description": "Download Resource based on the provided Resource Id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "downloadResource", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/resource/{resourceType}/{scope}/{key}": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Download resource (downloadResourceIfChanged)", + "description": "Download resource with a given type and key for the given scope\n\nAvailable for any authorized user. ", + "operationId": "downloadResourceIfChanged", + "parameters": [ + { + "name": "resourceType", + "in": "path", + "description": "Type of the resource", + "required": true, + "schema": { + "type": "string", + "enum": [ + "lwm2m_model", + "jks", + "pkcs_12", + "js_module", + "dashboard" + ] + } + }, + { + "name": "scope", + "in": "path", + "description": "Scope of the resource", + "required": true, + "schema": { + "type": "string", + "enum": [ + "system", + "tenant" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Key of the resource, e.g. 'extension.js'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" } } } @@ -130647,25 +132507,13 @@ }, "AdminSettingsId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ADMIN_SETTINGS" - ], - "example": "ADMIN_SETTINGS" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "AffectedTenantAdministratorsFilter": { @@ -130905,32 +132753,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "AiModelId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "Entity type of the AI model", - "enum": [ - "AI_MODEL" - ], - "example": "AI_MODEL" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "AiModelType": { @@ -131141,8 +132974,7 @@ } ], "required": [ - "notifyOn", - "triggerType" + "notifyOn" ] }, "AlarmAssignmentRecipientsConfig": { @@ -131183,6 +133015,9 @@ }, "minProperties": 1 }, + "clearRule": { + "$ref": "#/components/schemas/AlarmRuleDefinition" + }, "createRules": { "type": "object", "additionalProperties": { @@ -131190,12 +133025,15 @@ }, "minProperties": 1 }, - "clearRule": { - "$ref": "#/components/schemas/AlarmRuleDefinition" - }, "propagate": { "type": "boolean" }, + "propagateRelationTypes": { + "type": "array", + "items": { + "type": "string" + } + }, "propagateToOwner": { "type": "boolean" }, @@ -131204,12 +133042,6 @@ }, "propagateToTenant": { "type": "boolean" - }, - "propagateRelationTypes": { - "type": "array", - "items": { - "type": "string" - } } } } @@ -131367,9 +133199,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "AlarmCommentRecipientsConfig": { @@ -131909,25 +133738,13 @@ }, "AlarmId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ALARM" - ], - "example": "ALARM" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "AlarmInfo": { @@ -132121,8 +133938,7 @@ } ], "required": [ - "notifyOn", - "triggerType" + "notifyOn" ] }, "AlarmRule": { @@ -132325,7 +134141,6 @@ } ], "required": [ - "expression", "unit", "value" ] @@ -132410,8 +134225,7 @@ } ], "required": [ - "count", - "expression" + "count" ] }, "AlarmRuleSchedule": { @@ -132437,9 +134251,6 @@ { "$ref": "#/components/schemas/AlarmRuleCondition" } - ], - "required": [ - "expression" ] }, "AlarmRuleSpecificTimeSchedule": { @@ -132600,10 +134411,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "AliasEntityId": { @@ -132742,10 +134549,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -132849,10 +134652,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -132992,25 +134791,13 @@ }, "ApiKeyId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "API_KEY" - ], - "example": "API_KEY" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "ApiKeyInfo": { @@ -133088,9 +134875,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "ApiUsageLimitRecipientsConfig": { @@ -133131,6 +134915,17 @@ } ] }, + "ApiUsageStateId": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" + }, + { + "type": "object" + } + ] + }, "ApiUsageStateValue": { "type": "string", "enum": [ @@ -133172,7 +134967,9 @@ "TS_ROLLING" ] }, - "ArrayNode": {}, + "ArrayNode": { + + }, "Asset": { "type": "object", "properties": { @@ -133222,8 +135019,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -133242,32 +135038,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "AssetId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ASSET" - ], - "example": "ASSET" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "AssetInfo": { @@ -133332,8 +135113,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -133411,32 +135191,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "AssetProfileId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ASSET_PROFILE" - ], - "example": "ASSET_PROFILE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "AssetProfileInfo": { @@ -133683,12 +135448,7 @@ "$ref": "#/components/schemas/Output" }, { - "type": "object", - "properties": { - "strategy": { - "$ref": "#/components/schemas/AttributesOutputStrategy" - } - } + "type": "object" } ] }, @@ -133742,8 +135502,7 @@ }, "entityId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Entity id", - "readOnly": true + "description": "JSON object with Entity id" }, "entityName": { "type": "string", @@ -134014,10 +135773,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -134209,12 +135964,12 @@ "order": { "type": "string" }, + "aggregation": { + "$ref": "#/components/schemas/Aggregation" + }, "interval": { "type": "integer", "format": "int64" - }, - "aggregation": { - "$ref": "#/components/schemas/Aggregation" } } }, @@ -134256,25 +136011,13 @@ }, "BlobEntityId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "BLOB_ENTITY" - ], - "example": "BLOB_ENTITY" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "BlobEntityInfo": { @@ -134326,8 +136069,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -134394,8 +136136,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -134706,12 +136447,12 @@ } }, "properties": { - "aiGenerated": { - "type": "boolean" - }, "output": { "$ref": "#/components/schemas/Output" }, + "aiGenerated": { + "type": "boolean" + }, "type": { "type": "string" } @@ -134781,41 +136522,26 @@ "x + y": 32 } }, + "error": { + "type": "boolean" + }, "isError": { "type": "boolean", "writeOnly": true - }, - "error": { - "type": "boolean" } } } - ], - "required": [ - "eventType" ] }, "CalculatedFieldId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "CALCULATED_FIELD" - ], - "example": "CALCULATED_FIELD" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "CalculatedFieldInfo": { @@ -135029,8 +136755,7 @@ } ], "required": [ - "calculatedFieldId", - "tasksKey" + "calculatedFieldId" ] }, "CfReprocessingJobResult": { @@ -135221,9 +136946,6 @@ } } } - ], - "required": [ - "spec" ] }, "CoapDeviceProfileTransportConfiguration": { @@ -135406,9 +137128,6 @@ } } } - ], - "required": [ - "type" ] }, "ComponentClusteringMode": { @@ -135550,7 +137269,9 @@ "ContactBasedObject": { "type": "object", "properties": { - "id": {}, + "id": { + + }, "createdTime": { "type": "integer", "format": "int64", @@ -135663,32 +137384,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "ConverterId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "CONVERTER" - ], - "example": "CONVERTER" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "ConverterType": { @@ -135743,10 +137449,6 @@ { "$ref": "#/components/schemas/ReportTemplateConfig" } - ], - "required": [ - "components", - "format" ] }, "CurrentOwnerDynamicSourceConfiguration": { @@ -135985,10 +137687,6 @@ "type": "boolean", "description": "Set the access token of the current user to a new dashboard" }, - "visible": { - "type": "boolean", - "description": "Mark if menu item is visible for user" - }, "pages": { "type": "array", "description": "List of child menu items", @@ -136001,8 +137699,7 @@ ], "required": [ "menuItemType", - "name", - "type" + "name" ] }, "CustomMobilePage": { @@ -136018,11 +137715,6 @@ "description": "Page label", "example": "Air quality" }, - "visible": { - "type": "boolean", - "description": "Indicates if page is visible", - "example": true - }, "icon": { "type": "string", "description": "URL of the page icon", @@ -136035,10 +137727,6 @@ } } } - ], - "required": [ - "type", - "visible" ] }, "CustomTimeSchedule": { @@ -136168,8 +137856,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -136192,32 +137879,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "CustomerId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "CUSTOMER" - ], - "example": "CUSTOMER" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "CustomerInfo": { @@ -136319,8 +137991,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -136360,26 +138031,6 @@ "Dashboard": { "type": "object", "properties": { - "id": { - "$ref": "#/components/schemas/DashboardId", - "description": "JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard." - }, - "createdTime": { - "type": "integer", - "format": "int64", - "description": "Timestamp of the dashboard creation, in milliseconds", - "example": 1609459200000, - "readOnly": true - }, - "tenantId": { - "$ref": "#/components/schemas/TenantId", - "description": "JSON object with Tenant Id. Tenant Id of the dashboard can't be changed.", - "readOnly": true - }, - "customerId": { - "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. " - }, "title": { "type": "string", "description": "Title of the dashboard." @@ -136389,15 +138040,6 @@ "description": "Thumbnail picture for rendering of the dashboards in a grid view on mobile devices.", "readOnly": true }, - "assignedCustomers": { - "type": "array", - "description": "List of assigned customers with their info.", - "items": { - "$ref": "#/components/schemas/ShortCustomerInfo" - }, - "readOnly": true, - "uniqueItems": true - }, "mobileHide": { "type": "boolean", "description": "Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens.", @@ -136409,9 +138051,13 @@ "description": "Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications", "readOnly": true }, - "version": { - "type": "integer", - "format": "int64" + "configuration": { + "$ref": "#/components/schemas/JsonNode" + }, + "name": { + "type": "string", + "description": "Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", + "readOnly": true }, "resources": { "type": "array", @@ -136419,18 +138065,42 @@ "$ref": "#/components/schemas/ResourceExportData" } }, - "configuration": { - "$ref": "#/components/schemas/JsonNode" + "assignedCustomers": { + "type": "array", + "description": "List of assigned customers with their info.", + "items": { + "$ref": "#/components/schemas/ShortCustomerInfo" + }, + "readOnly": true, + "uniqueItems": true }, - "name": { - "type": "string", - "description": "Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the dashboard creation, in milliseconds", + "example": 1609459200000, "readOnly": true }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id. " + }, + "id": { + "$ref": "#/components/schemas/DashboardId", + "description": "JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard." + }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", + "description": "JSON object with Customer or Tenant Id" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id. Tenant Id of the dashboard can't be changed.", "readOnly": true + }, + "version": { + "type": "integer", + "format": "int64" } } }, @@ -136486,9 +138156,7 @@ } ], "required": [ - "config", - "subType", - "type" + "config" ] }, "DashboardExportData": { @@ -136496,32 +138164,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "DashboardId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "DASHBOARD" - ], - "example": "DASHBOARD" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "DashboardInfo": { @@ -136609,8 +138262,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" } } }, @@ -136627,11 +138279,6 @@ "description": "Page label", "example": "Air quality" }, - "visible": { - "type": "boolean", - "description": "Indicates if page is visible", - "example": true - }, "icon": { "type": "string", "description": "URL of the page icon", @@ -136644,10 +138291,6 @@ } } } - ], - "required": [ - "type", - "visible" ] }, "DashboardReportConfig": { @@ -136895,18 +138538,15 @@ "metadata": { "type": "string" }, + "error": { + "type": "boolean" + }, "isError": { "type": "boolean", "writeOnly": true - }, - "error": { - "type": "boolean" } } } - ], - "required": [ - "eventType" ] }, "DebugIntegrationEventFilter": { @@ -136936,18 +138576,15 @@ "statusIntegration": { "type": "string" }, + "error": { + "type": "boolean" + }, "isError": { "type": "boolean", "writeOnly": true - }, - "error": { - "type": "boolean" } } } - ], - "required": [ - "eventType" ] }, "DebugSettings": { @@ -137004,9 +138641,6 @@ { "$ref": "#/components/schemas/DataKeySettings" } - ], - "required": [ - "type" ] }, "DefaultDeviceConfiguration": { @@ -137015,10 +138649,7 @@ "$ref": "#/components/schemas/DeviceConfiguration" } ], - "description": "Default device configuration", - "required": [ - "type" - ] + "description": "Default device configuration" }, "DefaultDeviceProfileConfiguration": { "allOf": [ @@ -137066,10 +138697,6 @@ "description": "URL of the menu item icon. Overrides 'materialIcon'", "example": "My Custom Menu" }, - "visible": { - "type": "boolean", - "description": "Mark if menu item is visible for user" - }, "pages": { "type": "array", "description": "List of child menu items", @@ -137079,9 +138706,6 @@ } } } - ], - "required": [ - "type" ] }, "DefaultMobilePage": { @@ -137097,11 +138721,6 @@ "description": "Page label", "example": "Air quality" }, - "visible": { - "type": "boolean", - "description": "Indicates if page is visible", - "example": true - }, "icon": { "type": "string", "description": "URL of the page icon", @@ -137114,10 +138733,6 @@ } } } - ], - "required": [ - "type", - "visible" ] }, "DefaultPageId": { @@ -137641,8 +139256,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -137694,8 +139308,7 @@ } ], "required": [ - "notifyOn", - "triggerType" + "notifyOn" ] }, "DeviceActivityRecipientsConfig": { @@ -137847,9 +139460,6 @@ } } } - ], - "required": [ - "entityType" ] }, "DeviceGroupOtaPackage": { @@ -137876,25 +139486,13 @@ }, "DeviceId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "DEVICE" - ], - "example": "DEVICE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "DeviceInfo": { @@ -137976,8 +139574,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -138178,32 +139775,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "DeviceProfileId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "DEVICE_PROFILE" - ], - "example": "DEVICE_PROFILE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "DeviceProfileInfo": { @@ -138512,10 +140094,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "Domain": { @@ -138555,8 +140133,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" } }, "required": [ @@ -138565,21 +140142,13 @@ }, "DomainId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "example": "DEVICE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "DomainInfo": { @@ -138625,8 +140194,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" } }, "required": [ @@ -138688,10 +140256,7 @@ } } ], - "description": "Dummy job configuration", - "required": [ - "tasksKey" - ] + "description": "Dummy job configuration" }, "DummyJobResult": { "allOf": [ @@ -138919,8 +140484,7 @@ "format": "int64" }, "ownerId": { - "$ref": "#/components/schemas/EntityId", - "readOnly": true + "$ref": "#/components/schemas/EntityId" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -138957,9 +140521,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "EdgeCommunicationFailureRecipientsConfig": { @@ -139010,9 +140571,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "EdgeConnectionRecipientsConfig": { @@ -139186,25 +140744,13 @@ }, "EdgeId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "EDGE" - ], - "example": "EDGE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "EdgeInfo": { @@ -139290,8 +140836,7 @@ "readOnly": true }, "ownerId": { - "$ref": "#/components/schemas/EntityId", - "readOnly": true + "$ref": "#/components/schemas/EntityId" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -139479,7 +141024,6 @@ } ], "required": [ - "body", "subject" ] }, @@ -139553,9 +141097,6 @@ } } } - ], - "required": [ - "version" ] }, "EntitiesByGroupNameFilter": { @@ -139607,9 +141148,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "EntitiesLimitRecipientsConfig": { @@ -139677,9 +141215,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "EntityActionRecipientsConfig": { @@ -139720,6 +141255,9 @@ }, "minProperties": 1 }, + "interval": { + "$ref": "#/components/schemas/AggInterval" + }, "metrics": { "type": "object", "additionalProperties": { @@ -139727,14 +141265,11 @@ }, "minProperties": 1 }, - "interval": { - "$ref": "#/components/schemas/AggInterval" + "produceIntermediateResult": { + "type": "boolean" }, "watermark": { "$ref": "#/components/schemas/Watermark" - }, - "produceIntermediateResult": { - "type": "boolean" } } } @@ -139742,8 +141277,7 @@ "required": [ "arguments", "interval", - "metrics", - "output" + "metrics" ] }, "EntityAlias": { @@ -140124,9 +141658,6 @@ } } } - ], - "required": [ - "entityType" ] }, "EntityGroupFilter": { @@ -140158,25 +141689,13 @@ }, "EntityGroupId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ENTITY_GROUP" - ], - "example": "ENTITY_GROUP" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "EntityGroupInfo": { @@ -140234,7 +141753,146 @@ "type": "array", "description": "List of the entity group owners.", "items": { - "$ref": "#/components/schemas/EntityId" + "oneOf": [ + { + "$ref": "#/components/schemas/AdminSettingsId" + }, + { + "$ref": "#/components/schemas/AiModelId" + }, + { + "$ref": "#/components/schemas/AlarmId" + }, + { + "$ref": "#/components/schemas/ApiKeyId" + }, + { + "$ref": "#/components/schemas/ApiUsageStateId" + }, + { + "$ref": "#/components/schemas/AssetId" + }, + { + "$ref": "#/components/schemas/AssetProfileId" + }, + { + "$ref": "#/components/schemas/BlobEntityId" + }, + { + "$ref": "#/components/schemas/CalculatedFieldId" + }, + { + "$ref": "#/components/schemas/ConverterId" + }, + { + "$ref": "#/components/schemas/CustomerId" + }, + { + "$ref": "#/components/schemas/DashboardId" + }, + { + "$ref": "#/components/schemas/DeviceId" + }, + { + "$ref": "#/components/schemas/DeviceProfileId" + }, + { + "$ref": "#/components/schemas/DomainId" + }, + { + "$ref": "#/components/schemas/EdgeId" + }, + { + "$ref": "#/components/schemas/EntityGroupId" + }, + { + "$ref": "#/components/schemas/EntityViewId" + }, + { + "$ref": "#/components/schemas/GroupPermissionId" + }, + { + "$ref": "#/components/schemas/IntegrationId" + }, + { + "$ref": "#/components/schemas/JobId" + }, + { + "$ref": "#/components/schemas/MobileAppBundleId" + }, + { + "$ref": "#/components/schemas/MobileAppId" + }, + { + "$ref": "#/components/schemas/NotificationId" + }, + { + "$ref": "#/components/schemas/NotificationRequestId" + }, + { + "$ref": "#/components/schemas/NotificationRuleId" + }, + { + "$ref": "#/components/schemas/NotificationTargetId" + }, + { + "$ref": "#/components/schemas/NotificationTemplateId" + }, + { + "$ref": "#/components/schemas/OAuth2ClientId" + }, + { + "$ref": "#/components/schemas/OtaPackageId" + }, + { + "$ref": "#/components/schemas/QueueId" + }, + { + "$ref": "#/components/schemas/QueueStatsId" + }, + { + "$ref": "#/components/schemas/ReportId" + }, + { + "$ref": "#/components/schemas/ReportTemplateId" + }, + { + "$ref": "#/components/schemas/RoleId" + }, + { + "$ref": "#/components/schemas/RpcId" + }, + { + "$ref": "#/components/schemas/RuleChainId" + }, + { + "$ref": "#/components/schemas/RuleNodeId" + }, + { + "$ref": "#/components/schemas/SchedulerEventId" + }, + { + "$ref": "#/components/schemas/SecretId" + }, + { + "$ref": "#/components/schemas/TbResourceId" + }, + { + "$ref": "#/components/schemas/TenantId" + }, + { + "$ref": "#/components/schemas/TenantProfileId" + }, + { + "$ref": "#/components/schemas/UserId" + }, + { + "$ref": "#/components/schemas/WidgetTypeId" + }, + { + "$ref": "#/components/schemas/WidgetsBundleId" + } + ] }, "uniqueItems": true }, @@ -140299,6 +141957,57 @@ }, "EntityId": { "type": "object", + "discriminator": { + "propertyName": "entityType", + "mapping": { + "ADMIN_SETTINGS": "#/components/schemas/AdminSettingsId", + "AI_MODEL": "#/components/schemas/AiModelId", + "ALARM": "#/components/schemas/AlarmId", + "API_KEY": "#/components/schemas/ApiKeyId", + "API_USAGE_STATE": "#/components/schemas/ApiUsageStateId", + "ASSET": "#/components/schemas/AssetId", + "ASSET_PROFILE": "#/components/schemas/AssetProfileId", + "BLOB_ENTITY": "#/components/schemas/BlobEntityId", + "CALCULATED_FIELD": "#/components/schemas/CalculatedFieldId", + "CONVERTER": "#/components/schemas/ConverterId", + "CUSTOMER": "#/components/schemas/CustomerId", + "DASHBOARD": "#/components/schemas/DashboardId", + "DEVICE": "#/components/schemas/DeviceId", + "DEVICE_PROFILE": "#/components/schemas/DeviceProfileId", + "DOMAIN": "#/components/schemas/DomainId", + "EDGE": "#/components/schemas/EdgeId", + "ENTITY_GROUP": "#/components/schemas/EntityGroupId", + "ENTITY_VIEW": "#/components/schemas/EntityViewId", + "GROUP_PERMISSION": "#/components/schemas/GroupPermissionId", + "INTEGRATION": "#/components/schemas/IntegrationId", + "JOB": "#/components/schemas/JobId", + "MOBILE_APP": "#/components/schemas/MobileAppId", + "MOBILE_APP_BUNDLE": "#/components/schemas/MobileAppBundleId", + "NOTIFICATION": "#/components/schemas/NotificationId", + "NOTIFICATION_REQUEST": "#/components/schemas/NotificationRequestId", + "NOTIFICATION_RULE": "#/components/schemas/NotificationRuleId", + "NOTIFICATION_TARGET": "#/components/schemas/NotificationTargetId", + "NOTIFICATION_TEMPLATE": "#/components/schemas/NotificationTemplateId", + "OAUTH2_CLIENT": "#/components/schemas/OAuth2ClientId", + "OTA_PACKAGE": "#/components/schemas/OtaPackageId", + "QUEUE": "#/components/schemas/QueueId", + "QUEUE_STATS": "#/components/schemas/QueueStatsId", + "REPORT": "#/components/schemas/ReportId", + "REPORT_TEMPLATE": "#/components/schemas/ReportTemplateId", + "ROLE": "#/components/schemas/RoleId", + "RPC": "#/components/schemas/RpcId", + "RULE_CHAIN": "#/components/schemas/RuleChainId", + "RULE_NODE": "#/components/schemas/RuleNodeId", + "SCHEDULER_EVENT": "#/components/schemas/SchedulerEventId", + "SECRET": "#/components/schemas/SecretId", + "TB_RESOURCE": "#/components/schemas/TbResourceId", + "TENANT": "#/components/schemas/TenantId", + "TENANT_PROFILE": "#/components/schemas/TenantProfileId", + "USER": "#/components/schemas/UserId", + "WIDGETS_BUNDLE": "#/components/schemas/WidgetsBundleId", + "WIDGET_TYPE": "#/components/schemas/WidgetTypeId" + } + }, "properties": { "id": { "type": "string", @@ -140595,10 +142304,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "EntityType": { @@ -140792,9 +142497,6 @@ } } } - ], - "required": [ - "type" ] }, "EntityVersion": { @@ -140874,8 +142576,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -140896,32 +142597,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "EntityViewId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ENTITY_VIEW" - ], - "example": "ENTITY_VIEW" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "EntityViewInfo": { @@ -140995,8 +142681,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -141149,10 +142834,10 @@ } } }, - "message": { + "localizedMessage": { "type": "string" }, - "localizedMessage": { + "message": { "type": "string" } } @@ -141190,6 +142875,9 @@ } } }, + "localizedMessage": { + "type": "string" + }, "message": { "type": "string" }, @@ -141231,26 +142919,19 @@ } } }, - "message": { + "localizedMessage": { "type": "string" }, - "localizedMessage": { + "message": { "type": "string" } } } - }, - "localizedMessage": { - "type": "string" } } } } } - ], - "required": [ - "subType", - "type" ] }, "ErrorEventFilter": { @@ -141278,9 +142959,6 @@ } } } - ], - "required": [ - "eventType" ] }, "EscalatedNotificationRuleRecipientsConfig": { @@ -141307,8 +142985,7 @@ ], "description": "Escalated notification rule recipients configuration", "required": [ - "escalationTable", - "triggerType" + "escalationTable" ] }, "EventFilter": { @@ -141386,8 +143063,7 @@ }, "entityId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Entity Id for which event is created.", - "readOnly": true + "description": "JSON object with Entity Id for which event is created." }, "body": { "$ref": "#/components/schemas/JsonNode" @@ -141430,10 +143106,6 @@ "errorDetails": { "type": "string", "description": "A string containing details about the failure" - }, - "status": { - "type": "string", - "example": "FAILURE" } } } @@ -141450,22 +143122,22 @@ "FeaturesInfo": { "type": "object", "properties": { - "smsEnabled": { + "whiteLabelingEnabled": { "type": "boolean" }, - "oauthEnabled": { + "emailEnabled": { "type": "boolean" }, - "notificationEnabled": { + "smsEnabled": { "type": "boolean" }, - "whiteLabelingEnabled": { + "notificationEnabled": { "type": "boolean" }, - "twoFaEnabled": { + "oauthEnabled": { "type": "boolean" }, - "emailEnabled": { + "twoFaEnabled": { "type": "boolean" } } @@ -141620,25 +143292,24 @@ "entityCoordinates": { "$ref": "#/components/schemas/EntityCoordinates" }, - "zoneGroups": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ZoneGroupConfiguration" - } - }, "scheduledUpdateEnabled": { "type": "boolean" }, "scheduledUpdateInterval": { "type": "integer", "format": "int32" + }, + "zoneGroups": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ZoneGroupConfiguration" + } } } } ], "required": [ "entityCoordinates", - "output", "zoneGroups" ] }, @@ -141693,10 +143364,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -141808,10 +143475,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -141927,10 +143590,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -142067,25 +143726,13 @@ }, "GroupPermissionId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "GROUP_PERMISSION" - ], - "example": "GROUP_PERMISSION" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "GroupPermissionInfo": { @@ -142172,7 +143819,9 @@ "HasIdObject": { "type": "object", "properties": { - "id": {} + "id": { + + } } }, "HeaderFooter": { @@ -142276,10 +143925,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "History": { @@ -142356,10 +144001,6 @@ "description": "URL of the menu item icon. Overrides 'materialIcon'", "example": "My Custom Menu" }, - "visible": { - "type": "boolean", - "description": "Mark if menu item is visible for user" - }, "pages": { "type": "array", "description": "List of child menu items", @@ -142381,9 +144022,6 @@ } } } - ], - "required": [ - "type" ] }, "HomeMenuItemType": { @@ -142476,10 +144114,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "ImageSourceType": { @@ -142565,6 +144199,10 @@ "type": "boolean", "description": "Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet" }, + "edgeTemplate": { + "type": "boolean", + "description": "Boolean flag that specifies that is regular or edge template integration" + }, "version": { "type": "integer", "format": "int64" @@ -142595,10 +144233,6 @@ "$ref": "#/components/schemas/JsonNode", "description": "Additional parameters of the integration" }, - "edgeTemplate": { - "type": "boolean", - "description": "Boolean flag that specifies that is regular or edge template integration" - }, "remote": { "type": "boolean", "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" @@ -142628,32 +144262,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "IntegrationId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "INTEGRATION" - ], - "example": "INTEGRATION" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "IntegrationInfo": { @@ -142702,6 +144321,10 @@ "type": "boolean", "description": "Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet" }, + "edgeTemplate": { + "type": "boolean", + "description": "Boolean flag that specifies that is regular or edge template integration" + }, "version": { "type": "integer", "format": "int64" @@ -142712,10 +144335,6 @@ "stats": { "$ref": "#/components/schemas/ArrayNode" }, - "edgeTemplate": { - "type": "boolean", - "description": "Boolean flag that specifies that is regular or edge template integration" - }, "remote": { "type": "boolean", "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" @@ -142761,9 +144380,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "IntegrationLifecycleEventRecipientsConfig": { @@ -142926,25 +144542,13 @@ }, "JobId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "JOB" - ], - "example": "JOB" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "JobResult": { @@ -143033,7 +144637,9 @@ }, "JsonNode": { "description": "A value representing the any type (object or primitive)", - "example": {} + "example": { + + } }, "JsonTransportPayloadConfiguration": { "allOf": [ @@ -143238,10 +144844,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "LegendConfig": { @@ -143350,9 +144952,6 @@ } } } - ], - "required": [ - "eventType" ] }, "LimitedApi": { @@ -144054,9 +145653,6 @@ } } } - ], - "required": [ - "body" ] }, "MicrosoftTeamsNotificationTargetConfig": { @@ -144078,18 +145674,20 @@ "useOldApi": { "type": "boolean" }, - "id": {}, - "title": { - "type": "string" - }, "email": { "type": "string" }, "firstName": { "type": "string" + }, + "id": { + }, "lastName": { "type": "string" + }, + "title": { + "type": "string" } } } @@ -144142,10 +145740,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -144332,21 +145926,13 @@ }, "MobileAppBundleId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "example": "DEVICE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "MobileAppBundleInfo": { @@ -144447,27 +146033,18 @@ } ], "required": [ - "body", "subject" ] }, "MobileAppId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "example": "DEVICE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "MobileAppNotificationDeliveryMethodConfig": { @@ -144586,86 +146163,23 @@ { "type": "object", "properties": { - "enabled": { - "type": "boolean", - "description": "Indicates if self-registration is allowed via sign-up form" - }, - "title": { - "type": "string", - "description": "The text message to appear on login form" - }, - "captcha": { - "$ref": "#/components/schemas/CaptchaParams", - "description": "Captcha site key for 'I'm not a robot' validation" - }, - "signUpFields": { - "type": "array", - "description": "List of sign-up form fields", - "items": { - "$ref": "#/components/schemas/SignUpField" - } - }, - "showPrivacyPolicy": { - "type": "boolean", - "description": "Show or hide 'Privacy Policy'" - }, - "showTermsOfUse": { - "type": "boolean", - "description": "Show or hide 'Terms of Use'" - }, - "notificationRecipient": { - "$ref": "#/components/schemas/NotificationTargetId", - "description": "Recipient to use for notifications when new user self-registered." - }, - "customerTitlePrefix": { - "type": "string", - "description": "Prefix to add to created customer" - }, - "customerGroupId": { - "$ref": "#/components/schemas/EntityGroupId", - "description": "Id of the customer group customer wil be added to." - }, - "permissions": { - "type": "array", - "description": "Group Permissions to assign for the new customer user.", - "items": { - "$ref": "#/components/schemas/GroupPermission" - } - }, - "defaultDashboard": { - "$ref": "#/components/schemas/DefaultDashboardParams", - "description": "Default dashboard params" - }, - "homeDashboard": { - "$ref": "#/components/schemas/HomeDashboardParams", - "description": "Home dashboard params" - }, - "customMenuId": { - "$ref": "#/components/schemas/CustomMenuId", - "description": "Custom menu id" - }, "privacyPolicy": { "type": "string", "description": "Privacy policy text. Supports HTML." }, - "termsOfUse": { - "type": "string", - "description": "Terms of User text. Supports HTML." - }, "redirect": { "$ref": "#/components/schemas/MobileRedirectParams", "description": "Mobile redirect params." + }, + "termsOfUse": { + "type": "string", + "description": "Terms of User text. Supports HTML." } } } ], "required": [ - "captcha", - "permissions", - "redirect", - "signUpFields", - "title", - "type" + "redirect" ] }, "MobileSessionInfo": { @@ -144770,9 +146284,6 @@ { "$ref": "#/components/schemas/NotificationRuleTriggerConfig" } - ], - "required": [ - "triggerType" ] }, "NewPlatformVersionRecipientsConfig": { @@ -144991,25 +146502,13 @@ }, "NotificationId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION" - ], - "example": "NOTIFICATION" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "NotificationInfo": { @@ -145120,25 +146619,13 @@ }, "NotificationRequestId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION_REQUEST" - ], - "example": "NOTIFICATION_REQUEST" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "NotificationRequestInfo": { @@ -145332,32 +146819,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "NotificationRuleId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION_RULE" - ], - "example": "NOTIFICATION_RULE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "NotificationRuleInfo": { @@ -145442,10 +146914,7 @@ "triggerType": { "$ref": "#/components/schemas/NotificationRuleTriggerType" } - }, - "required": [ - "triggerType" - ] + } }, "NotificationRuleTriggerConfig": { "type": "object", @@ -145576,32 +147045,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "NotificationTargetId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION_TARGET" - ], - "example": "NOTIFICATION_TARGET" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "NotificationTemplate": { @@ -145669,32 +147123,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "NotificationTemplateId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "NOTIFICATION_TEMPLATE" - ], - "example": "NOTIFICATION_TEMPLATE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "NotificationType": { @@ -145910,8 +147349,7 @@ "readOnly": true }, "ownerId": { - "$ref": "#/components/schemas/EntityId", - "readOnly": true + "$ref": "#/components/schemas/EntityId" } }, "required": [ @@ -145930,21 +147368,13 @@ }, "OAuth2ClientId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "example": "DEVICE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "OAuth2ClientInfo": { @@ -146305,10 +147735,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -146420,10 +147846,6 @@ "maxRetries": { "type": "integer", "format": "int32" - }, - "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true } } }, @@ -146557,7 +147979,7 @@ "version": { "type": "string", "description": "OTA Package version.", - "example": 1.0 + "example": 1 }, "tag": { "type": "string", @@ -146610,34 +148032,34 @@ "data": { "type": "object", "properties": { - "short": { - "type": "integer", - "format": "int32" - }, "char": { "type": "string" }, - "int": { - "type": "integer", - "format": "int32" + "direct": { + "type": "boolean" }, - "long": { - "type": "integer", - "format": "int64" + "double": { + "type": "number", + "format": "double" }, "float": { "type": "number", "format": "float" }, - "double": { - "type": "number", - "format": "double" + "int": { + "type": "integer", + "format": "int32" }, - "direct": { - "type": "boolean" + "long": { + "type": "integer", + "format": "int64" }, "readOnly": { "type": "boolean" + }, + "short": { + "type": "integer", + "format": "int32" } } }, @@ -146657,32 +148079,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "OtaPackageId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "OTA_PACKAGE" - ], - "example": "OTA_PACKAGE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "OtaPackageInfo": { @@ -146721,7 +148128,7 @@ "version": { "type": "string", "description": "OTA Package version.", - "example": 1.0 + "example": 1 }, "tag": { "type": "string", @@ -146864,7 +148271,9 @@ "type" ] }, - "OutputStrategy": {}, + "OutputStrategy": { + + }, "PSKLwM2MBootstrapServerCredential": { "allOf": [ { @@ -146960,10 +148369,6 @@ { "$ref": "#/components/schemas/ReportComponent" } - ], - "required": [ - "subType", - "type" ] }, "PageDataAiModel": { @@ -149154,10 +150559,6 @@ } } } - ], - "required": [ - "components", - "format" ] }, "PieChartLabelPosition": { @@ -149318,6 +150719,9 @@ { "type": "object", "properties": { + "applyExpressionToResolvedArguments": { + "type": "boolean" + }, "arguments": { "type": "object", "additionalProperties": { @@ -149330,16 +150734,12 @@ }, "relation": { "$ref": "#/components/schemas/RelationPathLevel" - }, - "applyExpressionToResolvedArguments": { - "type": "boolean" } } } ], "required": [ "arguments", - "output", "relation" ] }, @@ -149541,25 +150941,13 @@ }, "QueueId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "QUEUE" - ], - "example": "QUEUE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "QueueStats": { @@ -149588,25 +150976,13 @@ }, "QueueStatsId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "QUEUE_STATS" - ], - "example": "QUEUE_STATS" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "QuickTimeInterval": { @@ -149745,9 +151121,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "RateLimitsRecipientsConfig": { @@ -149801,9 +151174,6 @@ } } } - ], - "required": [ - "eventType" ] }, "ReadTsKvQueryResult": { @@ -149847,9 +151217,6 @@ { "type": "object", "properties": { - "relation": { - "$ref": "#/components/schemas/RelationPathLevel" - }, "arguments": { "type": "object", "additionalProperties": { @@ -149868,14 +151235,17 @@ }, "minProperties": 1 }, - "useLatestTs": { + "relation": { + "$ref": "#/components/schemas/RelationPathLevel" + }, + "scheduledUpdateEnabled": { "type": "boolean" }, "scheduledUpdateInterval": { "type": "integer", "format": "int32" }, - "scheduledUpdateEnabled": { + "useLatestTs": { "type": "boolean" } } @@ -149884,7 +151254,6 @@ "required": [ "arguments", "metrics", - "output", "relation" ] }, @@ -150090,8 +151459,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" } }, "required": [ @@ -150277,25 +151645,13 @@ }, "ReportId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "REPORT" - ], - "example": "REPORT" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "ReportInfo": { @@ -150341,8 +151697,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" } }, "required": [ @@ -150403,9 +151758,6 @@ } } } - ], - "required": [ - "tasksKey" ] }, "ReportJobResult": { @@ -150681,8 +152033,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" } }, "required": [ @@ -150706,12 +152057,6 @@ "$ref": "#/components/schemas/TbReportFormat", "description": "Report format" }, - "entityAliases": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityAlias" - } - }, "filters": { "type": "array", "items": { @@ -150729,6 +152074,12 @@ }, "timeDataPattern": { "type": "string" + }, + "entityAliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityAlias" + } } }, "required": [ @@ -150740,32 +152091,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "ReportTemplateId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "REPORT_TEMPLATE" - ], - "example": "REPORT_TEMPLATE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "ReportTemplateInfo": { @@ -150826,8 +152162,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" } }, "required": [ @@ -150902,15 +152237,15 @@ "legendValueColor": { "type": "string" }, - "xaxis": { - "$ref": "#/components/schemas/TimeSeriesChartXAxisSettings" - }, "yaxes": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TimeSeriesChartYAxisSettings" } }, + "xaxis": { + "$ref": "#/components/schemas/TimeSeriesChartXAxisSettings" + }, "thresholds": { "type": "array", "items": { @@ -151201,9 +152536,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "RichTextComponent": { @@ -151245,10 +152577,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "Role": { @@ -151295,8 +152623,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -151317,32 +152644,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "RoleId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "ROLE" - ], - "example": "ROLE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "RoleType": { @@ -151406,25 +152718,13 @@ }, "RpcId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "RPC" - ], - "example": "RPC" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "RpcStatus": { @@ -151574,18 +152874,15 @@ "type": "string", "description": "String value representing the message" }, + "error": { + "type": "boolean" + }, "isError": { "type": "boolean", "writeOnly": true - }, - "error": { - "type": "boolean" } } } - ], - "required": [ - "eventType" ] }, "RuleChainExportData": { @@ -151601,32 +152898,17 @@ } } } - ], - "required": [ - "entityType" ] }, "RuleChainId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "RULE_CHAIN" - ], - "example": "RULE_CHAIN" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "RuleChainImportResult": { @@ -151784,9 +153066,6 @@ } } } - ], - "required": [ - "triggerType" ] }, "RuleEngineComponentLifecycleEventRecipientsConfig": { @@ -151947,41 +153226,26 @@ "description": "The case insensitive 'contains' filter based on metadata (key and value) for the message.", "example": "deviceName" }, + "error": { + "type": "boolean" + }, "isError": { "type": "boolean", "writeOnly": true - }, - "error": { - "type": "boolean" } } } - ], - "required": [ - "eventType" ] }, "RuleNodeId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "RULE_NODE" - ], - "example": "RULE_NODE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "SaveDeviceWithCredentialsRequest": { @@ -152039,7 +153303,7 @@ "version": { "type": "string", "description": "OTA Package version.", - "example": 1.0 + "example": 1 }, "tag": { "type": "string", @@ -152132,211 +153396,85 @@ }, "originatorId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Originator Id", - "readOnly": true - }, - "name": { - "type": "string", - "description": "scheduler event name", - "example": "Weekly Dashboard Report" - }, - "type": { - "type": "string", - "description": "scheduler event type", - "example": "generateReport" - }, - "schedule": { - "$ref": "#/components/schemas/JsonNode", - "description": "a JSON value with schedule time configuration" - }, - "enabled": { - "type": "boolean", - "description": "Enable/disable scheduler", - "example": true - }, - "version": { - "type": "integer", - "format": "int64" - }, - "templateInfo": { - "$ref": "#/components/schemas/EntityInfo", - "description": "Report template info", - "readOnly": true - }, - "customerTitle": { - "type": "string", - "description": "Customer title", - "readOnly": true - }, - "userName": { - "type": "string", - "description": "Report user name", - "readOnly": true - }, - "ownerId": { - "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true - }, - "additionalInfo": { - "$ref": "#/components/schemas/JsonNode", - "description": "Additional parameters of the scheduler event" - } - } - }, - "SchedulerEvent": { - "type": "object", - "description": "A JSON value representing the Scheduler Event.", - "properties": { - "id": { - "$ref": "#/components/schemas/SchedulerEventId", - "description": "JSON object with the scheduler event Id. Specify this field to update the scheduler event. Referencing non-existing scheduler event Id will cause error. Omit this field to create new scheduler event" - }, - "createdTime": { - "type": "integer", - "format": "int64", - "description": "Timestamp of the scheduler event creation, in milliseconds", - "example": 1609459200000, - "readOnly": true - }, - "tenantId": { - "$ref": "#/components/schemas/TenantId", - "description": "JSON object with Tenant Id", - "readOnly": true - }, - "customerId": { - "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", - "readOnly": true - }, - "originatorId": { - "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Originator Id", - "readOnly": true - }, - "name": { - "type": "string", - "description": "scheduler event name", - "example": "Weekly Dashboard Report" - }, - "type": { - "type": "string", - "description": "scheduler event type", - "example": "generateReport" - }, - "schedule": { - "$ref": "#/components/schemas/JsonNode", - "description": "a JSON value with schedule time configuration" - }, - "enabled": { - "type": "boolean", - "description": "Enable/disable scheduler", - "example": true - }, - "version": { - "type": "integer", - "format": "int64" - }, - "configuration": { - "$ref": "#/components/schemas/JsonNode" - }, - "ownerId": { - "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true - }, - "additionalInfo": { - "$ref": "#/components/schemas/JsonNode", - "description": "Additional parameters of the scheduler event" - } - } - }, - "SchedulerEventExportData": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityExportData" - } - ], - "required": [ - "entityType" - ] - }, - "SchedulerEventFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityFilter" - }, - { - "type": "object", - "properties": { - "originator": { - "$ref": "#/components/schemas/AliasEntityId" - }, - "eventType": { - "type": "string" - }, - "originatorStateEntity": { - "type": "boolean" - }, - "defaultStateEntity": { - "$ref": "#/components/schemas/AliasEntityId" - } - } - } - ] - }, - "SchedulerEventId": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "SCHEDULER_EVENT" - ], - "example": "SCHEDULER_EVENT" - } - }, - "required": [ - "entityType", - "id" - ] - }, - "SchedulerEventInfo": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/SchedulerEventId", - "description": "JSON object with the scheduler event Id. Specify this field to update the scheduler event. Referencing non-existing scheduler event Id will cause error. Omit this field to create new scheduler event" - }, - "createdTime": { - "type": "integer", - "format": "int64", - "description": "Timestamp of the scheduler event creation, in milliseconds", - "example": 1609459200000, - "readOnly": true - }, - "tenantId": { - "$ref": "#/components/schemas/TenantId", - "description": "JSON object with Tenant Id", - "readOnly": true - }, - "customerId": { - "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", - "readOnly": true - }, - "originatorId": { - "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Originator Id", + "description": "JSON object with Originator Id" + }, + "name": { + "type": "string", + "description": "scheduler event name", + "example": "Weekly Dashboard Report" + }, + "type": { + "type": "string", + "description": "scheduler event type", + "example": "generateReport" + }, + "schedule": { + "$ref": "#/components/schemas/JsonNode", + "description": "a JSON value with schedule time configuration" + }, + "enabled": { + "type": "boolean", + "description": "Enable/disable scheduler", + "example": true + }, + "version": { + "type": "integer", + "format": "int64" + }, + "templateInfo": { + "$ref": "#/components/schemas/EntityInfo", + "description": "Report template info", + "readOnly": true + }, + "customerTitle": { + "type": "string", + "description": "Customer title", + "readOnly": true + }, + "userName": { + "type": "string", + "description": "Report user name", + "readOnly": true + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the scheduler event" + } + } + }, + "SchedulerEvent": { + "type": "object", + "description": "A JSON value representing the Scheduler Event.", + "properties": { + "id": { + "$ref": "#/components/schemas/SchedulerEventId", + "description": "JSON object with the scheduler event Id. Specify this field to update the scheduler event. Referencing non-existing scheduler event Id will cause error. Omit this field to create new scheduler event" + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the scheduler event creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id", "readOnly": true }, + "originatorId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Originator Id" + }, "name": { "type": "string", "description": "scheduler event name", @@ -152360,11 +153498,116 @@ "type": "integer", "format": "int64" }, + "configuration": { + "$ref": "#/components/schemas/JsonNode" + }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", + "description": "JSON object with Customer or Tenant Id" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the scheduler event" + } + } + }, + "SchedulerEventExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ] + }, + "SchedulerEventFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "originator": { + "$ref": "#/components/schemas/AliasEntityId" + }, + "eventType": { + "type": "string" + }, + "originatorStateEntity": { + "type": "boolean" + }, + "defaultStateEntity": { + "$ref": "#/components/schemas/AliasEntityId" + } + } + } + ] + }, + "SchedulerEventId": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" + }, + { + "type": "object" + } + ] + }, + "SchedulerEventInfo": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/SchedulerEventId", + "description": "JSON object with the scheduler event Id. Specify this field to update the scheduler event. Referencing non-existing scheduler event Id will cause error. Omit this field to create new scheduler event" + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the scheduler event creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id", "readOnly": true }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id", + "readOnly": true + }, + "originatorId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Originator Id" + }, + "name": { + "type": "string", + "description": "scheduler event name", + "example": "Weekly Dashboard Report" + }, + "type": { + "type": "string", + "description": "scheduler event type", + "example": "generateReport" + }, + "schedule": { + "$ref": "#/components/schemas/JsonNode", + "description": "a JSON value with schedule time configuration" + }, + "enabled": { + "type": "boolean", + "description": "Enable/disable scheduler", + "example": true + }, + "version": { + "type": "integer", + "format": "int64" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id" + }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", "description": "Additional parameters of the scheduler event" @@ -152397,8 +153640,7 @@ }, "originatorId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Originator Id", - "readOnly": true + "description": "JSON object with Originator Id" }, "name": { "type": "string", @@ -152442,8 +153684,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -152473,8 +153714,7 @@ } ], "required": [ - "arguments", - "output" + "arguments" ] }, "ScriptLanguage": { @@ -152534,25 +153774,13 @@ }, "SecretId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "SECRET" - ], - "example": "SECRET" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "SecretInfo": { @@ -152655,53 +153883,53 @@ } }, "properties": { - "permissions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GroupPermission" - } - }, "type": { "$ref": "#/components/schemas/SelfRegistrationType" }, - "showPrivacyPolicy": { - "type": "boolean" - }, - "showTermsOfUse": { + "enabled": { "type": "boolean" }, "title": { "type": "string" }, - "enabled": { - "type": "boolean" + "captcha": { + "$ref": "#/components/schemas/CaptchaParams" }, - "homeDashboard": { - "$ref": "#/components/schemas/HomeDashboardParams" + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupPermission" + } }, "notificationRecipient": { "$ref": "#/components/schemas/NotificationTargetId" }, - "captcha": { - "$ref": "#/components/schemas/CaptchaParams" - }, "signUpFields": { "type": "array", "items": { "$ref": "#/components/schemas/SignUpField" } }, - "defaultDashboard": { - "$ref": "#/components/schemas/DefaultDashboardParams" - }, "customerTitlePrefix": { "type": "string" }, - "customMenuId": { - "$ref": "#/components/schemas/CustomMenuId" + "showPrivacyPolicy": { + "type": "boolean" + }, + "showTermsOfUse": { + "type": "boolean" + }, + "defaultDashboard": { + "$ref": "#/components/schemas/DefaultDashboardParams" + }, + "homeDashboard": { + "$ref": "#/components/schemas/HomeDashboardParams" }, "customerGroupId": { "$ref": "#/components/schemas/EntityGroupId" + }, + "customMenuId": { + "$ref": "#/components/schemas/CustomMenuId" } }, "required": [ @@ -152715,7 +153943,9 @@ "MOBILE" ] }, - "ServerSentEventString": {}, + "ServerSentEventString": { + + }, "ShareGroupRequest": { "type": "object", "description": "The Share Group Request JSON", @@ -152764,9 +153994,6 @@ } } } - ], - "required": [ - "spec" ] }, "ShortCustomerInfo": { @@ -152794,8 +154021,7 @@ "properties": { "id": { "$ref": "#/components/schemas/EntityId", - "description": "Entity Id object", - "readOnly": true + "description": "Entity Id object" }, "name": { "type": "string", @@ -152962,8 +154188,7 @@ } ], "required": [ - "arguments", - "output" + "arguments" ] }, "SimpleEntity": { @@ -153009,9 +154234,6 @@ } } } - ], - "required": [ - "type" ] }, "SingleEntityVersionLoadRequest": { @@ -153033,9 +154255,6 @@ } } } - ], - "required": [ - "type" ] }, "SlackConversation": { @@ -153081,9 +154300,6 @@ { "$ref": "#/components/schemas/DeliveryMethodNotificationTemplate" } - ], - "required": [ - "body" ] }, "SlackNotificationDeliveryMethodConfig": { @@ -153229,9 +154445,6 @@ { "$ref": "#/components/schemas/DeliveryMethodNotificationTemplate" } - ], - "required": [ - "body" ] }, "SmsProviderConfiguration": { @@ -153546,10 +154759,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "StarredDashboardInfo": { @@ -153644,9 +154853,6 @@ } } } - ], - "required": [ - "eventType" ] }, "StoreInfo": { @@ -153720,10 +154926,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "SubmitStrategy": { @@ -153848,33 +155050,11 @@ }, "SubscriptionEntry": { "description": "Subscription entry", - "enum": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 30, - 31 - ] + "enum": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 30, 31] }, "SubscriptionExceptionErrorCode": { "description": "Subscription error code", - "enum": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7 - ] + "enum": [1, 2, 3, 4, 5, 6, 7] }, "SubscriptionId": { "type": "object", @@ -154062,10 +155242,6 @@ "generatedContent": { "type": "string", "description": "The text content generated by the model" - }, - "status": { - "type": "string", - "example": "SUCCESS" } } } @@ -154143,7 +155319,9 @@ } } }, - "SystemLevelUsersFilter": {}, + "SystemLevelUsersFilter": { + + }, "TableSortOrder": { "type": "object", "properties": { @@ -154160,9 +155338,6 @@ { "$ref": "#/components/schemas/NotificationRuleTriggerConfig" } - ], - "required": [ - "triggerType" ] }, "TaskProcessingFailureRecipientsConfig": { @@ -154415,32 +155590,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "TbResourceId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "TB_RESOURCE" - ], - "example": "TB_RESOURCE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "TbResourceInfo": { @@ -154700,9 +155860,6 @@ } } } - ], - "required": [ - "spec" ] }, "Tenant": { @@ -154930,25 +156087,13 @@ }, "TenantId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "TENANT" - ], - "example": "TENANT" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "TenantInfo": { @@ -155147,25 +156292,13 @@ }, "TenantProfileId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "TENANT_PROFILE" - ], - "example": "TENANT_PROFILE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "TenantProfileQueueConfiguration": { @@ -155410,24 +156543,7 @@ }, "ThingsboardErrorCode": { "description": "Platform error code", - "enum": [ - 2, - 10, - 11, - 15, - 20, - 30, - 31, - 32, - 33, - 34, - 35, - 40, - 41, - 45, - 46, - 50 - ] + "enum": [2, 10, 11, 15, 20, 30, 31, 32, 33, 34, 35, 40, 41, 45, 46, 50] }, "ThingsboardErrorResponse": { "properties": { @@ -155559,9 +156675,6 @@ } } } - ], - "required": [ - "type" ] }, "TimeSeriesChartNoAggregationBarWidthSettings": { @@ -155871,12 +156984,7 @@ "$ref": "#/components/schemas/Output" }, { - "type": "object", - "properties": { - "strategy": { - "$ref": "#/components/schemas/TimeSeriesOutputStrategy" - } - } + "type": "object" } ] }, @@ -155986,10 +157094,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "TimeseriesTableComponent": { @@ -156052,10 +157156,6 @@ } } } - ], - "required": [ - "subType", - "type" ] }, "ToCoreEdqsRequest": { @@ -156085,9 +157185,6 @@ } } } - ], - "required": [ - "spec" ] }, "ToServerRpcRequestSnmpCommunicationConfig": { @@ -156106,9 +157203,6 @@ } } } - ], - "required": [ - "spec" ] }, "Token": { @@ -156245,27 +157339,39 @@ "properties": { "metricSummaryItems": { "type": "array", - "items": {} + "items": { + + } }, "anomalyModelSummaryItems": { "type": "array", - "items": {} + "items": { + + } }, "calculationFieldSummaryItems": { "type": "array", - "items": {} + "items": { + + } }, "predictionModelSummaryItems": { "type": "array", - "items": {} + "items": { + + } }, "viewSummaryItems": { "type": "array", - "items": {} + "items": { + + } }, "aiSummaryItems": { "type": "array", - "items": {} + "items": { + + } } } }, @@ -156348,7 +157454,9 @@ }, "runtimeFilters": { "type": "array", - "items": {} + "items": { + + } } } }, @@ -156388,23 +157496,25 @@ "type": "integer", "format": "int64" }, - "value": {}, + "value": { + + }, "key": { "type": "string" }, - "booleanValue": { - "type": "boolean" - }, - "valueAsString": { - "type": "string" + "doubleValue": { + "type": "number", + "format": "double" }, "longValue": { "type": "integer", "format": "int64" }, - "doubleValue": { - "type": "number", - "format": "double" + "booleanValue": { + "type": "boolean" + }, + "valueAsString": { + "type": "string" }, "dataType": { "$ref": "#/components/schemas/DataType" @@ -156763,8 +157873,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -156865,25 +157974,13 @@ }, "UserId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "USER" - ], - "example": "USER" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "UserInfo": { @@ -156961,8 +158058,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id", - "readOnly": true + "description": "JSON object with Customer or Tenant Id" }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -157161,9 +158257,6 @@ } } } - ], - "required": [ - "version" ] }, "V3CaptchaParams": { @@ -157188,9 +158281,6 @@ } } } - ], - "required": [ - "version" ] }, "ValueSourceType": { @@ -157212,7 +158302,9 @@ } } }, - "Version": {}, + "Version": { + + }, "VersionCreateConfig": { "type": "object", "properties": { @@ -157419,7 +158511,6 @@ } ], "required": [ - "body", "subject" ] }, @@ -157431,63 +158522,9 @@ { "type": "object", "properties": { - "enabled": { - "type": "boolean", - "description": "Indicates if self-registration is allowed via sign-up form" - }, - "title": { - "type": "string", - "description": "The text message to appear on login form" - }, - "captcha": { - "$ref": "#/components/schemas/CaptchaParams", - "description": "Captcha site key for 'I'm not a robot' validation" - }, - "signUpFields": { - "type": "array", - "description": "List of sign-up form fields", - "items": { - "$ref": "#/components/schemas/SignUpField" - } - }, - "showPrivacyPolicy": { - "type": "boolean", - "description": "Show or hide 'Privacy Policy'" - }, - "showTermsOfUse": { - "type": "boolean", - "description": "Show or hide 'Terms of Use'" - }, - "notificationRecipient": { - "$ref": "#/components/schemas/NotificationTargetId", - "description": "Recipient to use for notifications when new user self-registered." - }, - "customerTitlePrefix": { - "type": "string", - "description": "Prefix to add to created customer" - }, - "customerGroupId": { - "$ref": "#/components/schemas/EntityGroupId", - "description": "Id of the customer group customer wil be added to." - }, - "permissions": { - "type": "array", - "description": "Group Permissions to assign for the new customer user.", - "items": { - "$ref": "#/components/schemas/GroupPermission" - } - }, - "defaultDashboard": { - "$ref": "#/components/schemas/DefaultDashboardParams", - "description": "Default dashboard params" - }, - "homeDashboard": { - "$ref": "#/components/schemas/HomeDashboardParams", - "description": "Home dashboard params" - }, - "customMenuId": { - "$ref": "#/components/schemas/CustomMenuId", - "description": "Custom menu id" + "domainId": { + "$ref": "#/components/schemas/DomainId", + "description": "Domain name for self registration URL. Typically this matches the domain name from the Login White Labeling page." }, "privacyPolicy": { "type": "string", @@ -157496,21 +158533,12 @@ "termsOfUse": { "type": "string", "description": "Terms of User text. Supports HTML." - }, - "domainId": { - "$ref": "#/components/schemas/DomainId", - "description": "Domain name for self registration URL. Typically this matches the domain name from the Login White Labeling page." } } } ], "required": [ - "captcha", - "domainId", - "permissions", - "signUpFields", - "title", - "type" + "domainId" ] }, "WebViewPage": { @@ -157526,11 +158554,6 @@ "description": "Page label", "example": "Air quality" }, - "visible": { - "type": "boolean", - "description": "Indicates if page is visible", - "example": true - }, "icon": { "type": "string", "description": "URL of the page icon", @@ -157543,10 +158566,6 @@ } } } - ], - "required": [ - "type", - "visible" ] }, "WeekInterval": { @@ -157844,32 +158863,17 @@ { "$ref": "#/components/schemas/EntityExportData" } - ], - "required": [ - "entityType" ] }, "WidgetTypeId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "WIDGET_TYPE" - ], - "example": "WIDGET_TYPE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "WidgetTypeInfo": { @@ -158032,32 +159036,17 @@ } } } - ], - "required": [ - "entityType" ] }, "WidgetsBundleId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" }, - "entityType": { - "$ref": "#/components/schemas/EntityType", - "description": "string", - "enum": [ - "WIDGETS_BUNDLE" - ], - "example": "WIDGETS_BUNDLE" + { + "type": "object" } - }, - "required": [ - "entityType", - "id" ] }, "X509CertificateChainProvisionConfiguration": { @@ -158232,10 +159221,10 @@ }, "ApiKeyForm": { "type": "apiKey", - "description": "Enter the API key value with 'ApiKey' prefix in format: **ApiKey **\n\nExample: **ApiKey tb_5te51SkLRYpjGrujUGwqkjFvooWBlQpVe2An2Dr3w13wjfxDW**\n\n
**NOTE**: Use only ONE authentication method at a time. If both are authorized, JWT auth takes the priority.
\n", + "description": "Enter the API key value with 'ApiKey' prefix in format: **ApiKey \u003Cyour_api_key_value\u003E**\n\nExample: **ApiKey tb_5te51SkLRYpjGrujUGwqkjFvooWBlQpVe2An2Dr3w13wjfxDW**\n\n\u003Cbr\u003E**NOTE**: Use only ONE authentication method at a time. If both are authorized, JWT auth takes the priority.\u003Cbr\u003E\n", "name": "X-Authorization", "in": "header" } } } -} +} \ No newline at end of file diff --git a/paas/src/main/java/org/thingsboard/client/api/ThingsboardApi.java b/paas/src/main/java/org/thingsboard/client/api/ThingsboardApi.java index e9794ba0..6aa0e7da 100644 --- a/paas/src/main/java/org/thingsboard/client/api/ThingsboardApi.java +++ b/paas/src/main/java/org/thingsboard/client/api/ThingsboardApi.java @@ -35850,6 +35850,157 @@ private HttpRequest.Builder getDefaultTenantProfileInfoRequestBuilder(Map headers) throws ApiException { + ApiResponse localVarResponse = getDeviceAttributesWithHttpInfo(deviceToken, clientKeys, sharedKeys, headers); + return localVarResponse.getData(); + } + + /** + * Get attributes (getDeviceAttributes) + * Returns all attributes that belong to device. Use optional 'clientKeys' and/or 'sharedKeys' parameter to return specific attributes. Example of the result: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param clientKeys Comma separated key names for attribute with client scope (required) + * @param sharedKeys Comma separated key names for attribute with shared scope (required) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getDeviceAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String clientKeys, @javax.annotation.Nonnull String sharedKeys) throws ApiException { + return getDeviceAttributesWithHttpInfo(deviceToken, clientKeys, sharedKeys, null); + } + + /** + * Get attributes (getDeviceAttributes) + * Returns all attributes that belong to device. Use optional 'clientKeys' and/or 'sharedKeys' parameter to return specific attributes. Example of the result: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param clientKeys Comma separated key names for attribute with client scope (required) + * @param sharedKeys Comma separated key names for attribute with shared scope (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getDeviceAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String clientKeys, @javax.annotation.Nonnull String sharedKeys, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDeviceAttributesRequestBuilder(deviceToken, clientKeys, sharedKeys, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getDeviceAttributes", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getDeviceAttributesRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String clientKeys, @javax.annotation.Nonnull String sharedKeys, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling getDeviceAttributes"); + } + // verify the required parameter 'clientKeys' is set + if (clientKeys == null) { + throw new ApiException(400, "Missing the required parameter 'clientKeys' when calling getDeviceAttributes"); + } + // verify the required parameter 'sharedKeys' is set + if (sharedKeys == null) { + throw new ApiException(400, "Missing the required parameter 'sharedKeys' when calling getDeviceAttributes"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/attributes" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "clientKeys"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("clientKeys", clientKeys)); + localVarQueryParameterBaseName = "sharedKeys"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sharedKeys", sharedKeys)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get Device (getDeviceById) * Fetch the Device object based on the provided Device Id. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -44207,6 +44358,169 @@ private HttpRequest.Builder getFeaturesInfoRequestBuilder(Map he return localVarRequestBuilder; } + /** + * Get Device Firmware (getFirmware) + * Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the firmware, corresponds to the value of 'fw_title' attribute. (required) + * @param version Version of the firmware, corresponds to the value of 'fw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @return String + * @throws ApiException if fails to make API call + */ + public String getFirmware(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk) throws ApiException { + return getFirmware(deviceToken, title, version, size, chunk, null); + } + + /** + * Get Device Firmware (getFirmware) + * Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the firmware, corresponds to the value of 'fw_title' attribute. (required) + * @param version Version of the firmware, corresponds to the value of 'fw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String getFirmware(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { + ApiResponse localVarResponse = getFirmwareWithHttpInfo(deviceToken, title, version, size, chunk, headers); + return localVarResponse.getData(); + } + + /** + * Get Device Firmware (getFirmware) + * Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the firmware, corresponds to the value of 'fw_title' attribute. (required) + * @param version Version of the firmware, corresponds to the value of 'fw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getFirmwareWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk) throws ApiException { + return getFirmwareWithHttpInfo(deviceToken, title, version, size, chunk, null); + } + + /** + * Get Device Firmware (getFirmware) + * Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the firmware, corresponds to the value of 'fw_title' attribute. (required) + * @param version Version of the firmware, corresponds to the value of 'fw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getFirmwareWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getFirmwareRequestBuilder(deviceToken, title, version, size, chunk, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getFirmware", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getFirmwareRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling getFirmware"); + } + // verify the required parameter 'title' is set + if (title == null) { + throw new ApiException(400, "Missing the required parameter 'title' when calling getFirmware"); + } + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException(400, "Missing the required parameter 'version' when calling getFirmware"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/firmware" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "title"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("title", title)); + localVarQueryParameterBaseName = "version"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("version", version)); + localVarQueryParameterBaseName = "size"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("size", size)); + localVarQueryParameterBaseName = "chunk"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("chunk", chunk)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * getFirmwareById * @@ -60098,6 +60412,169 @@ private HttpRequest.Builder getSignUpSelfRegistrationParamsRequestBuilder(@javax return localVarRequestBuilder; } + /** + * Get Device Software (getSoftware) + * Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the software, corresponds to the value of 'sw_title' attribute. (required) + * @param version Version of the software, corresponds to the value of 'sw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @return String + * @throws ApiException if fails to make API call + */ + public String getSoftware(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk) throws ApiException { + return getSoftware(deviceToken, title, version, size, chunk, null); + } + + /** + * Get Device Software (getSoftware) + * Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the software, corresponds to the value of 'sw_title' attribute. (required) + * @param version Version of the software, corresponds to the value of 'sw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String getSoftware(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { + ApiResponse localVarResponse = getSoftwareWithHttpInfo(deviceToken, title, version, size, chunk, headers); + return localVarResponse.getData(); + } + + /** + * Get Device Software (getSoftware) + * Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the software, corresponds to the value of 'sw_title' attribute. (required) + * @param version Version of the software, corresponds to the value of 'sw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getSoftwareWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk) throws ApiException { + return getSoftwareWithHttpInfo(deviceToken, title, version, size, chunk, null); + } + + /** + * Get Device Software (getSoftware) + * Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param title Title of the software, corresponds to the value of 'sw_title' attribute. (required) + * @param version Version of the software, corresponds to the value of 'sw_version' attribute. (required) + * @param size Size of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @param chunk Index of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getSoftwareWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getSoftwareRequestBuilder(deviceToken, title, version, size, chunk, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getSoftware", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getSoftwareRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling getSoftware"); + } + // verify the required parameter 'title' is set + if (title == null) { + throw new ApiException(400, "Missing the required parameter 'title' when calling getSoftware"); + } + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException(400, "Missing the required parameter 'version' when calling getSoftware"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/software" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "title"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("title", title)); + localVarQueryParameterBaseName = "version"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("version", version)); + localVarQueryParameterBaseName = "size"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("size", size)); + localVarQueryParameterBaseName = "chunk"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("chunk", chunk)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get Solution template details (getSolutionTemplateDetails) * Get a solution template details based on the provided id Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -77675,6 +78152,387 @@ private HttpRequest.Builder performTrendzHealthcheckRequestBuilder(Map headers) throws ApiException { + ApiResponse localVarResponse = postDeviceAttributesWithHttpInfo(deviceToken, body, headers); + return localVarResponse.getData(); + } + + /** + * Post attributes (postDeviceAttributes) + * Post client attribute updates on behalf of device. Example of the request: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body JSON with attribute key-value pairs. See API call description for example. (required) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse postDeviceAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { + return postDeviceAttributesWithHttpInfo(deviceToken, body, null); + } + + /** + * Post attributes (postDeviceAttributes) + * Post client attribute updates on behalf of device. Example of the request: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body JSON with attribute key-value pairs. See API call description for example. (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse postDeviceAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = postDeviceAttributesRequestBuilder(deviceToken, body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("postDeviceAttributes", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder postDeviceAttributesRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling postDeviceAttributes"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling postDeviceAttributes"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/attributes" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Send the RPC command (postRpcRequest) + * Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body The RPC request JSON (required) + * @return String + * @throws ApiException if fails to make API call + */ + public String postRpcRequest(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { + return postRpcRequest(deviceToken, body, null); + } + + /** + * Send the RPC command (postRpcRequest) + * Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body The RPC request JSON (required) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String postRpcRequest(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = postRpcRequestWithHttpInfo(deviceToken, body, headers); + return localVarResponse.getData(); + } + + /** + * Send the RPC command (postRpcRequest) + * Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body The RPC request JSON (required) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse postRpcRequestWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { + return postRpcRequestWithHttpInfo(deviceToken, body, null); + } + + /** + * Send the RPC command (postRpcRequest) + * Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body The RPC request JSON (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse postRpcRequestWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = postRpcRequestRequestBuilder(deviceToken, body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("postRpcRequest", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder postRpcRequestRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling postRpcRequest"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling postRpcRequest"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/rpc" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Post time series data (postTelemetry) + * Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (required) + * @return String + * @throws ApiException if fails to make API call + */ + public String postTelemetry(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { + return postTelemetry(deviceToken, body, null); + } + + /** + * Post time series data (postTelemetry) + * Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (required) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String postTelemetry(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = postTelemetryWithHttpInfo(deviceToken, body, headers); + return localVarResponse.getData(); + } + + /** + * Post time series data (postTelemetry) + * Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (required) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse postTelemetryWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { + return postTelemetryWithHttpInfo(deviceToken, body, null); + } + + /** + * Post time series data (postTelemetry) + * Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse postTelemetryWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = postTelemetryRequestBuilder(deviceToken, body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("postTelemetry", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder postTelemetryRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling postTelemetry"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling postTelemetry"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/telemetry" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Preview Login White Labeling configuration (saveWhiteLabelParams) * Merge the White Labeling configuration with the parent configuration and return the result. Security check is performed to verify that the user has 'WRITE' permission for the white labeling resource. @@ -78031,50 +78889,173 @@ private HttpRequest.Builder processAssetBulkImportRequestBuilder(@javax.annotati } /** - * Import the bulk of devices (processDevicesBulkImport) - * There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Import the bulk of devices (processDevicesBulkImport) + * There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * @param bulkImportRequest (required) + * @return BulkImportResultDevice + * @throws ApiException if fails to make API call + */ + public BulkImportResultDevice processDevicesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { + return processDevicesBulkImport(bulkImportRequest, null); + } + + /** + * Import the bulk of devices (processDevicesBulkImport) + * There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * @param bulkImportRequest (required) + * @param headers Optional headers to include in the request + * @return BulkImportResultDevice + * @throws ApiException if fails to make API call + */ + public BulkImportResultDevice processDevicesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + ApiResponse localVarResponse = processDevicesBulkImportWithHttpInfo(bulkImportRequest, headers); + return localVarResponse.getData(); + } + + /** + * Import the bulk of devices (processDevicesBulkImport) + * There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * @param bulkImportRequest (required) + * @return ApiResponse<BulkImportResultDevice> + * @throws ApiException if fails to make API call + */ + public ApiResponse processDevicesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { + return processDevicesBulkImportWithHttpInfo(bulkImportRequest, null); + } + + /** + * Import the bulk of devices (processDevicesBulkImport) + * There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * @param bulkImportRequest (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<BulkImportResultDevice> + * @throws ApiException if fails to make API call + */ + public ApiResponse processDevicesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = processDevicesBulkImportRequestBuilder(bulkImportRequest, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("processDevicesBulkImport", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + BulkImportResultDevice responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder processDevicesBulkImportRequestBuilder(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + // verify the required parameter 'bulkImportRequest' is set + if (bulkImportRequest == null) { + throw new ApiException(400, "Missing the required parameter 'bulkImportRequest' when calling processDevicesBulkImport"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/device/bulk_import"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(bulkImportRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Import the bulk of edges (processEdgesBulkImport) + * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param bulkImportRequest (required) - * @return BulkImportResultDevice + * @return BulkImportResultEdge * @throws ApiException if fails to make API call */ - public BulkImportResultDevice processDevicesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { - return processDevicesBulkImport(bulkImportRequest, null); + public BulkImportResultEdge processEdgesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { + return processEdgesBulkImport(bulkImportRequest, null); } /** - * Import the bulk of devices (processDevicesBulkImport) - * There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Import the bulk of edges (processEdgesBulkImport) + * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param bulkImportRequest (required) * @param headers Optional headers to include in the request - * @return BulkImportResultDevice + * @return BulkImportResultEdge * @throws ApiException if fails to make API call */ - public BulkImportResultDevice processDevicesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { - ApiResponse localVarResponse = processDevicesBulkImportWithHttpInfo(bulkImportRequest, headers); + public BulkImportResultEdge processEdgesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + ApiResponse localVarResponse = processEdgesBulkImportWithHttpInfo(bulkImportRequest, headers); return localVarResponse.getData(); } /** - * Import the bulk of devices (processDevicesBulkImport) - * There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Import the bulk of edges (processEdgesBulkImport) + * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param bulkImportRequest (required) - * @return ApiResponse<BulkImportResultDevice> + * @return ApiResponse<BulkImportResultEdge> * @throws ApiException if fails to make API call */ - public ApiResponse processDevicesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { - return processDevicesBulkImportWithHttpInfo(bulkImportRequest, null); + public ApiResponse processEdgesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { + return processEdgesBulkImportWithHttpInfo(bulkImportRequest, null); } /** - * Import the bulk of devices (processDevicesBulkImport) - * There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Import the bulk of edges (processEdgesBulkImport) + * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param bulkImportRequest (required) * @param headers Optional headers to include in the request - * @return ApiResponse<BulkImportResultDevice> + * @return ApiResponse<BulkImportResultEdge> * @throws ApiException if fails to make API call */ - public ApiResponse processDevicesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = processDevicesBulkImportRequestBuilder(bulkImportRequest, headers); + public ApiResponse processEdgesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = processEdgesBulkImportRequestBuilder(bulkImportRequest, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -78085,11 +79066,11 @@ public ApiResponse processDevicesBulkImportWithHttpInfo( InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("processDevicesBulkImport", localVarResponse); + throw getApiException("processEdgesBulkImport", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -78099,10 +79080,10 @@ public ApiResponse processDevicesBulkImportWithHttpInfo( String responseBody = new String(localVarResponseBody.readAllBytes()); - BulkImportResultDevice responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + BulkImportResultEdge responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -78121,15 +79102,15 @@ public ApiResponse processDevicesBulkImportWithHttpInfo( } } - private HttpRequest.Builder processDevicesBulkImportRequestBuilder(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + private HttpRequest.Builder processEdgesBulkImportRequestBuilder(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { // verify the required parameter 'bulkImportRequest' is set if (bulkImportRequest == null) { - throw new ApiException(400, "Missing the required parameter 'bulkImportRequest' when calling processDevicesBulkImport"); + throw new ApiException(400, "Missing the required parameter 'bulkImportRequest' when calling processEdgesBulkImport"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/device/bulk_import"; + String localVarPath = "/api/edge/bulk_import"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -78154,50 +79135,47 @@ private HttpRequest.Builder processDevicesBulkImportRequestBuilder(@javax.annota } /** - * Import the bulk of edges (processEdgesBulkImport) - * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param bulkImportRequest (required) - * @return BulkImportResultEdge + * processSystemEdqsRequest + * + * @param toCoreEdqsRequest (required) * @throws ApiException if fails to make API call */ - public BulkImportResultEdge processEdgesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { - return processEdgesBulkImport(bulkImportRequest, null); + public void processSystemEdqsRequest(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest) throws ApiException { + processSystemEdqsRequest(toCoreEdqsRequest, null); } /** - * Import the bulk of edges (processEdgesBulkImport) - * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param bulkImportRequest (required) + * processSystemEdqsRequest + * + * @param toCoreEdqsRequest (required) * @param headers Optional headers to include in the request - * @return BulkImportResultEdge * @throws ApiException if fails to make API call */ - public BulkImportResultEdge processEdgesBulkImport(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { - ApiResponse localVarResponse = processEdgesBulkImportWithHttpInfo(bulkImportRequest, headers); - return localVarResponse.getData(); + public void processSystemEdqsRequest(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest, Map headers) throws ApiException { + processSystemEdqsRequestWithHttpInfo(toCoreEdqsRequest, headers); } /** - * Import the bulk of edges (processEdgesBulkImport) - * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param bulkImportRequest (required) - * @return ApiResponse<BulkImportResultEdge> + * processSystemEdqsRequest + * + * @param toCoreEdqsRequest (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse processEdgesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest) throws ApiException { - return processEdgesBulkImportWithHttpInfo(bulkImportRequest, null); + public ApiResponse processSystemEdqsRequestWithHttpInfo(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest) throws ApiException { + return processSystemEdqsRequestWithHttpInfo(toCoreEdqsRequest, null); } /** - * Import the bulk of edges (processEdgesBulkImport) - * There's an ability to import the bulk of edges using the only .csv file. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param bulkImportRequest (required) + * processSystemEdqsRequest + * + * @param toCoreEdqsRequest (required) * @param headers Optional headers to include in the request - * @return ApiResponse<BulkImportResultEdge> + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse processEdgesBulkImportWithHttpInfo(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = processEdgesBulkImportRequestBuilder(bulkImportRequest, headers); + public ApiResponse processSystemEdqsRequestWithHttpInfo(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = processSystemEdqsRequestRequestBuilder(toCoreEdqsRequest, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -78208,27 +79186,16 @@ public ApiResponse processEdgesBulkImportWithHttpInfo(@jav InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("processEdgesBulkImport", localVarResponse); + throw getApiException("processSystemEdqsRequest", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); + if (localVarResponseBody != null) { + localVarResponseBody.readAllBytes(); } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - BulkImportResultEdge responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( + return new ApiResponse<>( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseValue + null ); } finally { if (localVarResponseBody != null) { @@ -78244,15 +79211,15 @@ public ApiResponse processEdgesBulkImportWithHttpInfo(@jav } } - private HttpRequest.Builder processEdgesBulkImportRequestBuilder(@javax.annotation.Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { - // verify the required parameter 'bulkImportRequest' is set - if (bulkImportRequest == null) { - throw new ApiException(400, "Missing the required parameter 'bulkImportRequest' when calling processEdgesBulkImport"); + private HttpRequest.Builder processSystemEdqsRequestRequestBuilder(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest, Map headers) throws ApiException { + // verify the required parameter 'toCoreEdqsRequest' is set + if (toCoreEdqsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'toCoreEdqsRequest' when calling processSystemEdqsRequest"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/edge/bulk_import"; + String localVarPath = "/api/edqs/system/request"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -78260,7 +79227,7 @@ private HttpRequest.Builder processEdgesBulkImportRequestBuilder(@javax.annotati localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(bulkImportRequest); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(toCoreEdqsRequest); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -78277,47 +79244,50 @@ private HttpRequest.Builder processEdgesBulkImportRequestBuilder(@javax.annotati } /** - * processSystemEdqsRequest - * - * @param toCoreEdqsRequest (required) + * Provision new device (provisionDevice) + * Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` + * @param body JSON with provision request. See API call description for example. (required) + * @return String * @throws ApiException if fails to make API call */ - public void processSystemEdqsRequest(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest) throws ApiException { - processSystemEdqsRequest(toCoreEdqsRequest, null); + public String provisionDevice(@javax.annotation.Nonnull String body) throws ApiException { + return provisionDevice(body, null); } /** - * processSystemEdqsRequest - * - * @param toCoreEdqsRequest (required) + * Provision new device (provisionDevice) + * Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` + * @param body JSON with provision request. See API call description for example. (required) * @param headers Optional headers to include in the request + * @return String * @throws ApiException if fails to make API call */ - public void processSystemEdqsRequest(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest, Map headers) throws ApiException { - processSystemEdqsRequestWithHttpInfo(toCoreEdqsRequest, headers); + public String provisionDevice(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = provisionDeviceWithHttpInfo(body, headers); + return localVarResponse.getData(); } /** - * processSystemEdqsRequest - * - * @param toCoreEdqsRequest (required) - * @return ApiResponse<Void> + * Provision new device (provisionDevice) + * Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` + * @param body JSON with provision request. See API call description for example. (required) + * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse processSystemEdqsRequestWithHttpInfo(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest) throws ApiException { - return processSystemEdqsRequestWithHttpInfo(toCoreEdqsRequest, null); + public ApiResponse provisionDeviceWithHttpInfo(@javax.annotation.Nonnull String body) throws ApiException { + return provisionDeviceWithHttpInfo(body, null); } /** - * processSystemEdqsRequest - * - * @param toCoreEdqsRequest (required) + * Provision new device (provisionDevice) + * Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` + * @param body JSON with provision request. See API call description for example. (required) * @param headers Optional headers to include in the request - * @return ApiResponse<Void> + * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse processSystemEdqsRequestWithHttpInfo(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = processSystemEdqsRequestRequestBuilder(toCoreEdqsRequest, headers); + public ApiResponse provisionDeviceWithHttpInfo(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = provisionDeviceRequestBuilder(body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -78328,16 +79298,27 @@ public ApiResponse processSystemEdqsRequestWithHttpInfo(@javax.annotation. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("processSystemEdqsRequest", localVarResponse); + throw getApiException("provisionDevice", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); } - return new ApiResponse<>( + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null + responseValue ); } finally { if (localVarResponseBody != null) { @@ -78353,27 +79334,22 @@ public ApiResponse processSystemEdqsRequestWithHttpInfo(@javax.annotation. } } - private HttpRequest.Builder processSystemEdqsRequestRequestBuilder(@javax.annotation.Nonnull ToCoreEdqsRequest toCoreEdqsRequest, Map headers) throws ApiException { - // verify the required parameter 'toCoreEdqsRequest' is set - if (toCoreEdqsRequest == null) { - throw new ApiException(400, "Missing the required parameter 'toCoreEdqsRequest' when calling processSystemEdqsRequest"); + private HttpRequest.Builder provisionDeviceRequestBuilder(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling provisionDevice"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/edqs/system/request"; + String localVarPath = "/api/v1/provision"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(toCoreEdqsRequest); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -79168,6 +80144,142 @@ private HttpRequest.Builder removeMobileSessionRequestBuilder(@javax.annotation. return localVarRequestBuilder; } + /** + * Reply to RPC commands (replyToCommand) + * Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param requestId RPC request id from the incoming RPC request (required) + * @param body Reply to the RPC request, JSON. For example: {\"status\":\"success\"} (required) + * @return String + * @throws ApiException if fails to make API call + */ + public String replyToCommand(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body) throws ApiException { + return replyToCommand(deviceToken, requestId, body, null); + } + + /** + * Reply to RPC commands (replyToCommand) + * Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param requestId RPC request id from the incoming RPC request (required) + * @param body Reply to the RPC request, JSON. For example: {\"status\":\"success\"} (required) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String replyToCommand(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = replyToCommandWithHttpInfo(deviceToken, requestId, body, headers); + return localVarResponse.getData(); + } + + /** + * Reply to RPC commands (replyToCommand) + * Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param requestId RPC request id from the incoming RPC request (required) + * @param body Reply to the RPC request, JSON. For example: {\"status\":\"success\"} (required) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse replyToCommandWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body) throws ApiException { + return replyToCommandWithHttpInfo(deviceToken, requestId, body, null); + } + + /** + * Reply to RPC commands (replyToCommand) + * Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param requestId RPC request id from the incoming RPC request (required) + * @param body Reply to the RPC request, JSON. For example: {\"status\":\"success\"} (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse replyToCommandWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = replyToCommandRequestBuilder(deviceToken, requestId, body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("replyToCommand", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder replyToCommandRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling replyToCommand"); + } + // verify the required parameter 'requestId' is set + if (requestId == null) { + throw new ApiException(400, "Missing the required parameter 'requestId' when calling replyToCommand"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling replyToCommand"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/rpc/{requestId}" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())) + .replace("{requestId}", ApiClient.urlEncode(requestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Report action of User over the dashboard (reportUserDashboardAction) * Report action of User over the dashboard. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -81797,6 +82909,129 @@ private HttpRequest.Builder saveCalculatedFieldRequestBuilder(@javax.annotation. return localVarRequestBuilder; } + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @return String + * @throws ApiException if fails to make API call + */ + public String saveClaimingInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { + return saveClaimingInfo(deviceToken, body, null); + } + + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String saveClaimingInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { + ApiResponse localVarResponse = saveClaimingInfoWithHttpInfo(deviceToken, body, headers); + return localVarResponse.getData(); + } + + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveClaimingInfoWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { + return saveClaimingInfoWithHttpInfo(deviceToken, body, null); + } + + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveClaimingInfoWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = saveClaimingInfoRequestBuilder(deviceToken, body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("saveClaimingInfo", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder saveClaimingInfoRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling saveClaimingInfo"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/claim" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Create or update OAuth2 client registration template (saveClientRegistrationTemplate) Available for users with 'SYS_ADMIN' authority. * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients @@ -92844,6 +94079,280 @@ private HttpRequest.Builder submitTwoFaAccountConfigRequestBuilder(@javax.annota return localVarRequestBuilder; } + /** + * Subscribe to attribute updates (subscribeToAttributes) (Deprecated) + * Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @return String + * @throws ApiException if fails to make API call + */ + public String subscribeToAttributes(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout) throws ApiException { + return subscribeToAttributes(deviceToken, timeout, null); + } + + /** + * Subscribe to attribute updates (subscribeToAttributes) (Deprecated) + * Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String subscribeToAttributes(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { + ApiResponse localVarResponse = subscribeToAttributesWithHttpInfo(deviceToken, timeout, headers); + return localVarResponse.getData(); + } + + /** + * Subscribe to attribute updates (subscribeToAttributes) (Deprecated) + * Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse subscribeToAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout) throws ApiException { + return subscribeToAttributesWithHttpInfo(deviceToken, timeout, null); + } + + /** + * Subscribe to attribute updates (subscribeToAttributes) (Deprecated) + * Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse subscribeToAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = subscribeToAttributesRequestBuilder(deviceToken, timeout, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("subscribeToAttributes", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder subscribeToAttributesRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling subscribeToAttributes"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/attributes/updates" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "timeout"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("timeout", timeout)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Subscribe to RPC commands (subscribeToCommands) (Deprecated) + * Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @return String + * @throws ApiException if fails to make API call + */ + public String subscribeToCommands(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout) throws ApiException { + return subscribeToCommands(deviceToken, timeout, null); + } + + /** + * Subscribe to RPC commands (subscribeToCommands) (Deprecated) + * Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String subscribeToCommands(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { + ApiResponse localVarResponse = subscribeToCommandsWithHttpInfo(deviceToken, timeout, headers); + return localVarResponse.getData(); + } + + /** + * Subscribe to RPC commands (subscribeToCommands) (Deprecated) + * Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse subscribeToCommandsWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout) throws ApiException { + return subscribeToCommandsWithHttpInfo(deviceToken, timeout, null); + } + + /** + * Subscribe to RPC commands (subscribeToCommands) (Deprecated) + * Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse subscribeToCommandsWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = subscribeToCommandsRequestBuilder(deviceToken, timeout, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("subscribeToCommands", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder subscribeToCommandsRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling subscribeToCommands"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/rpc" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "timeout"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("timeout", timeout)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Sync edge (syncEdge) * Starts synchronization process between edge and cloud. All entities that are assigned to particular edge are going to be send to remote edge service. Available for users with 'TENANT_ADMIN' authority. diff --git a/paas/src/main/java/org/thingsboard/client/model/AdminSettingsId.java b/paas/src/main/java/org/thingsboard/client/model/AdminSettingsId.java index de11a59a..7ad6f9fd 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AdminSettingsId.java +++ b/paas/src/main/java/org/thingsboard/client/model/AdminSettingsId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * AdminSettingsId */ @JsonPropertyOrder({ - AdminSettingsId.JSON_PROPERTY_ID, - AdminSettingsId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AdminSettingsId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class AdminSettingsId extends EntityId { public AdminSettingsId() { } + @Override public AdminSettingsId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public AdminSettingsId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this AdminSettingsId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AdminSettingsId adminSettingsId = (AdminSettingsId) o; - return Objects.equals(this.id, adminSettingsId.id) && - Objects.equals(this.entityType, adminSettingsId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdminSettingsId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AdminSettingsId", AdminSettingsId.class); + JSON.registerDiscriminator(AdminSettingsId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/AiModelId.java b/paas/src/main/java/org/thingsboard/client/model/AiModelId.java index d5f505ed..4ec02d0c 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AiModelId.java +++ b/paas/src/main/java/org/thingsboard/client/model/AiModelId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * AiModelId */ @JsonPropertyOrder({ - AiModelId.JSON_PROPERTY_ID, - AiModelId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AiModelId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class AiModelId extends EntityId { public AiModelId() { } + @Override public AiModelId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public AiModelId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * Entity type of the AI model - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this AiModelId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AiModelId aiModelId = (AiModelId) o; - return Objects.equals(this.id, aiModelId.id) && - Objects.equals(this.entityType, aiModelId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AiModelId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AiModelId", AiModelId.class); + JSON.registerDiscriminator(AiModelId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java index 62a6084e..0729c623 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public AlarmAssignmentRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public AlarmAssignmentRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/paas/src/main/java/org/thingsboard/client/model/AlarmCalculatedFieldConfiguration.java b/paas/src/main/java/org/thingsboard/client/model/AlarmCalculatedFieldConfiguration.java index 616fff01..09d28e8b 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AlarmCalculatedFieldConfiguration.java +++ b/paas/src/main/java/org/thingsboard/client/model/AlarmCalculatedFieldConfiguration.java @@ -48,13 +48,13 @@ */ @JsonPropertyOrder({ AlarmCalculatedFieldConfiguration.JSON_PROPERTY_ARGUMENTS, - AlarmCalculatedFieldConfiguration.JSON_PROPERTY_CREATE_RULES, AlarmCalculatedFieldConfiguration.JSON_PROPERTY_CLEAR_RULE, + AlarmCalculatedFieldConfiguration.JSON_PROPERTY_CREATE_RULES, AlarmCalculatedFieldConfiguration.JSON_PROPERTY_PROPAGATE, + AlarmCalculatedFieldConfiguration.JSON_PROPERTY_PROPAGATE_RELATION_TYPES, AlarmCalculatedFieldConfiguration.JSON_PROPERTY_PROPAGATE_TO_OWNER, AlarmCalculatedFieldConfiguration.JSON_PROPERTY_PROPAGATE_TO_OWNER_HIERARCHY, - AlarmCalculatedFieldConfiguration.JSON_PROPERTY_PROPAGATE_TO_TENANT, - AlarmCalculatedFieldConfiguration.JSON_PROPERTY_PROPAGATE_RELATION_TYPES + AlarmCalculatedFieldConfiguration.JSON_PROPERTY_PROPAGATE_TO_TENANT }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -68,18 +68,22 @@ public class AlarmCalculatedFieldConfiguration extends CalculatedFieldConfigurat @javax.annotation.Nonnull private Map arguments = new HashMap<>(); - public static final String JSON_PROPERTY_CREATE_RULES = "createRules"; - @javax.annotation.Nonnull - private Map createRules = new HashMap<>(); - public static final String JSON_PROPERTY_CLEAR_RULE = "clearRule"; @javax.annotation.Nullable private AlarmRuleDefinition clearRule; + public static final String JSON_PROPERTY_CREATE_RULES = "createRules"; + @javax.annotation.Nonnull + private Map createRules = new HashMap<>(); + public static final String JSON_PROPERTY_PROPAGATE = "propagate"; @javax.annotation.Nullable private Boolean propagate; + public static final String JSON_PROPERTY_PROPAGATE_RELATION_TYPES = "propagateRelationTypes"; + @javax.annotation.Nullable + private List propagateRelationTypes = new ArrayList<>(); + public static final String JSON_PROPERTY_PROPAGATE_TO_OWNER = "propagateToOwner"; @javax.annotation.Nullable private Boolean propagateToOwner; @@ -92,10 +96,6 @@ public class AlarmCalculatedFieldConfiguration extends CalculatedFieldConfigurat @javax.annotation.Nullable private Boolean propagateToTenant; - public static final String JSON_PROPERTY_PROPAGATE_RELATION_TYPES = "propagateRelationTypes"; - @javax.annotation.Nullable - private List propagateRelationTypes = new ArrayList<>(); - public AlarmCalculatedFieldConfiguration() { } @@ -131,6 +131,30 @@ public void setArguments(@javax.annotation.Nonnull Map argumen } + public AlarmCalculatedFieldConfiguration clearRule(@javax.annotation.Nullable AlarmRuleDefinition clearRule) { + this.clearRule = clearRule; + return this; + } + + /** + * Get clearRule + * @return clearRule + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_CLEAR_RULE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AlarmRuleDefinition getClearRule() { + return clearRule; + } + + + @JsonProperty(value = JSON_PROPERTY_CLEAR_RULE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setClearRule(@javax.annotation.Nullable AlarmRuleDefinition clearRule) { + this.clearRule = clearRule; + } + + public AlarmCalculatedFieldConfiguration createRules(@javax.annotation.Nonnull Map createRules) { this.createRules = createRules; return this; @@ -163,51 +187,59 @@ public void setCreateRules(@javax.annotation.Nonnull Map propagateRelationTypes) { + this.propagateRelationTypes = propagateRelationTypes; + return this; + } + + public AlarmCalculatedFieldConfiguration addPropagateRelationTypesItem(String propagateRelationTypesItem) { + if (this.propagateRelationTypes == null) { + this.propagateRelationTypes = new ArrayList<>(); + } + this.propagateRelationTypes.add(propagateRelationTypesItem); return this; } /** - * Get propagate - * @return propagate + * Get propagateRelationTypes + * @return propagateRelationTypes */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PROPAGATE, required = false) + @JsonProperty(value = JSON_PROPERTY_PROPAGATE_RELATION_TYPES, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPropagate() { - return propagate; + public List getPropagateRelationTypes() { + return propagateRelationTypes; } - @JsonProperty(value = JSON_PROPERTY_PROPAGATE, required = false) + @JsonProperty(value = JSON_PROPERTY_PROPAGATE_RELATION_TYPES, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPropagate(@javax.annotation.Nullable Boolean propagate) { - this.propagate = propagate; + public void setPropagateRelationTypes(@javax.annotation.Nullable List propagateRelationTypes) { + this.propagateRelationTypes = propagateRelationTypes; } @@ -283,50 +315,18 @@ public void setPropagateToTenant(@javax.annotation.Nullable Boolean propagateToT } - public AlarmCalculatedFieldConfiguration propagateRelationTypes(@javax.annotation.Nullable List propagateRelationTypes) { - this.propagateRelationTypes = propagateRelationTypes; - return this; - } - - public AlarmCalculatedFieldConfiguration addPropagateRelationTypesItem(String propagateRelationTypesItem) { - if (this.propagateRelationTypes == null) { - this.propagateRelationTypes = new ArrayList<>(); - } - this.propagateRelationTypes.add(propagateRelationTypesItem); + @Override + public AlarmCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { + this.setOutput(output); return this; } - /** - * Get propagateRelationTypes - * @return propagateRelationTypes - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PROPAGATE_RELATION_TYPES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPropagateRelationTypes() { - return propagateRelationTypes; - } - - - @JsonProperty(value = JSON_PROPERTY_PROPAGATE_RELATION_TYPES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPropagateRelationTypes(@javax.annotation.Nullable List propagateRelationTypes) { - this.propagateRelationTypes = propagateRelationTypes; - } - - @Override public AlarmCalculatedFieldConfiguration aiGenerated(@javax.annotation.Nullable Boolean aiGenerated) { this.setAiGenerated(aiGenerated); return this; } - @Override - public AlarmCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { - this.setOutput(output); - return this; - } - @Override public AlarmCalculatedFieldConfiguration type(@javax.annotation.Nonnull String type) { this.setType(type); @@ -346,19 +346,19 @@ public boolean equals(Object o) { } AlarmCalculatedFieldConfiguration alarmCalculatedFieldConfiguration = (AlarmCalculatedFieldConfiguration) o; return Objects.equals(this.arguments, alarmCalculatedFieldConfiguration.arguments) && - Objects.equals(this.createRules, alarmCalculatedFieldConfiguration.createRules) && Objects.equals(this.clearRule, alarmCalculatedFieldConfiguration.clearRule) && + Objects.equals(this.createRules, alarmCalculatedFieldConfiguration.createRules) && Objects.equals(this.propagate, alarmCalculatedFieldConfiguration.propagate) && + Objects.equals(this.propagateRelationTypes, alarmCalculatedFieldConfiguration.propagateRelationTypes) && Objects.equals(this.propagateToOwner, alarmCalculatedFieldConfiguration.propagateToOwner) && Objects.equals(this.propagateToOwnerHierarchy, alarmCalculatedFieldConfiguration.propagateToOwnerHierarchy) && Objects.equals(this.propagateToTenant, alarmCalculatedFieldConfiguration.propagateToTenant) && - Objects.equals(this.propagateRelationTypes, alarmCalculatedFieldConfiguration.propagateRelationTypes) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(arguments, createRules, clearRule, propagate, propagateToOwner, propagateToOwnerHierarchy, propagateToTenant, propagateRelationTypes, super.hashCode()); + return Objects.hash(arguments, clearRule, createRules, propagate, propagateRelationTypes, propagateToOwner, propagateToOwnerHierarchy, propagateToTenant, super.hashCode()); } @Override @@ -367,13 +367,13 @@ public String toString() { sb.append("class AlarmCalculatedFieldConfiguration {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" arguments: ").append(toIndentedString(arguments)).append("\n"); - sb.append(" createRules: ").append(toIndentedString(createRules)).append("\n"); sb.append(" clearRule: ").append(toIndentedString(clearRule)).append("\n"); + sb.append(" createRules: ").append(toIndentedString(createRules)).append("\n"); sb.append(" propagate: ").append(toIndentedString(propagate)).append("\n"); + sb.append(" propagateRelationTypes: ").append(toIndentedString(propagateRelationTypes)).append("\n"); sb.append(" propagateToOwner: ").append(toIndentedString(propagateToOwner)).append("\n"); sb.append(" propagateToOwnerHierarchy: ").append(toIndentedString(propagateToOwnerHierarchy)).append("\n"); sb.append(" propagateToTenant: ").append(toIndentedString(propagateToTenant)).append("\n"); - sb.append(" propagateRelationTypes: ").append(toIndentedString(propagateRelationTypes)).append("\n"); sb.append("}"); return sb.toString(); } @@ -421,16 +421,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `aiGenerated` to the URL query string - if (getAiGenerated() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%saiGenerated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAiGenerated())))); - } - // add `output` to the URL query string if (getOutput() != null) { joiner.add(getOutput().toUrlQueryString(prefix + "output" + suffix)); } + // add `aiGenerated` to the URL query string + if (getAiGenerated() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%saiGenerated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAiGenerated())))); + } + // add `type` to the URL query string if (getType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); @@ -446,6 +446,11 @@ public String toUrlQueryString(String prefix) { } } + // add `clearRule` to the URL query string + if (getClearRule() != null) { + joiner.add(getClearRule().toUrlQueryString(prefix + "clearRule" + suffix)); + } + // add `createRules` to the URL query string if (getCreateRules() != null) { for (String _key : getCreateRules().keySet()) { @@ -456,16 +461,20 @@ public String toUrlQueryString(String prefix) { } } - // add `clearRule` to the URL query string - if (getClearRule() != null) { - joiner.add(getClearRule().toUrlQueryString(prefix + "clearRule" + suffix)); - } - // add `propagate` to the URL query string if (getPropagate() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%spropagate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPropagate())))); } + // add `propagateRelationTypes` to the URL query string + if (getPropagateRelationTypes() != null) { + for (int i = 0; i < getPropagateRelationTypes().size(); i++) { + joiner.add(String.format(java.util.Locale.ROOT, "%spropagateRelationTypes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getPropagateRelationTypes().get(i))))); + } + } + // add `propagateToOwner` to the URL query string if (getPropagateToOwner() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%spropagateToOwner%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPropagateToOwner())))); @@ -481,15 +490,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%spropagateToTenant%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPropagateToTenant())))); } - // add `propagateRelationTypes` to the URL query string - if (getPropagateRelationTypes() != null) { - for (int i = 0; i < getPropagateRelationTypes().size(); i++) { - joiner.add(String.format(java.util.Locale.ROOT, "%spropagateRelationTypes%s%s=%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), - ApiClient.urlEncode(ApiClient.valueToString(getPropagateRelationTypes().get(i))))); - } - } - return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java index 910e38e3..703d5744 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public AlarmCommentRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public AlarmCommentRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/paas/src/main/java/org/thingsboard/client/model/AlarmId.java b/paas/src/main/java/org/thingsboard/client/model/AlarmId.java index 1d7d87ef..d24b8337 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AlarmId.java +++ b/paas/src/main/java/org/thingsboard/client/model/AlarmId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * AlarmId */ @JsonPropertyOrder({ - AlarmId.JSON_PROPERTY_ID, - AlarmId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AlarmId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class AlarmId extends EntityId { public AlarmId() { } + @Override public AlarmId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public AlarmId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this AlarmId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AlarmId alarmId = (AlarmId) o; - return Objects.equals(this.id, alarmId.id) && - Objects.equals(this.entityType, alarmId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AlarmId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AlarmId", AlarmId.class); + JSON.registerDiscriminator(AlarmId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/ApiKeyId.java b/paas/src/main/java/org/thingsboard/client/model/ApiKeyId.java index cfc0cd67..aa45306b 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ApiKeyId.java +++ b/paas/src/main/java/org/thingsboard/client/model/ApiKeyId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * ApiKeyId */ @JsonPropertyOrder({ - ApiKeyId.JSON_PROPERTY_ID, - ApiKeyId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class ApiKeyId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class ApiKeyId extends EntityId { public ApiKeyId() { } + @Override public ApiKeyId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public ApiKeyId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this ApiKeyId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ApiKeyId apiKeyId = (ApiKeyId) o; - return Objects.equals(this.id, apiKeyId.id) && - Objects.equals(this.entityType, apiKeyId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ApiKeyId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ApiKeyId", ApiKeyId.class); + JSON.registerDiscriminator(ApiKeyId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java index 09389b53..a9a563d3 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public ApiUsageLimitRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public ApiUsageLimitRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/paas/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java b/paas/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java new file mode 100644 index 00000000..1e2ff9c3 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/ApiUsageStateId.java @@ -0,0 +1,159 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.thingsboard.client.model.EntityId; +import org.thingsboard.client.model.EntityType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * ApiUsageStateId + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class ApiUsageStateId extends EntityId { + public ApiUsageStateId() { + } + + @Override + public ApiUsageStateId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); + return this; + } + + @Override + public ApiUsageStateId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + /** + * Return true if this ApiUsageStateId object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiUsageStateId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ApiUsageStateId", ApiUsageStateId.class); + JSON.registerDiscriminator(ApiUsageStateId.class, "entityType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/Asset.java b/paas/src/main/java/org/thingsboard/client/model/Asset.java index 652c43ad..760a904a 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Asset.java +++ b/paas/src/main/java/org/thingsboard/client/model/Asset.java @@ -105,14 +105,12 @@ public Asset() { public Asset( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; - this.ownerId = ownerId; } public Asset id(@javax.annotation.Nullable AssetId id) { @@ -301,6 +299,11 @@ public void setVersion(@javax.annotation.Nullable Long version) { } + public Asset ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -313,6 +316,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public Asset additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/AssetId.java b/paas/src/main/java/org/thingsboard/client/model/AssetId.java index 35afaee3..e8d5db42 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AssetId.java +++ b/paas/src/main/java/org/thingsboard/client/model/AssetId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * AssetId */ @JsonPropertyOrder({ - AssetId.JSON_PROPERTY_ID, - AssetId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AssetId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class AssetId extends EntityId { public AssetId() { } + @Override public AssetId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public AssetId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this AssetId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AssetId assetId = (AssetId) o; - return Objects.equals(this.id, assetId.id) && - Objects.equals(this.entityType, assetId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AssetId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AssetId", AssetId.class); + JSON.registerDiscriminator(AssetId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/AssetInfo.java b/paas/src/main/java/org/thingsboard/client/model/AssetInfo.java index f8b8a531..12e4bf59 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AssetInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/AssetInfo.java @@ -119,15 +119,13 @@ public AssetInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; this.ownerName = ownerName; - this.ownerId = ownerId; } public AssetInfo id(@javax.annotation.Nullable AssetId id) { @@ -362,6 +360,11 @@ public void setGroups(@javax.annotation.Nullable List groups) { } + public AssetInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -374,6 +377,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public AssetInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/AssetProfileId.java b/paas/src/main/java/org/thingsboard/client/model/AssetProfileId.java index afb23a04..63cd8f02 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AssetProfileId.java +++ b/paas/src/main/java/org/thingsboard/client/model/AssetProfileId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * AssetProfileId */ @JsonPropertyOrder({ - AssetProfileId.JSON_PROPERTY_ID, - AssetProfileId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AssetProfileId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class AssetProfileId extends EntityId { public AssetProfileId() { } + @Override public AssetProfileId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public AssetProfileId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this AssetProfileId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AssetProfileId assetProfileId = (AssetProfileId) o; - return Objects.equals(this.id, assetProfileId.id) && - Objects.equals(this.entityType, assetProfileId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AssetProfileId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AssetProfileId", AssetProfileId.class); + JSON.registerDiscriminator(AssetProfileId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/AttributesOutput.java b/paas/src/main/java/org/thingsboard/client/model/AttributesOutput.java index 1359decc..82704939 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AttributesOutput.java +++ b/paas/src/main/java/org/thingsboard/client/model/AttributesOutput.java @@ -30,8 +30,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; import org.thingsboard.client.model.AttributeScope; -import org.thingsboard.client.model.AttributesOutputStrategy; import org.thingsboard.client.model.Output; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -42,7 +42,6 @@ * AttributesOutput */ @JsonPropertyOrder({ - AttributesOutput.JSON_PROPERTY_STRATEGY }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -52,37 +51,9 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) public class AttributesOutput extends Output { - public static final String JSON_PROPERTY_STRATEGY = "strategy"; - @javax.annotation.Nullable - private AttributesOutputStrategy strategy; - public AttributesOutput() { } - public AttributesOutput strategy(@javax.annotation.Nullable AttributesOutputStrategy strategy) { - this.strategy = strategy; - return this; - } - - /** - * Get strategy - * @return strategy - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_STRATEGY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AttributesOutputStrategy getStrategy() { - return strategy; - } - - - @JsonProperty(value = JSON_PROPERTY_STRATEGY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStrategy(@javax.annotation.Nullable AttributesOutputStrategy strategy) { - this.strategy = strategy; - } - - @Override public AttributesOutput name(@javax.annotation.Nullable String name) { this.setName(name); @@ -101,6 +72,12 @@ public AttributesOutput decimalsByDefault(@javax.annotation.Nullable Integer dec return this; } + @Override + public AttributesOutput strategy(@javax.annotation.Nullable Object strategy) { + this.setStrategy(strategy); + return this; + } + @Override public AttributesOutput type(@javax.annotation.Nonnull String type) { this.setType(type); @@ -118,14 +95,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AttributesOutput attributesOutput = (AttributesOutput) o; - return Objects.equals(this.strategy, attributesOutput.strategy) && - super.equals(o); + return super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { - return Objects.hash(strategy, super.hashCode()); + return Objects.hash(super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -133,7 +119,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AttributesOutput {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" strategy: ").append(toIndentedString(strategy)).append("\n"); sb.append("}"); return sb.toString(); } @@ -198,7 +183,7 @@ public String toUrlQueryString(String prefix) { // add `strategy` to the URL query string if (getStrategy() != null) { - joiner.add(getStrategy().toUrlQueryString(prefix + "strategy" + suffix)); + joiner.add(String.format(java.util.Locale.ROOT, "%sstrategy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStrategy())))); } // add `type` to the URL query string diff --git a/paas/src/main/java/org/thingsboard/client/model/AuditLog.java b/paas/src/main/java/org/thingsboard/client/model/AuditLog.java index 1ff6864f..4bc53623 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AuditLog.java +++ b/paas/src/main/java/org/thingsboard/client/model/AuditLog.java @@ -113,7 +113,6 @@ public AuditLog( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_ENTITY_ID) EntityId entityId, @JsonProperty(JSON_PROPERTY_ENTITY_NAME) String entityName, @JsonProperty(JSON_PROPERTY_USER_ID) UserId userId, @JsonProperty(JSON_PROPERTY_USER_NAME) String userName, @@ -126,7 +125,6 @@ public AuditLog( this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; - this.entityId = entityId; this.entityName = entityName; this.userId = userId; this.userName = userName; @@ -202,6 +200,11 @@ public CustomerId getCustomerId() { + public AuditLog entityId(@javax.annotation.Nullable EntityId entityId) { + this.entityId = entityId; + return this; + } + /** * JSON object with Entity id * @return entityId @@ -214,6 +217,11 @@ public EntityId getEntityId() { } + @JsonProperty(value = JSON_PROPERTY_ENTITY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityId(@javax.annotation.Nullable EntityId entityId) { + this.entityId = entityId; + } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/BaseReadTsKvQuery.java b/paas/src/main/java/org/thingsboard/client/model/BaseReadTsKvQuery.java index 25b330f3..94006085 100644 --- a/paas/src/main/java/org/thingsboard/client/model/BaseReadTsKvQuery.java +++ b/paas/src/main/java/org/thingsboard/client/model/BaseReadTsKvQuery.java @@ -44,8 +44,8 @@ BaseReadTsKvQuery.JSON_PROPERTY_AGG_PARAMETERS, BaseReadTsKvQuery.JSON_PROPERTY_LIMIT, BaseReadTsKvQuery.JSON_PROPERTY_ORDER, - BaseReadTsKvQuery.JSON_PROPERTY_INTERVAL, - BaseReadTsKvQuery.JSON_PROPERTY_AGGREGATION + BaseReadTsKvQuery.JSON_PROPERTY_AGGREGATION, + BaseReadTsKvQuery.JSON_PROPERTY_INTERVAL }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class BaseReadTsKvQuery { @@ -77,14 +77,14 @@ public class BaseReadTsKvQuery { @javax.annotation.Nullable private String order; - public static final String JSON_PROPERTY_INTERVAL = "interval"; - @javax.annotation.Nullable - private Long interval; - public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; @javax.annotation.Nullable private Aggregation aggregation; + public static final String JSON_PROPERTY_INTERVAL = "interval"; + @javax.annotation.Nullable + private Long interval; + public BaseReadTsKvQuery() { } @@ -256,51 +256,51 @@ public void setOrder(@javax.annotation.Nullable String order) { } - public BaseReadTsKvQuery interval(@javax.annotation.Nullable Long interval) { - this.interval = interval; + public BaseReadTsKvQuery aggregation(@javax.annotation.Nullable Aggregation aggregation) { + this.aggregation = aggregation; return this; } /** - * Get interval - * @return interval + * Get aggregation + * @return aggregation */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_INTERVAL, required = false) + @JsonProperty(value = JSON_PROPERTY_AGGREGATION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInterval() { - return interval; + public Aggregation getAggregation() { + return aggregation; } - @JsonProperty(value = JSON_PROPERTY_INTERVAL, required = false) + @JsonProperty(value = JSON_PROPERTY_AGGREGATION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInterval(@javax.annotation.Nullable Long interval) { - this.interval = interval; + public void setAggregation(@javax.annotation.Nullable Aggregation aggregation) { + this.aggregation = aggregation; } - public BaseReadTsKvQuery aggregation(@javax.annotation.Nullable Aggregation aggregation) { - this.aggregation = aggregation; + public BaseReadTsKvQuery interval(@javax.annotation.Nullable Long interval) { + this.interval = interval; return this; } /** - * Get aggregation - * @return aggregation + * Get interval + * @return interval */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_AGGREGATION, required = false) + @JsonProperty(value = JSON_PROPERTY_INTERVAL, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Aggregation getAggregation() { - return aggregation; + public Long getInterval() { + return interval; } - @JsonProperty(value = JSON_PROPERTY_AGGREGATION, required = false) + @JsonProperty(value = JSON_PROPERTY_INTERVAL, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAggregation(@javax.annotation.Nullable Aggregation aggregation) { - this.aggregation = aggregation; + public void setInterval(@javax.annotation.Nullable Long interval) { + this.interval = interval; } @@ -323,13 +323,13 @@ public boolean equals(Object o) { Objects.equals(this.aggParameters, baseReadTsKvQuery.aggParameters) && Objects.equals(this.limit, baseReadTsKvQuery.limit) && Objects.equals(this.order, baseReadTsKvQuery.order) && - Objects.equals(this.interval, baseReadTsKvQuery.interval) && - Objects.equals(this.aggregation, baseReadTsKvQuery.aggregation); + Objects.equals(this.aggregation, baseReadTsKvQuery.aggregation) && + Objects.equals(this.interval, baseReadTsKvQuery.interval); } @Override public int hashCode() { - return Objects.hash(id, key, startTs, endTs, aggParameters, limit, order, interval, aggregation); + return Objects.hash(id, key, startTs, endTs, aggParameters, limit, order, aggregation, interval); } @Override @@ -343,8 +343,8 @@ public String toString() { sb.append(" aggParameters: ").append(toIndentedString(aggParameters)).append("\n"); sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); sb.append(" order: ").append(toIndentedString(order)).append("\n"); - sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); sb.append(" aggregation: ").append(toIndentedString(aggregation)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); sb.append("}"); return sb.toString(); } @@ -427,16 +427,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sorder%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrder())))); } - // add `interval` to the URL query string - if (getInterval() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sinterval%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInterval())))); - } - // add `aggregation` to the URL query string if (getAggregation() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%saggregation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregation())))); } + // add `interval` to the URL query string + if (getInterval() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sinterval%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInterval())))); + } + return joiner.toString(); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/BlobEntityId.java b/paas/src/main/java/org/thingsboard/client/model/BlobEntityId.java index 615a94d5..698931b3 100644 --- a/paas/src/main/java/org/thingsboard/client/model/BlobEntityId.java +++ b/paas/src/main/java/org/thingsboard/client/model/BlobEntityId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * BlobEntityId */ @JsonPropertyOrder({ - BlobEntityId.JSON_PROPERTY_ID, - BlobEntityId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class BlobEntityId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class BlobEntityId extends EntityId { public BlobEntityId() { } + @Override public BlobEntityId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public BlobEntityId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this BlobEntityId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - BlobEntityId blobEntityId = (BlobEntityId) o; - return Objects.equals(this.id, blobEntityId.id) && - Objects.equals(this.entityType, blobEntityId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BlobEntityId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("BlobEntityId", BlobEntityId.class); + JSON.registerDiscriminator(BlobEntityId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/BlobEntityInfo.java b/paas/src/main/java/org/thingsboard/client/model/BlobEntityInfo.java index b6d12b5c..34ea1c41 100644 --- a/paas/src/main/java/org/thingsboard/client/model/BlobEntityInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/BlobEntityInfo.java @@ -134,8 +134,7 @@ public BlobEntityInfo( @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_NAME) String name, @JsonProperty(JSON_PROPERTY_TYPE) String type, - @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) ContentTypeEnum contentType, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) ContentTypeEnum contentType ) { this(); this.createdTime = createdTime; @@ -144,7 +143,6 @@ public BlobEntityInfo( this.name = name; this.type = type; this.contentType = contentType; - this.ownerId = ownerId; } public BlobEntityInfo id(@javax.annotation.Nullable BlobEntityId id) { @@ -255,6 +253,11 @@ public ContentTypeEnum getContentType() { + public BlobEntityInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -267,6 +270,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public BlobEntityInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/BlobEntityWithCustomerInfo.java b/paas/src/main/java/org/thingsboard/client/model/BlobEntityWithCustomerInfo.java index 9ea3b41f..e0f6dacd 100644 --- a/paas/src/main/java/org/thingsboard/client/model/BlobEntityWithCustomerInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/BlobEntityWithCustomerInfo.java @@ -145,8 +145,7 @@ public BlobEntityWithCustomerInfo( @JsonProperty(JSON_PROPERTY_NAME) String name, @JsonProperty(JSON_PROPERTY_TYPE) String type, @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) ContentTypeEnum contentType, - @JsonProperty(JSON_PROPERTY_CUSTOMER_IS_PUBLIC) Boolean customerIsPublic, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_IS_PUBLIC) Boolean customerIsPublic ) { this(); this.createdTime = createdTime; @@ -156,7 +155,6 @@ public BlobEntityWithCustomerInfo( this.type = type; this.contentType = contentType; this.customerIsPublic = customerIsPublic; - this.ownerId = ownerId; } public BlobEntityWithCustomerInfo id(@javax.annotation.Nullable BlobEntityId id) { @@ -305,6 +303,11 @@ public Boolean getCustomerIsPublic() { + public BlobEntityWithCustomerInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -317,6 +320,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public BlobEntityWithCustomerInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldConfiguration.java b/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldConfiguration.java index 1ca65bb2..31d8ff38 100644 --- a/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldConfiguration.java +++ b/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldConfiguration.java @@ -40,8 +40,8 @@ * CalculatedFieldConfiguration */ @JsonPropertyOrder({ - CalculatedFieldConfiguration.JSON_PROPERTY_AI_GENERATED, CalculatedFieldConfiguration.JSON_PROPERTY_OUTPUT, + CalculatedFieldConfiguration.JSON_PROPERTY_AI_GENERATED, CalculatedFieldConfiguration.JSON_PROPERTY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @@ -61,14 +61,14 @@ }) public class CalculatedFieldConfiguration { - public static final String JSON_PROPERTY_AI_GENERATED = "aiGenerated"; - @javax.annotation.Nullable - private Boolean aiGenerated; - public static final String JSON_PROPERTY_OUTPUT = "output"; @javax.annotation.Nullable private Output output; + public static final String JSON_PROPERTY_AI_GENERATED = "aiGenerated"; + @javax.annotation.Nullable + private Boolean aiGenerated; + public static final String JSON_PROPERTY_TYPE = "type"; @javax.annotation.Nonnull private String type; @@ -76,51 +76,51 @@ public class CalculatedFieldConfiguration { public CalculatedFieldConfiguration() { } - public CalculatedFieldConfiguration aiGenerated(@javax.annotation.Nullable Boolean aiGenerated) { - this.aiGenerated = aiGenerated; + public CalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { + this.output = output; return this; } /** - * Get aiGenerated - * @return aiGenerated + * Get output + * @return output */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_AI_GENERATED, required = false) + @JsonProperty(value = JSON_PROPERTY_OUTPUT, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAiGenerated() { - return aiGenerated; + public Output getOutput() { + return output; } - @JsonProperty(value = JSON_PROPERTY_AI_GENERATED, required = false) + @JsonProperty(value = JSON_PROPERTY_OUTPUT, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAiGenerated(@javax.annotation.Nullable Boolean aiGenerated) { - this.aiGenerated = aiGenerated; + public void setOutput(@javax.annotation.Nullable Output output) { + this.output = output; } - public CalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { - this.output = output; + public CalculatedFieldConfiguration aiGenerated(@javax.annotation.Nullable Boolean aiGenerated) { + this.aiGenerated = aiGenerated; return this; } /** - * Get output - * @return output + * Get aiGenerated + * @return aiGenerated */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_OUTPUT, required = false) + @JsonProperty(value = JSON_PROPERTY_AI_GENERATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Output getOutput() { - return output; + public Boolean getAiGenerated() { + return aiGenerated; } - @JsonProperty(value = JSON_PROPERTY_OUTPUT, required = false) + @JsonProperty(value = JSON_PROPERTY_AI_GENERATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOutput(@javax.annotation.Nullable Output output) { - this.output = output; + public void setAiGenerated(@javax.annotation.Nullable Boolean aiGenerated) { + this.aiGenerated = aiGenerated; } @@ -160,22 +160,22 @@ public boolean equals(Object o) { return false; } CalculatedFieldConfiguration calculatedFieldConfiguration = (CalculatedFieldConfiguration) o; - return Objects.equals(this.aiGenerated, calculatedFieldConfiguration.aiGenerated) && - Objects.equals(this.output, calculatedFieldConfiguration.output) && + return Objects.equals(this.output, calculatedFieldConfiguration.output) && + Objects.equals(this.aiGenerated, calculatedFieldConfiguration.aiGenerated) && Objects.equals(this.type, calculatedFieldConfiguration.type); } @Override public int hashCode() { - return Objects.hash(aiGenerated, output, type); + return Objects.hash(output, aiGenerated, type); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CalculatedFieldConfiguration {\n"); - sb.append(" aiGenerated: ").append(toIndentedString(aiGenerated)).append("\n"); sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" aiGenerated: ").append(toIndentedString(aiGenerated)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); @@ -224,16 +224,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `aiGenerated` to the URL query string - if (getAiGenerated() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%saiGenerated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAiGenerated())))); - } - // add `output` to the URL query string if (getOutput() != null) { joiner.add(getOutput().toUrlQueryString(prefix + "output" + suffix)); } + // add `aiGenerated` to the URL query string + if (getAiGenerated() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%saiGenerated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAiGenerated())))); + } + // add `type` to the URL query string if (getType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); diff --git a/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java b/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java index d24b4447..8891973e 100644 --- a/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java +++ b/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java @@ -49,8 +49,8 @@ CalculatedFieldDebugEventFilter.JSON_PROPERTY_MSG_TYPE, CalculatedFieldDebugEventFilter.JSON_PROPERTY_ARGUMENTS, CalculatedFieldDebugEventFilter.JSON_PROPERTY_RESULT, - CalculatedFieldDebugEventFilter.JSON_PROPERTY_IS_ERROR, - CalculatedFieldDebugEventFilter.JSON_PROPERTY_ERROR + CalculatedFieldDebugEventFilter.JSON_PROPERTY_ERROR, + CalculatedFieldDebugEventFilter.JSON_PROPERTY_IS_ERROR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -125,14 +125,14 @@ public static EntityTypeEnum fromValue(String value) { @javax.annotation.Nullable private String result; - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public static final String JSON_PROPERTY_ERROR = "error"; @javax.annotation.Nullable private Boolean error; + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private Boolean isError; + public CalculatedFieldDebugEventFilter() { } @@ -328,51 +328,51 @@ public void setResult(@javax.annotation.Nullable String result) { } - public CalculatedFieldDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public CalculatedFieldDebugEventFilter error(@javax.annotation.Nullable Boolean error) { + this.error = error; return this; } /** - * Get isError - * @return isError + * Get error + * @return error */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; + public Boolean getError() { + return error; } - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public void setError(@javax.annotation.Nullable Boolean error) { + this.error = error; } - public CalculatedFieldDebugEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; + public CalculatedFieldDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; return this; } /** - * Get error - * @return error + * Get isError + * @return isError */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; + public Boolean getIsError() { + return isError; } - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; + public void setIsError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; } @@ -408,14 +408,14 @@ public boolean equals(Object o) { Objects.equals(this.msgType, calculatedFieldDebugEventFilter.msgType) && Objects.equals(this.arguments, calculatedFieldDebugEventFilter.arguments) && Objects.equals(this.result, calculatedFieldDebugEventFilter.result) && - Objects.equals(this.isError, calculatedFieldDebugEventFilter.isError) && Objects.equals(this.error, calculatedFieldDebugEventFilter.error) && + Objects.equals(this.isError, calculatedFieldDebugEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, entityId, entityType, msgId, msgType, arguments, result, isError, error, super.hashCode()); + return Objects.hash(server, errorStr, entityId, entityType, msgId, msgType, arguments, result, error, isError, super.hashCode()); } @Override @@ -431,8 +431,8 @@ public String toString() { sb.append(" msgType: ").append(toIndentedString(msgType)).append("\n"); sb.append(" arguments: ").append(toIndentedString(arguments)).append("\n"); sb.append(" result: ").append(toIndentedString(result)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -530,16 +530,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); } - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - // add `error` to the URL query string if (getError() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java b/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java index 42c334eb..724a8af2 100644 --- a/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java +++ b/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * CalculatedFieldId */ @JsonPropertyOrder({ - CalculatedFieldId.JSON_PROPERTY_ID, - CalculatedFieldId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class CalculatedFieldId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class CalculatedFieldId extends EntityId { public CalculatedFieldId() { } + @Override public CalculatedFieldId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public CalculatedFieldId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this CalculatedFieldId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CalculatedFieldId calculatedFieldId = (CalculatedFieldId) o; - return Objects.equals(this.id, calculatedFieldId.id) && - Objects.equals(this.entityType, calculatedFieldId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CalculatedFieldId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CalculatedFieldId", CalculatedFieldId.class); + JSON.registerDiscriminator(CalculatedFieldId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/ConverterId.java b/paas/src/main/java/org/thingsboard/client/model/ConverterId.java index 2e7da28c..95edeb7b 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ConverterId.java +++ b/paas/src/main/java/org/thingsboard/client/model/ConverterId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * ConverterId */ @JsonPropertyOrder({ - ConverterId.JSON_PROPERTY_ID, - ConverterId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class ConverterId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class ConverterId extends EntityId { public ConverterId() { } + @Override public ConverterId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public ConverterId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this ConverterId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ConverterId converterId = (ConverterId) o; - return Objects.equals(this.id, converterId.id) && - Objects.equals(this.entityType, converterId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ConverterId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ConverterId", ConverterId.class); + JSON.registerDiscriminator(ConverterId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java b/paas/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java index c9723eef..a4477fc6 100644 --- a/paas/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java @@ -64,12 +64,6 @@ public CsvReportTemplateConfig format(@javax.annotation.Nonnull TbReportFormat f return this; } - @Override - public CsvReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { - this.setEntityAliases(entityAliases); - return this; - } - @Override public CsvReportTemplateConfig filters(@javax.annotation.Nullable List filters) { this.setFilters(filters); @@ -83,7 +77,7 @@ public CsvReportTemplateConfig namePattern(@javax.annotation.Nullable String nam } @Override - public CsvReportTemplateConfig components(@javax.annotation.Nonnull List components) { + public CsvReportTemplateConfig components(@javax.annotation.Nullable List components) { this.setComponents(components); return this; } @@ -94,6 +88,12 @@ public CsvReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String return this; } + @Override + public CsvReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { + this.setEntityAliases(entityAliases); + return this; + } + /** * Return true if this CsvReportTemplateConfig object is equal to o. */ @@ -170,16 +170,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sformat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFormat())))); } - // add `entityAliases` to the URL query string - if (getEntityAliases() != null) { - for (int i = 0; i < getEntityAliases().size(); i++) { - if (getEntityAliases().get(i) != null) { - joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - // add `filters` to the URL query string if (getFilters() != null) { for (int i = 0; i < getFilters().size(); i++) { @@ -210,6 +200,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); } + // add `entityAliases` to the URL query string + if (getEntityAliases() != null) { + for (int i = 0; i < getEntityAliases().size(); i++) { + if (getEntityAliases().get(i) != null) { + joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/CustomMenuItem.java b/paas/src/main/java/org/thingsboard/client/model/CustomMenuItem.java index 4162f057..9fd7092c 100644 --- a/paas/src/main/java/org/thingsboard/client/model/CustomMenuItem.java +++ b/paas/src/main/java/org/thingsboard/client/model/CustomMenuItem.java @@ -53,7 +53,6 @@ CustomMenuItem.JSON_PROPERTY_HIDE_DASHBOARD_TOOLBAR, CustomMenuItem.JSON_PROPERTY_URL, CustomMenuItem.JSON_PROPERTY_SET_ACCESS_TOKEN, - CustomMenuItem.JSON_PROPERTY_VISIBLE, CustomMenuItem.JSON_PROPERTY_PAGES }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @@ -96,10 +95,6 @@ public class CustomMenuItem extends MenuItem { @javax.annotation.Nullable private Boolean setAccessToken; - public static final String JSON_PROPERTY_VISIBLE = "visible"; - @javax.annotation.Nullable - private Boolean visible; - public static final String JSON_PROPERTY_PAGES = "pages"; @javax.annotation.Nullable private List pages = new ArrayList<>(); @@ -299,30 +294,6 @@ public void setSetAccessToken(@javax.annotation.Nullable Boolean setAccessToken) } - public CustomMenuItem visible(@javax.annotation.Nullable Boolean visible) { - this.visible = visible; - return this; - } - - /** - * Mark if menu item is visible for user - * @return visible - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getVisible() { - return visible; - } - - - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setVisible(@javax.annotation.Nullable Boolean visible) { - this.visible = visible; - } - - public CustomMenuItem pages(@javax.annotation.Nullable List pages) { this.pages = pages; return this; @@ -361,6 +332,12 @@ public CustomMenuItem type(@javax.annotation.Nonnull MenuItemType type) { return this; } + @Override + public CustomMenuItem visible(@javax.annotation.Nullable Boolean visible) { + this.setVisible(visible); + return this; + } + /** * Return true if this CustomMenuItem object is equal to o. */ @@ -381,14 +358,13 @@ public boolean equals(Object o) { Objects.equals(this.hideDashboardToolbar, customMenuItem.hideDashboardToolbar) && Objects.equals(this.url, customMenuItem.url) && Objects.equals(this.setAccessToken, customMenuItem.setAccessToken) && - Objects.equals(this.visible, customMenuItem.visible) && Objects.equals(this.pages, customMenuItem.pages) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(name, icon, menuItemType, linkType, dashboardId, hideDashboardToolbar, url, setAccessToken, visible, pages, super.hashCode()); + return Objects.hash(name, icon, menuItemType, linkType, dashboardId, hideDashboardToolbar, url, setAccessToken, pages, super.hashCode()); } @Override @@ -404,7 +380,6 @@ public String toString() { sb.append(" hideDashboardToolbar: ").append(toIndentedString(hideDashboardToolbar)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append(" setAccessToken: ").append(toIndentedString(setAccessToken)).append("\n"); - sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); sb.append(" pages: ").append(toIndentedString(pages)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/paas/src/main/java/org/thingsboard/client/model/CustomMobilePage.java b/paas/src/main/java/org/thingsboard/client/model/CustomMobilePage.java index 832857f3..c17663a6 100644 --- a/paas/src/main/java/org/thingsboard/client/model/CustomMobilePage.java +++ b/paas/src/main/java/org/thingsboard/client/model/CustomMobilePage.java @@ -42,7 +42,6 @@ */ @JsonPropertyOrder({ CustomMobilePage.JSON_PROPERTY_LABEL, - CustomMobilePage.JSON_PROPERTY_VISIBLE, CustomMobilePage.JSON_PROPERTY_ICON, CustomMobilePage.JSON_PROPERTY_PATH }) @@ -58,10 +57,6 @@ public class CustomMobilePage extends MobilePage { @javax.annotation.Nullable private String label; - public static final String JSON_PROPERTY_VISIBLE = "visible"; - @javax.annotation.Nonnull - private Boolean visible; - public static final String JSON_PROPERTY_ICON = "icon"; @javax.annotation.Nullable private String icon; @@ -97,30 +92,6 @@ public void setLabel(@javax.annotation.Nullable String label) { } - public CustomMobilePage visible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - return this; - } - - /** - * Indicates if page is visible - * @return visible - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getVisible() { - return visible; - } - - - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVisible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - } - - public CustomMobilePage icon(@javax.annotation.Nullable String icon) { this.icon = icon; return this; @@ -175,6 +146,12 @@ public CustomMobilePage type(@javax.annotation.Nonnull MobilePageType type) { return this; } + @Override + public CustomMobilePage visible(@javax.annotation.Nullable Boolean visible) { + this.setVisible(visible); + return this; + } + /** * Return true if this CustomMobilePage object is equal to o. */ @@ -188,7 +165,6 @@ public boolean equals(Object o) { } CustomMobilePage customMobilePage = (CustomMobilePage) o; return Objects.equals(this.label, customMobilePage.label) && - Objects.equals(this.visible, customMobilePage.visible) && Objects.equals(this.icon, customMobilePage.icon) && Objects.equals(this.path, customMobilePage.path) && super.equals(o); @@ -196,7 +172,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(label, visible, icon, path, super.hashCode()); + return Objects.hash(label, icon, path, super.hashCode()); } @Override @@ -205,7 +181,6 @@ public String toString() { sb.append("class CustomMobilePage {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); sb.append(" path: ").append(toIndentedString(path)).append("\n"); sb.append("}"); diff --git a/paas/src/main/java/org/thingsboard/client/model/Customer.java b/paas/src/main/java/org/thingsboard/client/model/Customer.java index 36113d1e..a3c1d6a7 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Customer.java +++ b/paas/src/main/java/org/thingsboard/client/model/Customer.java @@ -144,14 +144,12 @@ public Customer() { public Customer( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId ) { this(); this.createdTime = createdTime; this.name = name; this.customerId = customerId; - this.ownerId = ownerId; } public Customer id(@javax.annotation.Nullable CustomerId id) { @@ -532,6 +530,11 @@ public CustomerId getCustomerId() { + public Customer ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -544,6 +547,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public Customer additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/CustomerId.java b/paas/src/main/java/org/thingsboard/client/model/CustomerId.java index b2bd00cd..0111bf30 100644 --- a/paas/src/main/java/org/thingsboard/client/model/CustomerId.java +++ b/paas/src/main/java/org/thingsboard/client/model/CustomerId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * CustomerId */ @JsonPropertyOrder({ - CustomerId.JSON_PROPERTY_ID, - CustomerId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class CustomerId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class CustomerId extends EntityId { public CustomerId() { } + @Override public CustomerId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public CustomerId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this CustomerId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CustomerId customerId = (CustomerId) o; - return Objects.equals(this.id, customerId.id) && - Objects.equals(this.entityType, customerId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CustomerId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CustomerId", CustomerId.class); + JSON.registerDiscriminator(CustomerId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/CustomerInfo.java b/paas/src/main/java/org/thingsboard/client/model/CustomerInfo.java index 4c459058..6973243e 100644 --- a/paas/src/main/java/org/thingsboard/client/model/CustomerInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/CustomerInfo.java @@ -158,15 +158,13 @@ public CustomerInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId ) { this(); this.createdTime = createdTime; this.ownerName = ownerName; this.name = name; this.customerId = customerId; - this.ownerId = ownerId; } public CustomerInfo id(@javax.annotation.Nullable CustomerId id) { @@ -593,6 +591,11 @@ public CustomerId getCustomerId() { + public CustomerInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -605,6 +608,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public CustomerInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/Dashboard.java b/paas/src/main/java/org/thingsboard/client/model/Dashboard.java index 5680d23b..d996aa87 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Dashboard.java +++ b/paas/src/main/java/org/thingsboard/client/model/Dashboard.java @@ -46,39 +46,23 @@ * Dashboard */ @JsonPropertyOrder({ - Dashboard.JSON_PROPERTY_ID, - Dashboard.JSON_PROPERTY_CREATED_TIME, - Dashboard.JSON_PROPERTY_TENANT_ID, - Dashboard.JSON_PROPERTY_CUSTOMER_ID, Dashboard.JSON_PROPERTY_TITLE, Dashboard.JSON_PROPERTY_IMAGE, - Dashboard.JSON_PROPERTY_ASSIGNED_CUSTOMERS, Dashboard.JSON_PROPERTY_MOBILE_HIDE, Dashboard.JSON_PROPERTY_MOBILE_ORDER, - Dashboard.JSON_PROPERTY_VERSION, - Dashboard.JSON_PROPERTY_RESOURCES, Dashboard.JSON_PROPERTY_CONFIGURATION, Dashboard.JSON_PROPERTY_NAME, - Dashboard.JSON_PROPERTY_OWNER_ID + Dashboard.JSON_PROPERTY_RESOURCES, + Dashboard.JSON_PROPERTY_ASSIGNED_CUSTOMERS, + Dashboard.JSON_PROPERTY_CREATED_TIME, + Dashboard.JSON_PROPERTY_CUSTOMER_ID, + Dashboard.JSON_PROPERTY_ID, + Dashboard.JSON_PROPERTY_OWNER_ID, + Dashboard.JSON_PROPERTY_TENANT_ID, + Dashboard.JSON_PROPERTY_VERSION }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class Dashboard { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nullable - private DashboardId id; - - public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; - @javax.annotation.Nullable - private Long createdTime; - - public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; - @javax.annotation.Nullable - private TenantId tenantId; - - public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; - @javax.annotation.Nullable - private CustomerId customerId; - public static final String JSON_PROPERTY_TITLE = "title"; @javax.annotation.Nullable private String title; @@ -87,10 +71,6 @@ public class Dashboard { @javax.annotation.Nullable private String image; - public static final String JSON_PROPERTY_ASSIGNED_CUSTOMERS = "assignedCustomers"; - @javax.annotation.Nullable - private Set assignedCustomers = new LinkedHashSet<>(); - public static final String JSON_PROPERTY_MOBILE_HIDE = "mobileHide"; @javax.annotation.Nullable private Boolean mobileHide; @@ -99,161 +79,201 @@ public class Dashboard { @javax.annotation.Nullable private Integer mobileOrder; - public static final String JSON_PROPERTY_VERSION = "version"; + public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; @javax.annotation.Nullable - private Long version; + private com.fasterxml.jackson.databind.JsonNode _configuration = null; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; public static final String JSON_PROPERTY_RESOURCES = "resources"; @javax.annotation.Nullable private List resources = new ArrayList<>(); - public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; + public static final String JSON_PROPERTY_ASSIGNED_CUSTOMERS = "assignedCustomers"; @javax.annotation.Nullable - private com.fasterxml.jackson.databind.JsonNode _configuration = null; + private Set assignedCustomers = new LinkedHashSet<>(); - public static final String JSON_PROPERTY_NAME = "name"; + public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; @javax.annotation.Nullable - private String name; + private Long createdTime; + + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + @javax.annotation.Nullable + private CustomerId customerId; + + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private DashboardId id; public static final String JSON_PROPERTY_OWNER_ID = "ownerId"; @javax.annotation.Nullable private EntityId ownerId; + public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; + @javax.annotation.Nullable + private TenantId tenantId; + + public static final String JSON_PROPERTY_VERSION = "version"; + @javax.annotation.Nullable + private Long version; + public Dashboard() { } @JsonCreator public Dashboard( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_IMAGE) String image, @JsonProperty(JSON_PROPERTY_MOBILE_HIDE) Boolean mobileHide, @JsonProperty(JSON_PROPERTY_MOBILE_ORDER) Integer mobileOrder, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId ) { this(); - this.createdTime = createdTime; - this.tenantId = tenantId; this.image = image; this.mobileHide = mobileHide; this.mobileOrder = mobileOrder; this.name = name; - this.ownerId = ownerId; + this.createdTime = createdTime; + this.tenantId = tenantId; } - public Dashboard id(@javax.annotation.Nullable DashboardId id) { - this.id = id; + public Dashboard title(@javax.annotation.Nullable String title) { + this.title = title; return this; } /** - * JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. - * @return id + * Title of the dashboard. + * @return title */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DashboardId getId() { - return id; + public String getTitle() { + return title; } - @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(@javax.annotation.Nullable DashboardId id) { - this.id = id; + public void setTitle(@javax.annotation.Nullable String title) { + this.title = title; } /** - * Timestamp of the dashboard creation, in milliseconds - * @return createdTime + * Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. + * @return image */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CREATED_TIME, required = false) + @JsonProperty(value = JSON_PROPERTY_IMAGE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCreatedTime() { - return createdTime; + public String getImage() { + return image; } /** - * JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. - * @return tenantId + * Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. + * @return mobileHide */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_MOBILE_HIDE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TenantId getTenantId() { - return tenantId; + public Boolean getMobileHide() { + return mobileHide; } - public Dashboard customerId(@javax.annotation.Nullable CustomerId customerId) { - this.customerId = customerId; + /** + * Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications + * @return mobileOrder + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_MOBILE_ORDER, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getMobileOrder() { + return mobileOrder; + } + + + + + public Dashboard _configuration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { + this._configuration = _configuration; return this; } /** - * JSON object with Customer Id. - * @return customerId + * Get _configuration + * @return _configuration */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CustomerId getCustomerId() { - return customerId; + public com.fasterxml.jackson.databind.JsonNode getConfiguration() { + return _configuration; } - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerId(@javax.annotation.Nullable CustomerId customerId) { - this.customerId = customerId; + public void setConfiguration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { + this._configuration = _configuration; } - public Dashboard title(@javax.annotation.Nullable String title) { - this.title = title; - return this; - } - /** - * Title of the dashboard. - * @return title + * Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. + * @return name */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) + @JsonProperty(value = JSON_PROPERTY_NAME, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; + public String getName() { + return name; } - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(@javax.annotation.Nullable String title) { - this.title = title; + + + public Dashboard resources(@javax.annotation.Nullable List resources) { + this.resources = resources; + return this; } + public Dashboard addResourcesItem(ResourceExportData resourcesItem) { + if (this.resources == null) { + this.resources = new ArrayList<>(); + } + this.resources.add(resourcesItem); + return this; + } /** - * Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. - * @return image + * Get resources + * @return resources */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IMAGE, required = false) + @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getImage() { - return image; + public List getResources() { + return resources; } + @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResources(@javax.annotation.Nullable List resources) { + this.resources = resources; + } public Dashboard assignedCustomers(@javax.annotation.Nullable Set assignedCustomers) { @@ -290,139 +310,127 @@ public void setAssignedCustomers(@javax.annotation.Nullable Set resources) { - this.resources = resources; - return this; - } - - public Dashboard addResourcesItem(ResourceExportData resourcesItem) { - if (this.resources == null) { - this.resources = new ArrayList<>(); - } - this.resources.add(resourcesItem); + public Dashboard id(@javax.annotation.Nullable DashboardId id) { + this.id = id; return this; } /** - * Get resources - * @return resources + * JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. + * @return id */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) + @JsonProperty(value = JSON_PROPERTY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getResources() { - return resources; + public DashboardId getId() { + return id; } - @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) + @JsonProperty(value = JSON_PROPERTY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResources(@javax.annotation.Nullable List resources) { - this.resources = resources; + public void setId(@javax.annotation.Nullable DashboardId id) { + this.id = id; } - public Dashboard _configuration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { - this._configuration = _configuration; + public Dashboard ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; return this; } /** - * Get _configuration - * @return _configuration + * JSON object with Customer or Tenant Id + * @return ownerId */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public com.fasterxml.jackson.databind.JsonNode getConfiguration() { - return _configuration; + public EntityId getOwnerId() { + return ownerId; } - @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setConfiguration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { - this._configuration = _configuration; + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; } /** - * Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. - * @return name + * JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. + * @return tenantId */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_NAME, required = false) + @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; + public TenantId getTenantId() { + return tenantId; } + public Dashboard version(@javax.annotation.Nullable Long version) { + this.version = version; + return this; + } + /** - * JSON object with Customer or Tenant Id - * @return ownerId + * Get version + * @return version */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_VERSION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EntityId getOwnerId() { - return ownerId; + public Long getVersion() { + return version; } + @JsonProperty(value = JSON_PROPERTY_VERSION, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVersion(@javax.annotation.Nullable Long version) { + this.version = version; + } /** @@ -437,45 +445,45 @@ public boolean equals(Object o) { return false; } Dashboard dashboard = (Dashboard) o; - return Objects.equals(this.id, dashboard.id) && - Objects.equals(this.createdTime, dashboard.createdTime) && - Objects.equals(this.tenantId, dashboard.tenantId) && - Objects.equals(this.customerId, dashboard.customerId) && - Objects.equals(this.title, dashboard.title) && + return Objects.equals(this.title, dashboard.title) && Objects.equals(this.image, dashboard.image) && - Objects.equals(this.assignedCustomers, dashboard.assignedCustomers) && Objects.equals(this.mobileHide, dashboard.mobileHide) && Objects.equals(this.mobileOrder, dashboard.mobileOrder) && - Objects.equals(this.version, dashboard.version) && - Objects.equals(this.resources, dashboard.resources) && Objects.equals(this._configuration, dashboard._configuration) && Objects.equals(this.name, dashboard.name) && - Objects.equals(this.ownerId, dashboard.ownerId); + Objects.equals(this.resources, dashboard.resources) && + Objects.equals(this.assignedCustomers, dashboard.assignedCustomers) && + Objects.equals(this.createdTime, dashboard.createdTime) && + Objects.equals(this.customerId, dashboard.customerId) && + Objects.equals(this.id, dashboard.id) && + Objects.equals(this.ownerId, dashboard.ownerId) && + Objects.equals(this.tenantId, dashboard.tenantId) && + Objects.equals(this.version, dashboard.version); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, customerId, title, image, assignedCustomers, mobileHide, mobileOrder, version, resources, _configuration, name, ownerId); + return Objects.hash(title, image, mobileHide, mobileOrder, _configuration, name, resources, assignedCustomers, createdTime, customerId, id, ownerId, tenantId, version); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Dashboard {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); - sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" image: ").append(toIndentedString(image)).append("\n"); - sb.append(" assignedCustomers: ").append(toIndentedString(assignedCustomers)).append("\n"); sb.append(" mobileHide: ").append(toIndentedString(mobileHide)).append("\n"); sb.append(" mobileOrder: ").append(toIndentedString(mobileOrder)).append("\n"); - sb.append(" version: ").append(toIndentedString(version)).append("\n"); - sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); + sb.append(" assignedCustomers: ").append(toIndentedString(assignedCustomers)).append("\n"); + sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append("}"); return sb.toString(); } @@ -523,26 +531,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(getId().toUrlQueryString(prefix + "id" + suffix)); - } - - // add `createdTime` to the URL query string - if (getCreatedTime() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%screatedTime%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedTime())))); - } - - // add `tenantId` to the URL query string - if (getTenantId() != null) { - joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix)); - } - - // add `customerId` to the URL query string - if (getCustomerId() != null) { - joiner.add(getCustomerId().toUrlQueryString(prefix + "customerId" + suffix)); - } - // add `title` to the URL query string if (getTitle() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); @@ -553,18 +541,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%simage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getImage())))); } - // add `assignedCustomers` to the URL query string - if (getAssignedCustomers() != null) { - int i = 0; - for (ShortCustomerInfo _item : getAssignedCustomers()) { - if (_item != null) { - joiner.add(_item.toUrlQueryString(String.format(java.util.Locale.ROOT, "%sassignedCustomers%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - i++; - } - // add `mobileHide` to the URL query string if (getMobileHide() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%smobileHide%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMobileHide())))); @@ -575,9 +551,14 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smobileOrder%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMobileOrder())))); } - // add `version` to the URL query string - if (getVersion() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); + // add `configuration` to the URL query string + if (getConfiguration() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sconfiguration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfiguration())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); } // add `resources` to the URL query string @@ -590,14 +571,31 @@ public String toUrlQueryString(String prefix) { } } - // add `configuration` to the URL query string - if (getConfiguration() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sconfiguration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfiguration())))); + // add `assignedCustomers` to the URL query string + if (getAssignedCustomers() != null) { + int i = 0; + for (ShortCustomerInfo _item : getAssignedCustomers()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format(java.util.Locale.ROOT, "%sassignedCustomers%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; } - // add `name` to the URL query string - if (getName() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + // add `createdTime` to the URL query string + if (getCreatedTime() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%screatedTime%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedTime())))); + } + + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(getCustomerId().toUrlQueryString(prefix + "customerId" + suffix)); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(getId().toUrlQueryString(prefix + "id" + suffix)); } // add `ownerId` to the URL query string @@ -605,6 +603,16 @@ public String toUrlQueryString(String prefix) { joiner.add(getOwnerId().toUrlQueryString(prefix + "ownerId" + suffix)); } + // add `tenantId` to the URL query string + if (getTenantId() != null) { + joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix)); + } + + // add `version` to the URL query string + if (getVersion() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); + } + return joiner.toString(); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/DashboardId.java b/paas/src/main/java/org/thingsboard/client/model/DashboardId.java index 1ce6e6f6..56d8e5b5 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DashboardId.java +++ b/paas/src/main/java/org/thingsboard/client/model/DashboardId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * DashboardId */ @JsonPropertyOrder({ - DashboardId.JSON_PROPERTY_ID, - DashboardId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class DashboardId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class DashboardId extends EntityId { public DashboardId() { } + @Override public DashboardId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public DashboardId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this DashboardId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DashboardId dashboardId = (DashboardId) o; - return Objects.equals(this.id, dashboardId.id) && - Objects.equals(this.entityType, dashboardId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DashboardId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DashboardId", DashboardId.class); + JSON.registerDiscriminator(DashboardId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/DashboardInfo.java b/paas/src/main/java/org/thingsboard/client/model/DashboardInfo.java index fd250aca..5afd133e 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DashboardInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/DashboardInfo.java @@ -141,8 +141,7 @@ public DashboardInfo( @JsonProperty(JSON_PROPERTY_NAME) String name, @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName ) { this(); this.image = image; @@ -152,7 +151,6 @@ public DashboardInfo( this.createdTime = createdTime; this.tenantId = tenantId; this.ownerName = ownerName; - this.ownerId = ownerId; } public DashboardInfo title(@javax.annotation.Nullable String title) { @@ -470,6 +468,11 @@ public void setGroups(@javax.annotation.Nullable List groups) { } + public DashboardInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -482,6 +485,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/DashboardPage.java b/paas/src/main/java/org/thingsboard/client/model/DashboardPage.java index f20ac3ac..0586ad5d 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DashboardPage.java +++ b/paas/src/main/java/org/thingsboard/client/model/DashboardPage.java @@ -42,7 +42,6 @@ */ @JsonPropertyOrder({ DashboardPage.JSON_PROPERTY_LABEL, - DashboardPage.JSON_PROPERTY_VISIBLE, DashboardPage.JSON_PROPERTY_ICON, DashboardPage.JSON_PROPERTY_DASHBOARD_ID }) @@ -58,10 +57,6 @@ public class DashboardPage extends MobilePage { @javax.annotation.Nullable private String label; - public static final String JSON_PROPERTY_VISIBLE = "visible"; - @javax.annotation.Nonnull - private Boolean visible; - public static final String JSON_PROPERTY_ICON = "icon"; @javax.annotation.Nullable private String icon; @@ -97,30 +92,6 @@ public void setLabel(@javax.annotation.Nullable String label) { } - public DashboardPage visible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - return this; - } - - /** - * Indicates if page is visible - * @return visible - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getVisible() { - return visible; - } - - - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVisible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - } - - public DashboardPage icon(@javax.annotation.Nullable String icon) { this.icon = icon; return this; @@ -175,6 +146,12 @@ public DashboardPage type(@javax.annotation.Nonnull MobilePageType type) { return this; } + @Override + public DashboardPage visible(@javax.annotation.Nullable Boolean visible) { + this.setVisible(visible); + return this; + } + /** * Return true if this DashboardPage object is equal to o. */ @@ -188,7 +165,6 @@ public boolean equals(Object o) { } DashboardPage dashboardPage = (DashboardPage) o; return Objects.equals(this.label, dashboardPage.label) && - Objects.equals(this.visible, dashboardPage.visible) && Objects.equals(this.icon, dashboardPage.icon) && Objects.equals(this.dashboardId, dashboardPage.dashboardId) && super.equals(o); @@ -196,7 +172,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(label, visible, icon, dashboardId, super.hashCode()); + return Objects.hash(label, icon, dashboardId, super.hashCode()); } @Override @@ -205,7 +181,6 @@ public String toString() { sb.append("class DashboardPage {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); sb.append(" dashboardId: ").append(toIndentedString(dashboardId)).append("\n"); sb.append("}"); diff --git a/paas/src/main/java/org/thingsboard/client/model/DebugConverterEventFilter.java b/paas/src/main/java/org/thingsboard/client/model/DebugConverterEventFilter.java index c4c9d492..215d08da 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DebugConverterEventFilter.java +++ b/paas/src/main/java/org/thingsboard/client/model/DebugConverterEventFilter.java @@ -47,8 +47,8 @@ DebugConverterEventFilter.JSON_PROPERTY_IN, DebugConverterEventFilter.JSON_PROPERTY_OUT, DebugConverterEventFilter.JSON_PROPERTY_METADATA, - DebugConverterEventFilter.JSON_PROPERTY_IS_ERROR, - DebugConverterEventFilter.JSON_PROPERTY_ERROR + DebugConverterEventFilter.JSON_PROPERTY_ERROR, + DebugConverterEventFilter.JSON_PROPERTY_IS_ERROR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -82,14 +82,14 @@ public class DebugConverterEventFilter extends EventFilter { @javax.annotation.Nullable private String metadata; - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public static final String JSON_PROPERTY_ERROR = "error"; @javax.annotation.Nullable private Boolean error; + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private Boolean isError; + public DebugConverterEventFilter() { } @@ -237,51 +237,51 @@ public void setMetadata(@javax.annotation.Nullable String metadata) { } - public DebugConverterEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public DebugConverterEventFilter error(@javax.annotation.Nullable Boolean error) { + this.error = error; return this; } /** - * Get isError - * @return isError + * Get error + * @return error */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; + public Boolean getError() { + return error; } - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public void setError(@javax.annotation.Nullable Boolean error) { + this.error = error; } - public DebugConverterEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; + public DebugConverterEventFilter isError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; return this; } /** - * Get error - * @return error + * Get isError + * @return isError */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; + public Boolean getIsError() { + return isError; } - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; + public void setIsError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; } @@ -315,14 +315,14 @@ public boolean equals(Object o) { Objects.equals(this.in, debugConverterEventFilter.in) && Objects.equals(this.out, debugConverterEventFilter.out) && Objects.equals(this.metadata, debugConverterEventFilter.metadata) && - Objects.equals(this.isError, debugConverterEventFilter.isError) && Objects.equals(this.error, debugConverterEventFilter.error) && + Objects.equals(this.isError, debugConverterEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, type, in, out, metadata, isError, error, super.hashCode()); + return Objects.hash(server, errorStr, type, in, out, metadata, error, isError, super.hashCode()); } @Override @@ -336,8 +336,8 @@ public String toString() { sb.append(" in: ").append(toIndentedString(in)).append("\n"); sb.append(" out: ").append(toIndentedString(out)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -425,16 +425,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smetadata%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMetadata())))); } - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - // add `error` to the URL query string if (getError() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/DebugIntegrationEventFilter.java b/paas/src/main/java/org/thingsboard/client/model/DebugIntegrationEventFilter.java index ea6e38e1..fd8c55ec 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DebugIntegrationEventFilter.java +++ b/paas/src/main/java/org/thingsboard/client/model/DebugIntegrationEventFilter.java @@ -46,8 +46,8 @@ DebugIntegrationEventFilter.JSON_PROPERTY_TYPE, DebugIntegrationEventFilter.JSON_PROPERTY_MESSAGE, DebugIntegrationEventFilter.JSON_PROPERTY_STATUS_INTEGRATION, - DebugIntegrationEventFilter.JSON_PROPERTY_IS_ERROR, - DebugIntegrationEventFilter.JSON_PROPERTY_ERROR + DebugIntegrationEventFilter.JSON_PROPERTY_ERROR, + DebugIntegrationEventFilter.JSON_PROPERTY_IS_ERROR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -77,14 +77,14 @@ public class DebugIntegrationEventFilter extends EventFilter { @javax.annotation.Nullable private String statusIntegration; - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public static final String JSON_PROPERTY_ERROR = "error"; @javax.annotation.Nullable private Boolean error; + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private Boolean isError; + public DebugIntegrationEventFilter() { } @@ -208,51 +208,51 @@ public void setStatusIntegration(@javax.annotation.Nullable String statusIntegra } - public DebugIntegrationEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public DebugIntegrationEventFilter error(@javax.annotation.Nullable Boolean error) { + this.error = error; return this; } /** - * Get isError - * @return isError + * Get error + * @return error */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; + public Boolean getError() { + return error; } - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public void setError(@javax.annotation.Nullable Boolean error) { + this.error = error; } - public DebugIntegrationEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; + public DebugIntegrationEventFilter isError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; return this; } /** - * Get error - * @return error + * Get isError + * @return isError */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; + public Boolean getIsError() { + return isError; } - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; + public void setIsError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; } @@ -285,14 +285,14 @@ public boolean equals(Object o) { Objects.equals(this.type, debugIntegrationEventFilter.type) && Objects.equals(this.message, debugIntegrationEventFilter.message) && Objects.equals(this.statusIntegration, debugIntegrationEventFilter.statusIntegration) && - Objects.equals(this.isError, debugIntegrationEventFilter.isError) && Objects.equals(this.error, debugIntegrationEventFilter.error) && + Objects.equals(this.isError, debugIntegrationEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, type, message, statusIntegration, isError, error, super.hashCode()); + return Objects.hash(server, errorStr, type, message, statusIntegration, error, isError, super.hashCode()); } @Override @@ -305,8 +305,8 @@ public String toString() { sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" statusIntegration: ").append(toIndentedString(statusIntegration)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -389,16 +389,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstatusIntegration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatusIntegration())))); } - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - // add `error` to the URL query string if (getError() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/DefaultMenuItem.java b/paas/src/main/java/org/thingsboard/client/model/DefaultMenuItem.java index 7051ae92..9f8a7169 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DefaultMenuItem.java +++ b/paas/src/main/java/org/thingsboard/client/model/DefaultMenuItem.java @@ -46,7 +46,6 @@ DefaultMenuItem.JSON_PROPERTY_ID, DefaultMenuItem.JSON_PROPERTY_NAME, DefaultMenuItem.JSON_PROPERTY_ICON, - DefaultMenuItem.JSON_PROPERTY_VISIBLE, DefaultMenuItem.JSON_PROPERTY_PAGES }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @@ -69,10 +68,6 @@ public class DefaultMenuItem extends MenuItem { @javax.annotation.Nullable private String icon; - public static final String JSON_PROPERTY_VISIBLE = "visible"; - @javax.annotation.Nullable - private Boolean visible; - public static final String JSON_PROPERTY_PAGES = "pages"; @javax.annotation.Nullable private List pages = new ArrayList<>(); @@ -150,30 +145,6 @@ public void setIcon(@javax.annotation.Nullable String icon) { } - public DefaultMenuItem visible(@javax.annotation.Nullable Boolean visible) { - this.visible = visible; - return this; - } - - /** - * Mark if menu item is visible for user - * @return visible - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getVisible() { - return visible; - } - - - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setVisible(@javax.annotation.Nullable Boolean visible) { - this.visible = visible; - } - - public DefaultMenuItem pages(@javax.annotation.Nullable List pages) { this.pages = pages; return this; @@ -212,6 +183,12 @@ public DefaultMenuItem type(@javax.annotation.Nonnull MenuItemType type) { return this; } + @Override + public DefaultMenuItem visible(@javax.annotation.Nullable Boolean visible) { + this.setVisible(visible); + return this; + } + /** * Return true if this DefaultMenuItem object is equal to o. */ @@ -227,14 +204,13 @@ public boolean equals(Object o) { return Objects.equals(this.id, defaultMenuItem.id) && Objects.equals(this.name, defaultMenuItem.name) && Objects.equals(this.icon, defaultMenuItem.icon) && - Objects.equals(this.visible, defaultMenuItem.visible) && Objects.equals(this.pages, defaultMenuItem.pages) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, name, icon, visible, pages, super.hashCode()); + return Objects.hash(id, name, icon, pages, super.hashCode()); } @Override @@ -245,7 +221,6 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); - sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); sb.append(" pages: ").append(toIndentedString(pages)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/paas/src/main/java/org/thingsboard/client/model/DefaultMobilePage.java b/paas/src/main/java/org/thingsboard/client/model/DefaultMobilePage.java index 7a9fb2c7..6829d257 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DefaultMobilePage.java +++ b/paas/src/main/java/org/thingsboard/client/model/DefaultMobilePage.java @@ -43,7 +43,6 @@ */ @JsonPropertyOrder({ DefaultMobilePage.JSON_PROPERTY_LABEL, - DefaultMobilePage.JSON_PROPERTY_VISIBLE, DefaultMobilePage.JSON_PROPERTY_ICON, DefaultMobilePage.JSON_PROPERTY_ID }) @@ -59,10 +58,6 @@ public class DefaultMobilePage extends MobilePage { @javax.annotation.Nullable private String label; - public static final String JSON_PROPERTY_VISIBLE = "visible"; - @javax.annotation.Nonnull - private Boolean visible; - public static final String JSON_PROPERTY_ICON = "icon"; @javax.annotation.Nullable private String icon; @@ -98,30 +93,6 @@ public void setLabel(@javax.annotation.Nullable String label) { } - public DefaultMobilePage visible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - return this; - } - - /** - * Indicates if page is visible - * @return visible - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getVisible() { - return visible; - } - - - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVisible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - } - - public DefaultMobilePage icon(@javax.annotation.Nullable String icon) { this.icon = icon; return this; @@ -176,6 +147,12 @@ public DefaultMobilePage type(@javax.annotation.Nonnull MobilePageType type) { return this; } + @Override + public DefaultMobilePage visible(@javax.annotation.Nullable Boolean visible) { + this.setVisible(visible); + return this; + } + /** * Return true if this DefaultMobilePage object is equal to o. */ @@ -189,7 +166,6 @@ public boolean equals(Object o) { } DefaultMobilePage defaultMobilePage = (DefaultMobilePage) o; return Objects.equals(this.label, defaultMobilePage.label) && - Objects.equals(this.visible, defaultMobilePage.visible) && Objects.equals(this.icon, defaultMobilePage.icon) && Objects.equals(this.id, defaultMobilePage.id) && super.equals(o); @@ -197,7 +173,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(label, visible, icon, id, super.hashCode()); + return Objects.hash(label, icon, id, super.hashCode()); } @Override @@ -206,7 +182,6 @@ public String toString() { sb.append("class DefaultMobilePage {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append("}"); diff --git a/paas/src/main/java/org/thingsboard/client/model/Device.java b/paas/src/main/java/org/thingsboard/client/model/Device.java index 4d5c2625..f0caea76 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Device.java +++ b/paas/src/main/java/org/thingsboard/client/model/Device.java @@ -122,14 +122,12 @@ public Device() { public Device( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; - this.ownerId = ownerId; } public Device id(@javax.annotation.Nullable DeviceId id) { @@ -390,6 +388,11 @@ public void setDeviceData(@javax.annotation.Nullable DeviceData deviceData) { } + public Device ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -402,6 +405,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public Device additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java index 937ead2e..c9a48f24 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public DeviceActivityRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public DeviceActivityRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/paas/src/main/java/org/thingsboard/client/model/DeviceId.java b/paas/src/main/java/org/thingsboard/client/model/DeviceId.java index 71906074..6088bccf 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DeviceId.java +++ b/paas/src/main/java/org/thingsboard/client/model/DeviceId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * DeviceId */ @JsonPropertyOrder({ - DeviceId.JSON_PROPERTY_ID, - DeviceId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class DeviceId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class DeviceId extends EntityId { public DeviceId() { } + @Override public DeviceId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public DeviceId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this DeviceId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DeviceId deviceId = (DeviceId) o; - return Objects.equals(this.id, deviceId.id) && - Objects.equals(this.entityType, deviceId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeviceId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DeviceId", DeviceId.class); + JSON.registerDiscriminator(DeviceId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/DeviceInfo.java b/paas/src/main/java/org/thingsboard/client/model/DeviceInfo.java index 854fcbbc..396c94f8 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DeviceInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/DeviceInfo.java @@ -142,8 +142,7 @@ public DeviceInfo( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, - @JsonProperty(JSON_PROPERTY_ACTIVE) Boolean active, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_ACTIVE) Boolean active ) { this(); this.createdTime = createdTime; @@ -151,7 +150,6 @@ public DeviceInfo( this.customerId = customerId; this.ownerName = ownerName; this.active = active; - this.ownerId = ownerId; } public DeviceInfo id(@javax.annotation.Nullable DeviceId id) { @@ -472,6 +470,11 @@ public void setDeviceData(@javax.annotation.Nullable DeviceData deviceData) { } + public DeviceInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -484,6 +487,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public DeviceInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/DeviceProfileId.java b/paas/src/main/java/org/thingsboard/client/model/DeviceProfileId.java index 3b7101a2..750f9962 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DeviceProfileId.java +++ b/paas/src/main/java/org/thingsboard/client/model/DeviceProfileId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * DeviceProfileId */ @JsonPropertyOrder({ - DeviceProfileId.JSON_PROPERTY_ID, - DeviceProfileId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class DeviceProfileId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class DeviceProfileId extends EntityId { public DeviceProfileId() { } + @Override public DeviceProfileId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public DeviceProfileId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this DeviceProfileId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DeviceProfileId deviceProfileId = (DeviceProfileId) o; - return Objects.equals(this.id, deviceProfileId.id) && - Objects.equals(this.entityType, deviceProfileId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeviceProfileId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DeviceProfileId", DeviceProfileId.class); + JSON.registerDiscriminator(DeviceProfileId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/Domain.java b/paas/src/main/java/org/thingsboard/client/model/Domain.java index 93d706e3..39f85c01 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Domain.java +++ b/paas/src/main/java/org/thingsboard/client/model/Domain.java @@ -87,12 +87,10 @@ public Domain() { @JsonCreator public Domain( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime ) { this(); this.createdTime = createdTime; - this.ownerId = ownerId; } public Domain id(@javax.annotation.Nullable DomainId id) { @@ -253,6 +251,11 @@ public void setPropagateToEdge(@javax.annotation.Nullable Boolean propagateToEdg } + public Domain ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -265,6 +268,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/DomainId.java b/paas/src/main/java/org/thingsboard/client/model/DomainId.java index 1ad2f2c8..e89b114e 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DomainId.java +++ b/paas/src/main/java/org/thingsboard/client/model/DomainId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * DomainId */ @JsonPropertyOrder({ - DomainId.JSON_PROPERTY_ID, - DomainId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class DomainId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class DomainId extends EntityId { public DomainId() { } + @Override public DomainId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public DomainId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * Get entityType - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this DomainId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DomainId domainId = (DomainId) o; - return Objects.equals(this.id, domainId.id) && - Objects.equals(this.entityType, domainId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DomainId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DomainId", DomainId.class); + JSON.registerDiscriminator(DomainId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/DomainInfo.java b/paas/src/main/java/org/thingsboard/client/model/DomainInfo.java index dd138d2d..24bd87d1 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DomainInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/DomainInfo.java @@ -95,12 +95,10 @@ public DomainInfo() { @JsonCreator public DomainInfo( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime ) { this(); this.createdTime = createdTime; - this.ownerId = ownerId; } public DomainInfo id(@javax.annotation.Nullable DomainId id) { @@ -293,6 +291,11 @@ public void setOauth2ClientInfos(@javax.annotation.Nullable List targets) { @Override - public EdgeCommunicationFailureRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public EdgeCommunicationFailureRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/paas/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java index e8a8443d..2da5cf25 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public EdgeConnectionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public EdgeConnectionRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/paas/src/main/java/org/thingsboard/client/model/EdgeId.java b/paas/src/main/java/org/thingsboard/client/model/EdgeId.java index be01b1a0..e508e60c 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EdgeId.java +++ b/paas/src/main/java/org/thingsboard/client/model/EdgeId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * EdgeId */ @JsonPropertyOrder({ - EdgeId.JSON_PROPERTY_ID, - EdgeId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class EdgeId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class EdgeId extends EntityId { public EdgeId() { } + @Override public EdgeId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public EdgeId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this EdgeId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - EdgeId edgeId = (EdgeId) o; - return Objects.equals(this.id, edgeId.id) && - Objects.equals(this.entityType, edgeId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EdgeId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EdgeId", EdgeId.class); + JSON.registerDiscriminator(EdgeId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/EdgeInfo.java b/paas/src/main/java/org/thingsboard/client/model/EdgeInfo.java index 0dc61d69..f042bc5b 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EdgeInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/EdgeInfo.java @@ -146,8 +146,7 @@ public EdgeInfo( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_ROOT_RULE_CHAIN_ID) RuleChainId rootRuleChainId, - @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName ) { this(); this.createdTime = createdTime; @@ -155,7 +154,6 @@ public EdgeInfo( this.customerId = customerId; this.rootRuleChainId = rootRuleChainId; this.ownerName = ownerName; - this.ownerId = ownerId; } public EdgeInfo id(@javax.annotation.Nullable EdgeId id) { @@ -500,6 +498,11 @@ public void setGroups(@javax.annotation.Nullable List groups) { } + public EdgeInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * Get ownerId * @return ownerId @@ -512,6 +515,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public EdgeInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java index 0008b4fc..c849c32a 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public EntitiesLimitRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public EntitiesLimitRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java index 80c67578..384475ac 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public EntityActionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public EntityActionRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityAggregationCalculatedFieldConfiguration.java b/paas/src/main/java/org/thingsboard/client/model/EntityAggregationCalculatedFieldConfiguration.java index e44bb987..5e62d1d6 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityAggregationCalculatedFieldConfiguration.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityAggregationCalculatedFieldConfiguration.java @@ -48,10 +48,10 @@ */ @JsonPropertyOrder({ EntityAggregationCalculatedFieldConfiguration.JSON_PROPERTY_ARGUMENTS, - EntityAggregationCalculatedFieldConfiguration.JSON_PROPERTY_METRICS, EntityAggregationCalculatedFieldConfiguration.JSON_PROPERTY_INTERVAL, - EntityAggregationCalculatedFieldConfiguration.JSON_PROPERTY_WATERMARK, - EntityAggregationCalculatedFieldConfiguration.JSON_PROPERTY_PRODUCE_INTERMEDIATE_RESULT + EntityAggregationCalculatedFieldConfiguration.JSON_PROPERTY_METRICS, + EntityAggregationCalculatedFieldConfiguration.JSON_PROPERTY_PRODUCE_INTERMEDIATE_RESULT, + EntityAggregationCalculatedFieldConfiguration.JSON_PROPERTY_WATERMARK }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -65,22 +65,22 @@ public class EntityAggregationCalculatedFieldConfiguration extends CalculatedFie @javax.annotation.Nonnull private Map arguments = new HashMap<>(); - public static final String JSON_PROPERTY_METRICS = "metrics"; - @javax.annotation.Nonnull - private Map metrics = new HashMap<>(); - public static final String JSON_PROPERTY_INTERVAL = "interval"; @javax.annotation.Nonnull private AggInterval interval; - public static final String JSON_PROPERTY_WATERMARK = "watermark"; - @javax.annotation.Nullable - private Watermark watermark; + public static final String JSON_PROPERTY_METRICS = "metrics"; + @javax.annotation.Nonnull + private Map metrics = new HashMap<>(); public static final String JSON_PROPERTY_PRODUCE_INTERMEDIATE_RESULT = "produceIntermediateResult"; @javax.annotation.Nullable private Boolean produceIntermediateResult; + public static final String JSON_PROPERTY_WATERMARK = "watermark"; + @javax.annotation.Nullable + private Watermark watermark; + public EntityAggregationCalculatedFieldConfiguration() { } @@ -116,6 +116,30 @@ public void setArguments(@javax.annotation.Nonnull Map argumen } + public EntityAggregationCalculatedFieldConfiguration interval(@javax.annotation.Nonnull AggInterval interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * @return interval + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_INTERVAL, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AggInterval getInterval() { + return interval; + } + + + @JsonProperty(value = JSON_PROPERTY_INTERVAL, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInterval(@javax.annotation.Nonnull AggInterval interval) { + this.interval = interval; + } + + public EntityAggregationCalculatedFieldConfiguration metrics(@javax.annotation.Nonnull Map metrics) { this.metrics = metrics; return this; @@ -148,27 +172,27 @@ public void setMetrics(@javax.annotation.Nonnull Map metrics) } - public EntityAggregationCalculatedFieldConfiguration interval(@javax.annotation.Nonnull AggInterval interval) { - this.interval = interval; + public EntityAggregationCalculatedFieldConfiguration produceIntermediateResult(@javax.annotation.Nullable Boolean produceIntermediateResult) { + this.produceIntermediateResult = produceIntermediateResult; return this; } /** - * Get interval - * @return interval + * Get produceIntermediateResult + * @return produceIntermediateResult */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_INTERVAL, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AggInterval getInterval() { - return interval; + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PRODUCE_INTERMEDIATE_RESULT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getProduceIntermediateResult() { + return produceIntermediateResult; } - @JsonProperty(value = JSON_PROPERTY_INTERVAL, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setInterval(@javax.annotation.Nonnull AggInterval interval) { - this.interval = interval; + @JsonProperty(value = JSON_PROPERTY_PRODUCE_INTERMEDIATE_RESULT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProduceIntermediateResult(@javax.annotation.Nullable Boolean produceIntermediateResult) { + this.produceIntermediateResult = produceIntermediateResult; } @@ -196,42 +220,18 @@ public void setWatermark(@javax.annotation.Nullable Watermark watermark) { } - public EntityAggregationCalculatedFieldConfiguration produceIntermediateResult(@javax.annotation.Nullable Boolean produceIntermediateResult) { - this.produceIntermediateResult = produceIntermediateResult; + @Override + public EntityAggregationCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { + this.setOutput(output); return this; } - /** - * Get produceIntermediateResult - * @return produceIntermediateResult - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PRODUCE_INTERMEDIATE_RESULT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getProduceIntermediateResult() { - return produceIntermediateResult; - } - - - @JsonProperty(value = JSON_PROPERTY_PRODUCE_INTERMEDIATE_RESULT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProduceIntermediateResult(@javax.annotation.Nullable Boolean produceIntermediateResult) { - this.produceIntermediateResult = produceIntermediateResult; - } - - @Override public EntityAggregationCalculatedFieldConfiguration aiGenerated(@javax.annotation.Nullable Boolean aiGenerated) { this.setAiGenerated(aiGenerated); return this; } - @Override - public EntityAggregationCalculatedFieldConfiguration output(@javax.annotation.Nonnull Output output) { - this.setOutput(output); - return this; - } - @Override public EntityAggregationCalculatedFieldConfiguration type(@javax.annotation.Nonnull String type) { this.setType(type); @@ -251,16 +251,16 @@ public boolean equals(Object o) { } EntityAggregationCalculatedFieldConfiguration entityAggregationCalculatedFieldConfiguration = (EntityAggregationCalculatedFieldConfiguration) o; return Objects.equals(this.arguments, entityAggregationCalculatedFieldConfiguration.arguments) && - Objects.equals(this.metrics, entityAggregationCalculatedFieldConfiguration.metrics) && Objects.equals(this.interval, entityAggregationCalculatedFieldConfiguration.interval) && - Objects.equals(this.watermark, entityAggregationCalculatedFieldConfiguration.watermark) && + Objects.equals(this.metrics, entityAggregationCalculatedFieldConfiguration.metrics) && Objects.equals(this.produceIntermediateResult, entityAggregationCalculatedFieldConfiguration.produceIntermediateResult) && + Objects.equals(this.watermark, entityAggregationCalculatedFieldConfiguration.watermark) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(arguments, metrics, interval, watermark, produceIntermediateResult, super.hashCode()); + return Objects.hash(arguments, interval, metrics, produceIntermediateResult, watermark, super.hashCode()); } @Override @@ -269,10 +269,10 @@ public String toString() { sb.append("class EntityAggregationCalculatedFieldConfiguration {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" arguments: ").append(toIndentedString(arguments)).append("\n"); - sb.append(" metrics: ").append(toIndentedString(metrics)).append("\n"); sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); - sb.append(" watermark: ").append(toIndentedString(watermark)).append("\n"); + sb.append(" metrics: ").append(toIndentedString(metrics)).append("\n"); sb.append(" produceIntermediateResult: ").append(toIndentedString(produceIntermediateResult)).append("\n"); + sb.append(" watermark: ").append(toIndentedString(watermark)).append("\n"); sb.append("}"); return sb.toString(); } @@ -320,16 +320,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `aiGenerated` to the URL query string - if (getAiGenerated() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%saiGenerated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAiGenerated())))); - } - // add `output` to the URL query string if (getOutput() != null) { joiner.add(getOutput().toUrlQueryString(prefix + "output" + suffix)); } + // add `aiGenerated` to the URL query string + if (getAiGenerated() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%saiGenerated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAiGenerated())))); + } + // add `type` to the URL query string if (getType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); @@ -345,6 +345,11 @@ public String toUrlQueryString(String prefix) { } } + // add `interval` to the URL query string + if (getInterval() != null) { + joiner.add(getInterval().toUrlQueryString(prefix + "interval" + suffix)); + } + // add `metrics` to the URL query string if (getMetrics() != null) { for (String _key : getMetrics().keySet()) { @@ -355,9 +360,9 @@ public String toUrlQueryString(String prefix) { } } - // add `interval` to the URL query string - if (getInterval() != null) { - joiner.add(getInterval().toUrlQueryString(prefix + "interval" + suffix)); + // add `produceIntermediateResult` to the URL query string + if (getProduceIntermediateResult() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sproduceIntermediateResult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProduceIntermediateResult())))); } // add `watermark` to the URL query string @@ -365,11 +370,6 @@ public String toUrlQueryString(String prefix) { joiner.add(getWatermark().toUrlQueryString(prefix + "watermark" + suffix)); } - // add `produceIntermediateResult` to the URL query string - if (getProduceIntermediateResult() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sproduceIntermediateResult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProduceIntermediateResult())))); - } - return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityGroupId.java b/paas/src/main/java/org/thingsboard/client/model/EntityGroupId.java index 990db84c..fb56ae18 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityGroupId.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityGroupId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * EntityGroupId */ @JsonPropertyOrder({ - EntityGroupId.JSON_PROPERTY_ID, - EntityGroupId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class EntityGroupId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class EntityGroupId extends EntityId { public EntityGroupId() { } + @Override public EntityGroupId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public EntityGroupId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this EntityGroupId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - EntityGroupId entityGroupId = (EntityGroupId) o; - return Objects.equals(this.id, entityGroupId.id) && - Objects.equals(this.entityType, entityGroupId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EntityGroupId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EntityGroupId", EntityGroupId.class); + JSON.registerDiscriminator(EntityGroupId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityGroupInfo.java b/paas/src/main/java/org/thingsboard/client/model/EntityGroupInfo.java index 98a2b668..4e74dcc2 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityGroupInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityGroupInfo.java @@ -31,6 +31,7 @@ import java.util.LinkedHashSet; import java.util.Set; import org.thingsboard.client.model.EntityGroupId; +import org.thingsboard.client.model.EntityGroupInfoOwnerIdsInner; import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import org.thingsboard.client.model.TenantId; @@ -226,7 +227,7 @@ public static TypeEnum fromValue(EntityType value) { public static final String JSON_PROPERTY_OWNER_IDS = "ownerIds"; @javax.annotation.Nonnull - private Set ownerIds = new LinkedHashSet<>(); + private Set ownerIds = new LinkedHashSet<>(); public static final String JSON_PROPERTY_GROUP_ALL = "groupAll"; @javax.annotation.Nullable @@ -435,12 +436,12 @@ public void setVersion(@javax.annotation.Nullable Long version) { } - public EntityGroupInfo ownerIds(@javax.annotation.Nonnull Set ownerIds) { + public EntityGroupInfo ownerIds(@javax.annotation.Nonnull Set ownerIds) { this.ownerIds = ownerIds; return this; } - public EntityGroupInfo addOwnerIdsItem(EntityId ownerIdsItem) { + public EntityGroupInfo addOwnerIdsItem(EntityGroupInfoOwnerIdsInner ownerIdsItem) { if (this.ownerIds == null) { this.ownerIds = new LinkedHashSet<>(); } @@ -455,7 +456,7 @@ public EntityGroupInfo addOwnerIdsItem(EntityId ownerIdsItem) { @javax.annotation.Nonnull @JsonProperty(value = JSON_PROPERTY_OWNER_IDS, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Set getOwnerIds() { + public Set getOwnerIds() { return ownerIds; } @@ -463,7 +464,7 @@ public Set getOwnerIds() { @JsonDeserialize(as = LinkedHashSet.class) @JsonProperty(value = JSON_PROPERTY_OWNER_IDS, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOwnerIds(@javax.annotation.Nonnull Set ownerIds) { + public void setOwnerIds(@javax.annotation.Nonnull Set ownerIds) { this.ownerIds = ownerIds; } @@ -667,7 +668,7 @@ public String toUrlQueryString(String prefix) { // add `ownerIds` to the URL query string if (getOwnerIds() != null) { int i = 0; - for (EntityId _item : getOwnerIds()) { + for (EntityGroupInfoOwnerIdsInner _item : getOwnerIds()) { if (_item != null) { joiner.add(_item.toUrlQueryString(String.format(java.util.Locale.ROOT, "%sownerIds%s%s", prefix, suffix, "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityGroupInfoOwnerIdsInner.java b/paas/src/main/java/org/thingsboard/client/model/EntityGroupInfoOwnerIdsInner.java new file mode 100644 index 00000000..49a5da68 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/EntityGroupInfoOwnerIdsInner.java @@ -0,0 +1,2721 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.thingsboard.client.model.AdminSettingsId; +import org.thingsboard.client.model.AiModelId; +import org.thingsboard.client.model.AlarmId; +import org.thingsboard.client.model.ApiKeyId; +import org.thingsboard.client.model.ApiUsageStateId; +import org.thingsboard.client.model.AssetId; +import org.thingsboard.client.model.AssetProfileId; +import org.thingsboard.client.model.BlobEntityId; +import org.thingsboard.client.model.CalculatedFieldId; +import org.thingsboard.client.model.ConverterId; +import org.thingsboard.client.model.CustomerId; +import org.thingsboard.client.model.DashboardId; +import org.thingsboard.client.model.DeviceId; +import org.thingsboard.client.model.DeviceProfileId; +import org.thingsboard.client.model.DomainId; +import org.thingsboard.client.model.EdgeId; +import org.thingsboard.client.model.EntityGroupId; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.EntityViewId; +import org.thingsboard.client.model.GroupPermissionId; +import org.thingsboard.client.model.IntegrationId; +import org.thingsboard.client.model.JobId; +import org.thingsboard.client.model.MobileAppBundleId; +import org.thingsboard.client.model.MobileAppId; +import org.thingsboard.client.model.NotificationId; +import org.thingsboard.client.model.NotificationRequestId; +import org.thingsboard.client.model.NotificationRuleId; +import org.thingsboard.client.model.NotificationTargetId; +import org.thingsboard.client.model.NotificationTemplateId; +import org.thingsboard.client.model.OAuth2ClientId; +import org.thingsboard.client.model.OtaPackageId; +import org.thingsboard.client.model.QueueId; +import org.thingsboard.client.model.QueueStatsId; +import org.thingsboard.client.model.ReportId; +import org.thingsboard.client.model.ReportTemplateId; +import org.thingsboard.client.model.RoleId; +import org.thingsboard.client.model.RpcId; +import org.thingsboard.client.model.RuleChainId; +import org.thingsboard.client.model.RuleNodeId; +import org.thingsboard.client.model.SchedulerEventId; +import org.thingsboard.client.model.SecretId; +import org.thingsboard.client.model.TbResourceId; +import org.thingsboard.client.model.TenantId; +import org.thingsboard.client.model.TenantProfileId; +import org.thingsboard.client.model.UserId; +import org.thingsboard.client.model.WidgetTypeId; +import org.thingsboard.client.model.WidgetsBundleId; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.thingsboard.client.ApiClient; +import org.thingsboard.client.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonDeserialize(using = EntityGroupInfoOwnerIdsInner.EntityGroupInfoOwnerIdsInnerDeserializer.class) +@JsonSerialize(using = EntityGroupInfoOwnerIdsInner.EntityGroupInfoOwnerIdsInnerSerializer.class) +public class EntityGroupInfoOwnerIdsInner extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(EntityGroupInfoOwnerIdsInner.class.getName()); + + public static class EntityGroupInfoOwnerIdsInnerSerializer extends StdSerializer { + public EntityGroupInfoOwnerIdsInnerSerializer(Class t) { + super(t); + } + + public EntityGroupInfoOwnerIdsInnerSerializer() { + this(null); + } + + @Override + public void serialize(EntityGroupInfoOwnerIdsInner value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class EntityGroupInfoOwnerIdsInnerDeserializer extends StdDeserializer { + public EntityGroupInfoOwnerIdsInnerDeserializer() { + this(EntityGroupInfoOwnerIdsInner.class); + } + + public EntityGroupInfoOwnerIdsInnerDeserializer(Class vc) { + super(vc); + } + + @Override + public EntityGroupInfoOwnerIdsInner deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize AdminSettingsId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AdminSettingsId.class.equals(Integer.class) || AdminSettingsId.class.equals(Long.class) || AdminSettingsId.class.equals(Float.class) || AdminSettingsId.class.equals(Double.class) || AdminSettingsId.class.equals(Boolean.class) || AdminSettingsId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((AdminSettingsId.class.equals(Integer.class) || AdminSettingsId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((AdminSettingsId.class.equals(Float.class) || AdminSettingsId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (AdminSettingsId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (AdminSettingsId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(AdminSettingsId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'AdminSettingsId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AdminSettingsId'", e); + } + + // deserialize AiModelId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AiModelId.class.equals(Integer.class) || AiModelId.class.equals(Long.class) || AiModelId.class.equals(Float.class) || AiModelId.class.equals(Double.class) || AiModelId.class.equals(Boolean.class) || AiModelId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((AiModelId.class.equals(Integer.class) || AiModelId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((AiModelId.class.equals(Float.class) || AiModelId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (AiModelId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (AiModelId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(AiModelId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'AiModelId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AiModelId'", e); + } + + // deserialize AlarmId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AlarmId.class.equals(Integer.class) || AlarmId.class.equals(Long.class) || AlarmId.class.equals(Float.class) || AlarmId.class.equals(Double.class) || AlarmId.class.equals(Boolean.class) || AlarmId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((AlarmId.class.equals(Integer.class) || AlarmId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((AlarmId.class.equals(Float.class) || AlarmId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (AlarmId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (AlarmId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(AlarmId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'AlarmId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AlarmId'", e); + } + + // deserialize ApiKeyId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ApiKeyId.class.equals(Integer.class) || ApiKeyId.class.equals(Long.class) || ApiKeyId.class.equals(Float.class) || ApiKeyId.class.equals(Double.class) || ApiKeyId.class.equals(Boolean.class) || ApiKeyId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ApiKeyId.class.equals(Integer.class) || ApiKeyId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ApiKeyId.class.equals(Float.class) || ApiKeyId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (ApiKeyId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ApiKeyId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ApiKeyId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'ApiKeyId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ApiKeyId'", e); + } + + // deserialize ApiUsageStateId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ApiUsageStateId.class.equals(Integer.class) || ApiUsageStateId.class.equals(Long.class) || ApiUsageStateId.class.equals(Float.class) || ApiUsageStateId.class.equals(Double.class) || ApiUsageStateId.class.equals(Boolean.class) || ApiUsageStateId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ApiUsageStateId.class.equals(Integer.class) || ApiUsageStateId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ApiUsageStateId.class.equals(Float.class) || ApiUsageStateId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (ApiUsageStateId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ApiUsageStateId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ApiUsageStateId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'ApiUsageStateId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ApiUsageStateId'", e); + } + + // deserialize AssetId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AssetId.class.equals(Integer.class) || AssetId.class.equals(Long.class) || AssetId.class.equals(Float.class) || AssetId.class.equals(Double.class) || AssetId.class.equals(Boolean.class) || AssetId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((AssetId.class.equals(Integer.class) || AssetId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((AssetId.class.equals(Float.class) || AssetId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (AssetId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (AssetId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(AssetId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'AssetId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AssetId'", e); + } + + // deserialize AssetProfileId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AssetProfileId.class.equals(Integer.class) || AssetProfileId.class.equals(Long.class) || AssetProfileId.class.equals(Float.class) || AssetProfileId.class.equals(Double.class) || AssetProfileId.class.equals(Boolean.class) || AssetProfileId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((AssetProfileId.class.equals(Integer.class) || AssetProfileId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((AssetProfileId.class.equals(Float.class) || AssetProfileId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (AssetProfileId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (AssetProfileId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(AssetProfileId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'AssetProfileId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AssetProfileId'", e); + } + + // deserialize BlobEntityId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (BlobEntityId.class.equals(Integer.class) || BlobEntityId.class.equals(Long.class) || BlobEntityId.class.equals(Float.class) || BlobEntityId.class.equals(Double.class) || BlobEntityId.class.equals(Boolean.class) || BlobEntityId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((BlobEntityId.class.equals(Integer.class) || BlobEntityId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((BlobEntityId.class.equals(Float.class) || BlobEntityId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (BlobEntityId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (BlobEntityId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(BlobEntityId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'BlobEntityId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'BlobEntityId'", e); + } + + // deserialize CalculatedFieldId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CalculatedFieldId.class.equals(Integer.class) || CalculatedFieldId.class.equals(Long.class) || CalculatedFieldId.class.equals(Float.class) || CalculatedFieldId.class.equals(Double.class) || CalculatedFieldId.class.equals(Boolean.class) || CalculatedFieldId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CalculatedFieldId.class.equals(Integer.class) || CalculatedFieldId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CalculatedFieldId.class.equals(Float.class) || CalculatedFieldId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CalculatedFieldId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CalculatedFieldId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CalculatedFieldId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CalculatedFieldId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CalculatedFieldId'", e); + } + + // deserialize ConverterId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ConverterId.class.equals(Integer.class) || ConverterId.class.equals(Long.class) || ConverterId.class.equals(Float.class) || ConverterId.class.equals(Double.class) || ConverterId.class.equals(Boolean.class) || ConverterId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ConverterId.class.equals(Integer.class) || ConverterId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ConverterId.class.equals(Float.class) || ConverterId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (ConverterId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ConverterId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ConverterId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'ConverterId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ConverterId'", e); + } + + // deserialize CustomerId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CustomerId.class.equals(Integer.class) || CustomerId.class.equals(Long.class) || CustomerId.class.equals(Float.class) || CustomerId.class.equals(Double.class) || CustomerId.class.equals(Boolean.class) || CustomerId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CustomerId.class.equals(Integer.class) || CustomerId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CustomerId.class.equals(Float.class) || CustomerId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CustomerId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CustomerId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CustomerId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CustomerId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CustomerId'", e); + } + + // deserialize DashboardId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DashboardId.class.equals(Integer.class) || DashboardId.class.equals(Long.class) || DashboardId.class.equals(Float.class) || DashboardId.class.equals(Double.class) || DashboardId.class.equals(Boolean.class) || DashboardId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((DashboardId.class.equals(Integer.class) || DashboardId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((DashboardId.class.equals(Float.class) || DashboardId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (DashboardId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (DashboardId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(DashboardId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'DashboardId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'DashboardId'", e); + } + + // deserialize DeviceId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DeviceId.class.equals(Integer.class) || DeviceId.class.equals(Long.class) || DeviceId.class.equals(Float.class) || DeviceId.class.equals(Double.class) || DeviceId.class.equals(Boolean.class) || DeviceId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((DeviceId.class.equals(Integer.class) || DeviceId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((DeviceId.class.equals(Float.class) || DeviceId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (DeviceId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (DeviceId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(DeviceId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'DeviceId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'DeviceId'", e); + } + + // deserialize DeviceProfileId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DeviceProfileId.class.equals(Integer.class) || DeviceProfileId.class.equals(Long.class) || DeviceProfileId.class.equals(Float.class) || DeviceProfileId.class.equals(Double.class) || DeviceProfileId.class.equals(Boolean.class) || DeviceProfileId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((DeviceProfileId.class.equals(Integer.class) || DeviceProfileId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((DeviceProfileId.class.equals(Float.class) || DeviceProfileId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (DeviceProfileId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (DeviceProfileId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(DeviceProfileId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'DeviceProfileId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'DeviceProfileId'", e); + } + + // deserialize DomainId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DomainId.class.equals(Integer.class) || DomainId.class.equals(Long.class) || DomainId.class.equals(Float.class) || DomainId.class.equals(Double.class) || DomainId.class.equals(Boolean.class) || DomainId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((DomainId.class.equals(Integer.class) || DomainId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((DomainId.class.equals(Float.class) || DomainId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (DomainId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (DomainId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(DomainId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'DomainId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'DomainId'", e); + } + + // deserialize EdgeId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (EdgeId.class.equals(Integer.class) || EdgeId.class.equals(Long.class) || EdgeId.class.equals(Float.class) || EdgeId.class.equals(Double.class) || EdgeId.class.equals(Boolean.class) || EdgeId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((EdgeId.class.equals(Integer.class) || EdgeId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((EdgeId.class.equals(Float.class) || EdgeId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (EdgeId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (EdgeId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(EdgeId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'EdgeId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'EdgeId'", e); + } + + // deserialize EntityGroupId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (EntityGroupId.class.equals(Integer.class) || EntityGroupId.class.equals(Long.class) || EntityGroupId.class.equals(Float.class) || EntityGroupId.class.equals(Double.class) || EntityGroupId.class.equals(Boolean.class) || EntityGroupId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((EntityGroupId.class.equals(Integer.class) || EntityGroupId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((EntityGroupId.class.equals(Float.class) || EntityGroupId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (EntityGroupId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (EntityGroupId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(EntityGroupId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'EntityGroupId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'EntityGroupId'", e); + } + + // deserialize EntityViewId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (EntityViewId.class.equals(Integer.class) || EntityViewId.class.equals(Long.class) || EntityViewId.class.equals(Float.class) || EntityViewId.class.equals(Double.class) || EntityViewId.class.equals(Boolean.class) || EntityViewId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((EntityViewId.class.equals(Integer.class) || EntityViewId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((EntityViewId.class.equals(Float.class) || EntityViewId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (EntityViewId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (EntityViewId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(EntityViewId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'EntityViewId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'EntityViewId'", e); + } + + // deserialize GroupPermissionId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (GroupPermissionId.class.equals(Integer.class) || GroupPermissionId.class.equals(Long.class) || GroupPermissionId.class.equals(Float.class) || GroupPermissionId.class.equals(Double.class) || GroupPermissionId.class.equals(Boolean.class) || GroupPermissionId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((GroupPermissionId.class.equals(Integer.class) || GroupPermissionId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((GroupPermissionId.class.equals(Float.class) || GroupPermissionId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (GroupPermissionId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (GroupPermissionId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(GroupPermissionId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'GroupPermissionId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'GroupPermissionId'", e); + } + + // deserialize IntegrationId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IntegrationId.class.equals(Integer.class) || IntegrationId.class.equals(Long.class) || IntegrationId.class.equals(Float.class) || IntegrationId.class.equals(Double.class) || IntegrationId.class.equals(Boolean.class) || IntegrationId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((IntegrationId.class.equals(Integer.class) || IntegrationId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((IntegrationId.class.equals(Float.class) || IntegrationId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (IntegrationId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (IntegrationId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(IntegrationId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'IntegrationId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IntegrationId'", e); + } + + // deserialize JobId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (JobId.class.equals(Integer.class) || JobId.class.equals(Long.class) || JobId.class.equals(Float.class) || JobId.class.equals(Double.class) || JobId.class.equals(Boolean.class) || JobId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((JobId.class.equals(Integer.class) || JobId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((JobId.class.equals(Float.class) || JobId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (JobId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (JobId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(JobId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'JobId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'JobId'", e); + } + + // deserialize MobileAppBundleId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MobileAppBundleId.class.equals(Integer.class) || MobileAppBundleId.class.equals(Long.class) || MobileAppBundleId.class.equals(Float.class) || MobileAppBundleId.class.equals(Double.class) || MobileAppBundleId.class.equals(Boolean.class) || MobileAppBundleId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((MobileAppBundleId.class.equals(Integer.class) || MobileAppBundleId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((MobileAppBundleId.class.equals(Float.class) || MobileAppBundleId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (MobileAppBundleId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (MobileAppBundleId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(MobileAppBundleId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'MobileAppBundleId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'MobileAppBundleId'", e); + } + + // deserialize MobileAppId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MobileAppId.class.equals(Integer.class) || MobileAppId.class.equals(Long.class) || MobileAppId.class.equals(Float.class) || MobileAppId.class.equals(Double.class) || MobileAppId.class.equals(Boolean.class) || MobileAppId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((MobileAppId.class.equals(Integer.class) || MobileAppId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((MobileAppId.class.equals(Float.class) || MobileAppId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (MobileAppId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (MobileAppId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(MobileAppId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'MobileAppId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'MobileAppId'", e); + } + + // deserialize NotificationId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotificationId.class.equals(Integer.class) || NotificationId.class.equals(Long.class) || NotificationId.class.equals(Float.class) || NotificationId.class.equals(Double.class) || NotificationId.class.equals(Boolean.class) || NotificationId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotificationId.class.equals(Integer.class) || NotificationId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotificationId.class.equals(Float.class) || NotificationId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (NotificationId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotificationId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(NotificationId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotificationId'", e); + } + + // deserialize NotificationRequestId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotificationRequestId.class.equals(Integer.class) || NotificationRequestId.class.equals(Long.class) || NotificationRequestId.class.equals(Float.class) || NotificationRequestId.class.equals(Double.class) || NotificationRequestId.class.equals(Boolean.class) || NotificationRequestId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotificationRequestId.class.equals(Integer.class) || NotificationRequestId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotificationRequestId.class.equals(Float.class) || NotificationRequestId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (NotificationRequestId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotificationRequestId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(NotificationRequestId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationRequestId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotificationRequestId'", e); + } + + // deserialize NotificationRuleId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotificationRuleId.class.equals(Integer.class) || NotificationRuleId.class.equals(Long.class) || NotificationRuleId.class.equals(Float.class) || NotificationRuleId.class.equals(Double.class) || NotificationRuleId.class.equals(Boolean.class) || NotificationRuleId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotificationRuleId.class.equals(Integer.class) || NotificationRuleId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotificationRuleId.class.equals(Float.class) || NotificationRuleId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (NotificationRuleId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotificationRuleId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(NotificationRuleId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationRuleId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotificationRuleId'", e); + } + + // deserialize NotificationTargetId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotificationTargetId.class.equals(Integer.class) || NotificationTargetId.class.equals(Long.class) || NotificationTargetId.class.equals(Float.class) || NotificationTargetId.class.equals(Double.class) || NotificationTargetId.class.equals(Boolean.class) || NotificationTargetId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotificationTargetId.class.equals(Integer.class) || NotificationTargetId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotificationTargetId.class.equals(Float.class) || NotificationTargetId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (NotificationTargetId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotificationTargetId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(NotificationTargetId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationTargetId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotificationTargetId'", e); + } + + // deserialize NotificationTemplateId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotificationTemplateId.class.equals(Integer.class) || NotificationTemplateId.class.equals(Long.class) || NotificationTemplateId.class.equals(Float.class) || NotificationTemplateId.class.equals(Double.class) || NotificationTemplateId.class.equals(Boolean.class) || NotificationTemplateId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotificationTemplateId.class.equals(Integer.class) || NotificationTemplateId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotificationTemplateId.class.equals(Float.class) || NotificationTemplateId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (NotificationTemplateId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotificationTemplateId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(NotificationTemplateId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationTemplateId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotificationTemplateId'", e); + } + + // deserialize OAuth2ClientId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (OAuth2ClientId.class.equals(Integer.class) || OAuth2ClientId.class.equals(Long.class) || OAuth2ClientId.class.equals(Float.class) || OAuth2ClientId.class.equals(Double.class) || OAuth2ClientId.class.equals(Boolean.class) || OAuth2ClientId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((OAuth2ClientId.class.equals(Integer.class) || OAuth2ClientId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((OAuth2ClientId.class.equals(Float.class) || OAuth2ClientId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (OAuth2ClientId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (OAuth2ClientId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(OAuth2ClientId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'OAuth2ClientId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'OAuth2ClientId'", e); + } + + // deserialize OtaPackageId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (OtaPackageId.class.equals(Integer.class) || OtaPackageId.class.equals(Long.class) || OtaPackageId.class.equals(Float.class) || OtaPackageId.class.equals(Double.class) || OtaPackageId.class.equals(Boolean.class) || OtaPackageId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((OtaPackageId.class.equals(Integer.class) || OtaPackageId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((OtaPackageId.class.equals(Float.class) || OtaPackageId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (OtaPackageId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (OtaPackageId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(OtaPackageId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'OtaPackageId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'OtaPackageId'", e); + } + + // deserialize QueueId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (QueueId.class.equals(Integer.class) || QueueId.class.equals(Long.class) || QueueId.class.equals(Float.class) || QueueId.class.equals(Double.class) || QueueId.class.equals(Boolean.class) || QueueId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((QueueId.class.equals(Integer.class) || QueueId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((QueueId.class.equals(Float.class) || QueueId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (QueueId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (QueueId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(QueueId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'QueueId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'QueueId'", e); + } + + // deserialize QueueStatsId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (QueueStatsId.class.equals(Integer.class) || QueueStatsId.class.equals(Long.class) || QueueStatsId.class.equals(Float.class) || QueueStatsId.class.equals(Double.class) || QueueStatsId.class.equals(Boolean.class) || QueueStatsId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((QueueStatsId.class.equals(Integer.class) || QueueStatsId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((QueueStatsId.class.equals(Float.class) || QueueStatsId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (QueueStatsId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (QueueStatsId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(QueueStatsId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'QueueStatsId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'QueueStatsId'", e); + } + + // deserialize ReportId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ReportId.class.equals(Integer.class) || ReportId.class.equals(Long.class) || ReportId.class.equals(Float.class) || ReportId.class.equals(Double.class) || ReportId.class.equals(Boolean.class) || ReportId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ReportId.class.equals(Integer.class) || ReportId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ReportId.class.equals(Float.class) || ReportId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (ReportId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ReportId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ReportId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'ReportId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ReportId'", e); + } + + // deserialize ReportTemplateId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ReportTemplateId.class.equals(Integer.class) || ReportTemplateId.class.equals(Long.class) || ReportTemplateId.class.equals(Float.class) || ReportTemplateId.class.equals(Double.class) || ReportTemplateId.class.equals(Boolean.class) || ReportTemplateId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ReportTemplateId.class.equals(Integer.class) || ReportTemplateId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ReportTemplateId.class.equals(Float.class) || ReportTemplateId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (ReportTemplateId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ReportTemplateId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ReportTemplateId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'ReportTemplateId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ReportTemplateId'", e); + } + + // deserialize RoleId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (RoleId.class.equals(Integer.class) || RoleId.class.equals(Long.class) || RoleId.class.equals(Float.class) || RoleId.class.equals(Double.class) || RoleId.class.equals(Boolean.class) || RoleId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((RoleId.class.equals(Integer.class) || RoleId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((RoleId.class.equals(Float.class) || RoleId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (RoleId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (RoleId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(RoleId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'RoleId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'RoleId'", e); + } + + // deserialize RpcId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (RpcId.class.equals(Integer.class) || RpcId.class.equals(Long.class) || RpcId.class.equals(Float.class) || RpcId.class.equals(Double.class) || RpcId.class.equals(Boolean.class) || RpcId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((RpcId.class.equals(Integer.class) || RpcId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((RpcId.class.equals(Float.class) || RpcId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (RpcId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (RpcId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(RpcId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'RpcId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'RpcId'", e); + } + + // deserialize RuleChainId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (RuleChainId.class.equals(Integer.class) || RuleChainId.class.equals(Long.class) || RuleChainId.class.equals(Float.class) || RuleChainId.class.equals(Double.class) || RuleChainId.class.equals(Boolean.class) || RuleChainId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((RuleChainId.class.equals(Integer.class) || RuleChainId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((RuleChainId.class.equals(Float.class) || RuleChainId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (RuleChainId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (RuleChainId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(RuleChainId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'RuleChainId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'RuleChainId'", e); + } + + // deserialize RuleNodeId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (RuleNodeId.class.equals(Integer.class) || RuleNodeId.class.equals(Long.class) || RuleNodeId.class.equals(Float.class) || RuleNodeId.class.equals(Double.class) || RuleNodeId.class.equals(Boolean.class) || RuleNodeId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((RuleNodeId.class.equals(Integer.class) || RuleNodeId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((RuleNodeId.class.equals(Float.class) || RuleNodeId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (RuleNodeId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (RuleNodeId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(RuleNodeId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'RuleNodeId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'RuleNodeId'", e); + } + + // deserialize SchedulerEventId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SchedulerEventId.class.equals(Integer.class) || SchedulerEventId.class.equals(Long.class) || SchedulerEventId.class.equals(Float.class) || SchedulerEventId.class.equals(Double.class) || SchedulerEventId.class.equals(Boolean.class) || SchedulerEventId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SchedulerEventId.class.equals(Integer.class) || SchedulerEventId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SchedulerEventId.class.equals(Float.class) || SchedulerEventId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (SchedulerEventId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SchedulerEventId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(SchedulerEventId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'SchedulerEventId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SchedulerEventId'", e); + } + + // deserialize SecretId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecretId.class.equals(Integer.class) || SecretId.class.equals(Long.class) || SecretId.class.equals(Float.class) || SecretId.class.equals(Double.class) || SecretId.class.equals(Boolean.class) || SecretId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SecretId.class.equals(Integer.class) || SecretId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SecretId.class.equals(Float.class) || SecretId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (SecretId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SecretId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(SecretId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'SecretId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SecretId'", e); + } + + // deserialize TbResourceId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (TbResourceId.class.equals(Integer.class) || TbResourceId.class.equals(Long.class) || TbResourceId.class.equals(Float.class) || TbResourceId.class.equals(Double.class) || TbResourceId.class.equals(Boolean.class) || TbResourceId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((TbResourceId.class.equals(Integer.class) || TbResourceId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((TbResourceId.class.equals(Float.class) || TbResourceId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (TbResourceId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (TbResourceId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(TbResourceId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'TbResourceId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'TbResourceId'", e); + } + + // deserialize TenantId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (TenantId.class.equals(Integer.class) || TenantId.class.equals(Long.class) || TenantId.class.equals(Float.class) || TenantId.class.equals(Double.class) || TenantId.class.equals(Boolean.class) || TenantId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((TenantId.class.equals(Integer.class) || TenantId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((TenantId.class.equals(Float.class) || TenantId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (TenantId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (TenantId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(TenantId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'TenantId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'TenantId'", e); + } + + // deserialize TenantProfileId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (TenantProfileId.class.equals(Integer.class) || TenantProfileId.class.equals(Long.class) || TenantProfileId.class.equals(Float.class) || TenantProfileId.class.equals(Double.class) || TenantProfileId.class.equals(Boolean.class) || TenantProfileId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((TenantProfileId.class.equals(Integer.class) || TenantProfileId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((TenantProfileId.class.equals(Float.class) || TenantProfileId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (TenantProfileId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (TenantProfileId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(TenantProfileId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'TenantProfileId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'TenantProfileId'", e); + } + + // deserialize UserId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (UserId.class.equals(Integer.class) || UserId.class.equals(Long.class) || UserId.class.equals(Float.class) || UserId.class.equals(Double.class) || UserId.class.equals(Boolean.class) || UserId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((UserId.class.equals(Integer.class) || UserId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((UserId.class.equals(Float.class) || UserId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (UserId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (UserId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(UserId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'UserId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'UserId'", e); + } + + // deserialize WidgetTypeId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (WidgetTypeId.class.equals(Integer.class) || WidgetTypeId.class.equals(Long.class) || WidgetTypeId.class.equals(Float.class) || WidgetTypeId.class.equals(Double.class) || WidgetTypeId.class.equals(Boolean.class) || WidgetTypeId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((WidgetTypeId.class.equals(Integer.class) || WidgetTypeId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((WidgetTypeId.class.equals(Float.class) || WidgetTypeId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (WidgetTypeId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (WidgetTypeId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(WidgetTypeId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'WidgetTypeId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'WidgetTypeId'", e); + } + + // deserialize WidgetsBundleId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (WidgetsBundleId.class.equals(Integer.class) || WidgetsBundleId.class.equals(Long.class) || WidgetsBundleId.class.equals(Float.class) || WidgetsBundleId.class.equals(Double.class) || WidgetsBundleId.class.equals(Boolean.class) || WidgetsBundleId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((WidgetsBundleId.class.equals(Integer.class) || WidgetsBundleId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((WidgetsBundleId.class.equals(Float.class) || WidgetsBundleId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (WidgetsBundleId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (WidgetsBundleId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(WidgetsBundleId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'WidgetsBundleId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'WidgetsBundleId'", e); + } + + if (match == 1) { + EntityGroupInfoOwnerIdsInner ret = new EntityGroupInfoOwnerIdsInner(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format(java.util.Locale.ROOT, "Failed deserialization for EntityGroupInfoOwnerIdsInner: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public EntityGroupInfoOwnerIdsInner getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "EntityGroupInfoOwnerIdsInner cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public EntityGroupInfoOwnerIdsInner() { + super("oneOf", Boolean.FALSE); + } + + public EntityGroupInfoOwnerIdsInner(AdminSettingsId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(AiModelId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(AlarmId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(ApiKeyId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(ApiUsageStateId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(AssetId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(AssetProfileId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(BlobEntityId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(CalculatedFieldId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(ConverterId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(CustomerId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(DashboardId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(DeviceId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(DeviceProfileId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(DomainId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(EdgeId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(EntityGroupId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(EntityViewId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(GroupPermissionId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(IntegrationId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(JobId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(MobileAppBundleId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(MobileAppId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(NotificationId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(NotificationRequestId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(NotificationRuleId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(NotificationTargetId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(NotificationTemplateId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(OAuth2ClientId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(OtaPackageId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(QueueId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(QueueStatsId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(ReportId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(ReportTemplateId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(RoleId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(RpcId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(RuleChainId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(RuleNodeId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(SchedulerEventId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(SecretId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(TbResourceId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(TenantId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(TenantProfileId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(UserId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(WidgetTypeId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(WidgetsBundleId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("AdminSettingsId", AdminSettingsId.class); + schemas.put("AiModelId", AiModelId.class); + schemas.put("AlarmId", AlarmId.class); + schemas.put("ApiKeyId", ApiKeyId.class); + schemas.put("ApiUsageStateId", ApiUsageStateId.class); + schemas.put("AssetId", AssetId.class); + schemas.put("AssetProfileId", AssetProfileId.class); + schemas.put("BlobEntityId", BlobEntityId.class); + schemas.put("CalculatedFieldId", CalculatedFieldId.class); + schemas.put("ConverterId", ConverterId.class); + schemas.put("CustomerId", CustomerId.class); + schemas.put("DashboardId", DashboardId.class); + schemas.put("DeviceId", DeviceId.class); + schemas.put("DeviceProfileId", DeviceProfileId.class); + schemas.put("DomainId", DomainId.class); + schemas.put("EdgeId", EdgeId.class); + schemas.put("EntityGroupId", EntityGroupId.class); + schemas.put("EntityViewId", EntityViewId.class); + schemas.put("GroupPermissionId", GroupPermissionId.class); + schemas.put("IntegrationId", IntegrationId.class); + schemas.put("JobId", JobId.class); + schemas.put("MobileAppBundleId", MobileAppBundleId.class); + schemas.put("MobileAppId", MobileAppId.class); + schemas.put("NotificationId", NotificationId.class); + schemas.put("NotificationRequestId", NotificationRequestId.class); + schemas.put("NotificationRuleId", NotificationRuleId.class); + schemas.put("NotificationTargetId", NotificationTargetId.class); + schemas.put("NotificationTemplateId", NotificationTemplateId.class); + schemas.put("OAuth2ClientId", OAuth2ClientId.class); + schemas.put("OtaPackageId", OtaPackageId.class); + schemas.put("QueueId", QueueId.class); + schemas.put("QueueStatsId", QueueStatsId.class); + schemas.put("ReportId", ReportId.class); + schemas.put("ReportTemplateId", ReportTemplateId.class); + schemas.put("RoleId", RoleId.class); + schemas.put("RpcId", RpcId.class); + schemas.put("RuleChainId", RuleChainId.class); + schemas.put("RuleNodeId", RuleNodeId.class); + schemas.put("SchedulerEventId", SchedulerEventId.class); + schemas.put("SecretId", SecretId.class); + schemas.put("TbResourceId", TbResourceId.class); + schemas.put("TenantId", TenantId.class); + schemas.put("TenantProfileId", TenantProfileId.class); + schemas.put("UserId", UserId.class); + schemas.put("WidgetTypeId", WidgetTypeId.class); + schemas.put("WidgetsBundleId", WidgetsBundleId.class); + JSON.registerDescendants(EntityGroupInfoOwnerIdsInner.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return EntityGroupInfoOwnerIdsInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BlobEntityId, CalculatedFieldId, ConverterId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(AdminSettingsId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(AiModelId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(AlarmId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(ApiKeyId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(ApiUsageStateId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(AssetId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(AssetProfileId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(BlobEntityId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CalculatedFieldId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(ConverterId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CustomerId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(DashboardId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(DeviceId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(DeviceProfileId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(DomainId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(EdgeId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(EntityGroupId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(EntityViewId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(GroupPermissionId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(IntegrationId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(JobId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(MobileAppBundleId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(MobileAppId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(NotificationId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(NotificationRequestId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(NotificationRuleId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(NotificationTargetId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(NotificationTemplateId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(OAuth2ClientId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(OtaPackageId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(QueueId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(QueueStatsId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(ReportId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(ReportTemplateId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(RoleId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(RpcId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(RuleChainId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(RuleNodeId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(SchedulerEventId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(SecretId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(TbResourceId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(TenantId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(TenantProfileId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UserId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(WidgetTypeId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(WidgetsBundleId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BlobEntityId, CalculatedFieldId, ConverterId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId"); + } + + /** + * Get the actual instance, which can be the following: + * AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BlobEntityId, CalculatedFieldId, ConverterId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId + * + * @return The actual instance (AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BlobEntityId, CalculatedFieldId, ConverterId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AdminSettingsId`. If the actual instance is not `AdminSettingsId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AdminSettingsId` + * @throws ClassCastException if the instance is not `AdminSettingsId` + */ + public AdminSettingsId getAdminSettingsId() throws ClassCastException { + return (AdminSettingsId)super.getActualInstance(); + } + + /** + * Get the actual instance of `AiModelId`. If the actual instance is not `AiModelId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AiModelId` + * @throws ClassCastException if the instance is not `AiModelId` + */ + public AiModelId getAiModelId() throws ClassCastException { + return (AiModelId)super.getActualInstance(); + } + + /** + * Get the actual instance of `AlarmId`. If the actual instance is not `AlarmId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AlarmId` + * @throws ClassCastException if the instance is not `AlarmId` + */ + public AlarmId getAlarmId() throws ClassCastException { + return (AlarmId)super.getActualInstance(); + } + + /** + * Get the actual instance of `ApiKeyId`. If the actual instance is not `ApiKeyId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ApiKeyId` + * @throws ClassCastException if the instance is not `ApiKeyId` + */ + public ApiKeyId getApiKeyId() throws ClassCastException { + return (ApiKeyId)super.getActualInstance(); + } + + /** + * Get the actual instance of `ApiUsageStateId`. If the actual instance is not `ApiUsageStateId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ApiUsageStateId` + * @throws ClassCastException if the instance is not `ApiUsageStateId` + */ + public ApiUsageStateId getApiUsageStateId() throws ClassCastException { + return (ApiUsageStateId)super.getActualInstance(); + } + + /** + * Get the actual instance of `AssetId`. If the actual instance is not `AssetId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AssetId` + * @throws ClassCastException if the instance is not `AssetId` + */ + public AssetId getAssetId() throws ClassCastException { + return (AssetId)super.getActualInstance(); + } + + /** + * Get the actual instance of `AssetProfileId`. If the actual instance is not `AssetProfileId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AssetProfileId` + * @throws ClassCastException if the instance is not `AssetProfileId` + */ + public AssetProfileId getAssetProfileId() throws ClassCastException { + return (AssetProfileId)super.getActualInstance(); + } + + /** + * Get the actual instance of `BlobEntityId`. If the actual instance is not `BlobEntityId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `BlobEntityId` + * @throws ClassCastException if the instance is not `BlobEntityId` + */ + public BlobEntityId getBlobEntityId() throws ClassCastException { + return (BlobEntityId)super.getActualInstance(); + } + + /** + * Get the actual instance of `CalculatedFieldId`. If the actual instance is not `CalculatedFieldId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CalculatedFieldId` + * @throws ClassCastException if the instance is not `CalculatedFieldId` + */ + public CalculatedFieldId getCalculatedFieldId() throws ClassCastException { + return (CalculatedFieldId)super.getActualInstance(); + } + + /** + * Get the actual instance of `ConverterId`. If the actual instance is not `ConverterId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ConverterId` + * @throws ClassCastException if the instance is not `ConverterId` + */ + public ConverterId getConverterId() throws ClassCastException { + return (ConverterId)super.getActualInstance(); + } + + /** + * Get the actual instance of `CustomerId`. If the actual instance is not `CustomerId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CustomerId` + * @throws ClassCastException if the instance is not `CustomerId` + */ + public CustomerId getCustomerId() throws ClassCastException { + return (CustomerId)super.getActualInstance(); + } + + /** + * Get the actual instance of `DashboardId`. If the actual instance is not `DashboardId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `DashboardId` + * @throws ClassCastException if the instance is not `DashboardId` + */ + public DashboardId getDashboardId() throws ClassCastException { + return (DashboardId)super.getActualInstance(); + } + + /** + * Get the actual instance of `DeviceId`. If the actual instance is not `DeviceId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `DeviceId` + * @throws ClassCastException if the instance is not `DeviceId` + */ + public DeviceId getDeviceId() throws ClassCastException { + return (DeviceId)super.getActualInstance(); + } + + /** + * Get the actual instance of `DeviceProfileId`. If the actual instance is not `DeviceProfileId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `DeviceProfileId` + * @throws ClassCastException if the instance is not `DeviceProfileId` + */ + public DeviceProfileId getDeviceProfileId() throws ClassCastException { + return (DeviceProfileId)super.getActualInstance(); + } + + /** + * Get the actual instance of `DomainId`. If the actual instance is not `DomainId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `DomainId` + * @throws ClassCastException if the instance is not `DomainId` + */ + public DomainId getDomainId() throws ClassCastException { + return (DomainId)super.getActualInstance(); + } + + /** + * Get the actual instance of `EdgeId`. If the actual instance is not `EdgeId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `EdgeId` + * @throws ClassCastException if the instance is not `EdgeId` + */ + public EdgeId getEdgeId() throws ClassCastException { + return (EdgeId)super.getActualInstance(); + } + + /** + * Get the actual instance of `EntityGroupId`. If the actual instance is not `EntityGroupId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `EntityGroupId` + * @throws ClassCastException if the instance is not `EntityGroupId` + */ + public EntityGroupId getEntityGroupId() throws ClassCastException { + return (EntityGroupId)super.getActualInstance(); + } + + /** + * Get the actual instance of `EntityViewId`. If the actual instance is not `EntityViewId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `EntityViewId` + * @throws ClassCastException if the instance is not `EntityViewId` + */ + public EntityViewId getEntityViewId() throws ClassCastException { + return (EntityViewId)super.getActualInstance(); + } + + /** + * Get the actual instance of `GroupPermissionId`. If the actual instance is not `GroupPermissionId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `GroupPermissionId` + * @throws ClassCastException if the instance is not `GroupPermissionId` + */ + public GroupPermissionId getGroupPermissionId() throws ClassCastException { + return (GroupPermissionId)super.getActualInstance(); + } + + /** + * Get the actual instance of `IntegrationId`. If the actual instance is not `IntegrationId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IntegrationId` + * @throws ClassCastException if the instance is not `IntegrationId` + */ + public IntegrationId getIntegrationId() throws ClassCastException { + return (IntegrationId)super.getActualInstance(); + } + + /** + * Get the actual instance of `JobId`. If the actual instance is not `JobId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `JobId` + * @throws ClassCastException if the instance is not `JobId` + */ + public JobId getJobId() throws ClassCastException { + return (JobId)super.getActualInstance(); + } + + /** + * Get the actual instance of `MobileAppBundleId`. If the actual instance is not `MobileAppBundleId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MobileAppBundleId` + * @throws ClassCastException if the instance is not `MobileAppBundleId` + */ + public MobileAppBundleId getMobileAppBundleId() throws ClassCastException { + return (MobileAppBundleId)super.getActualInstance(); + } + + /** + * Get the actual instance of `MobileAppId`. If the actual instance is not `MobileAppId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MobileAppId` + * @throws ClassCastException if the instance is not `MobileAppId` + */ + public MobileAppId getMobileAppId() throws ClassCastException { + return (MobileAppId)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationId`. If the actual instance is not `NotificationId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationId` + * @throws ClassCastException if the instance is not `NotificationId` + */ + public NotificationId getNotificationId() throws ClassCastException { + return (NotificationId)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationRequestId`. If the actual instance is not `NotificationRequestId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationRequestId` + * @throws ClassCastException if the instance is not `NotificationRequestId` + */ + public NotificationRequestId getNotificationRequestId() throws ClassCastException { + return (NotificationRequestId)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationRuleId`. If the actual instance is not `NotificationRuleId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationRuleId` + * @throws ClassCastException if the instance is not `NotificationRuleId` + */ + public NotificationRuleId getNotificationRuleId() throws ClassCastException { + return (NotificationRuleId)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationTargetId`. If the actual instance is not `NotificationTargetId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationTargetId` + * @throws ClassCastException if the instance is not `NotificationTargetId` + */ + public NotificationTargetId getNotificationTargetId() throws ClassCastException { + return (NotificationTargetId)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationTemplateId`. If the actual instance is not `NotificationTemplateId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationTemplateId` + * @throws ClassCastException if the instance is not `NotificationTemplateId` + */ + public NotificationTemplateId getNotificationTemplateId() throws ClassCastException { + return (NotificationTemplateId)super.getActualInstance(); + } + + /** + * Get the actual instance of `OAuth2ClientId`. If the actual instance is not `OAuth2ClientId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `OAuth2ClientId` + * @throws ClassCastException if the instance is not `OAuth2ClientId` + */ + public OAuth2ClientId getOAuth2ClientId() throws ClassCastException { + return (OAuth2ClientId)super.getActualInstance(); + } + + /** + * Get the actual instance of `OtaPackageId`. If the actual instance is not `OtaPackageId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `OtaPackageId` + * @throws ClassCastException if the instance is not `OtaPackageId` + */ + public OtaPackageId getOtaPackageId() throws ClassCastException { + return (OtaPackageId)super.getActualInstance(); + } + + /** + * Get the actual instance of `QueueId`. If the actual instance is not `QueueId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `QueueId` + * @throws ClassCastException if the instance is not `QueueId` + */ + public QueueId getQueueId() throws ClassCastException { + return (QueueId)super.getActualInstance(); + } + + /** + * Get the actual instance of `QueueStatsId`. If the actual instance is not `QueueStatsId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `QueueStatsId` + * @throws ClassCastException if the instance is not `QueueStatsId` + */ + public QueueStatsId getQueueStatsId() throws ClassCastException { + return (QueueStatsId)super.getActualInstance(); + } + + /** + * Get the actual instance of `ReportId`. If the actual instance is not `ReportId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ReportId` + * @throws ClassCastException if the instance is not `ReportId` + */ + public ReportId getReportId() throws ClassCastException { + return (ReportId)super.getActualInstance(); + } + + /** + * Get the actual instance of `ReportTemplateId`. If the actual instance is not `ReportTemplateId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ReportTemplateId` + * @throws ClassCastException if the instance is not `ReportTemplateId` + */ + public ReportTemplateId getReportTemplateId() throws ClassCastException { + return (ReportTemplateId)super.getActualInstance(); + } + + /** + * Get the actual instance of `RoleId`. If the actual instance is not `RoleId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `RoleId` + * @throws ClassCastException if the instance is not `RoleId` + */ + public RoleId getRoleId() throws ClassCastException { + return (RoleId)super.getActualInstance(); + } + + /** + * Get the actual instance of `RpcId`. If the actual instance is not `RpcId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `RpcId` + * @throws ClassCastException if the instance is not `RpcId` + */ + public RpcId getRpcId() throws ClassCastException { + return (RpcId)super.getActualInstance(); + } + + /** + * Get the actual instance of `RuleChainId`. If the actual instance is not `RuleChainId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `RuleChainId` + * @throws ClassCastException if the instance is not `RuleChainId` + */ + public RuleChainId getRuleChainId() throws ClassCastException { + return (RuleChainId)super.getActualInstance(); + } + + /** + * Get the actual instance of `RuleNodeId`. If the actual instance is not `RuleNodeId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `RuleNodeId` + * @throws ClassCastException if the instance is not `RuleNodeId` + */ + public RuleNodeId getRuleNodeId() throws ClassCastException { + return (RuleNodeId)super.getActualInstance(); + } + + /** + * Get the actual instance of `SchedulerEventId`. If the actual instance is not `SchedulerEventId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SchedulerEventId` + * @throws ClassCastException if the instance is not `SchedulerEventId` + */ + public SchedulerEventId getSchedulerEventId() throws ClassCastException { + return (SchedulerEventId)super.getActualInstance(); + } + + /** + * Get the actual instance of `SecretId`. If the actual instance is not `SecretId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SecretId` + * @throws ClassCastException if the instance is not `SecretId` + */ + public SecretId getSecretId() throws ClassCastException { + return (SecretId)super.getActualInstance(); + } + + /** + * Get the actual instance of `TbResourceId`. If the actual instance is not `TbResourceId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `TbResourceId` + * @throws ClassCastException if the instance is not `TbResourceId` + */ + public TbResourceId getTbResourceId() throws ClassCastException { + return (TbResourceId)super.getActualInstance(); + } + + /** + * Get the actual instance of `TenantId`. If the actual instance is not `TenantId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `TenantId` + * @throws ClassCastException if the instance is not `TenantId` + */ + public TenantId getTenantId() throws ClassCastException { + return (TenantId)super.getActualInstance(); + } + + /** + * Get the actual instance of `TenantProfileId`. If the actual instance is not `TenantProfileId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `TenantProfileId` + * @throws ClassCastException if the instance is not `TenantProfileId` + */ + public TenantProfileId getTenantProfileId() throws ClassCastException { + return (TenantProfileId)super.getActualInstance(); + } + + /** + * Get the actual instance of `UserId`. If the actual instance is not `UserId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `UserId` + * @throws ClassCastException if the instance is not `UserId` + */ + public UserId getUserId() throws ClassCastException { + return (UserId)super.getActualInstance(); + } + + /** + * Get the actual instance of `WidgetTypeId`. If the actual instance is not `WidgetTypeId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `WidgetTypeId` + * @throws ClassCastException if the instance is not `WidgetTypeId` + */ + public WidgetTypeId getWidgetTypeId() throws ClassCastException { + return (WidgetTypeId)super.getActualInstance(); + } + + /** + * Get the actual instance of `WidgetsBundleId`. If the actual instance is not `WidgetsBundleId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `WidgetsBundleId` + * @throws ClassCastException if the instance is not `WidgetsBundleId` + */ + public WidgetsBundleId getWidgetsBundleId() throws ClassCastException { + return (WidgetsBundleId)super.getActualInstance(); + } + + + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof AdminSettingsId) { + if (getActualInstance() != null) { + joiner.add(((AdminSettingsId)getActualInstance()).toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof AiModelId) { + if (getActualInstance() != null) { + joiner.add(((AiModelId)getActualInstance()).toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof AlarmId) { + if (getActualInstance() != null) { + joiner.add(((AlarmId)getActualInstance()).toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ApiKeyId) { + if (getActualInstance() != null) { + joiner.add(((ApiKeyId)getActualInstance()).toUrlQueryString(prefix + "one_of_3" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ApiUsageStateId) { + if (getActualInstance() != null) { + joiner.add(((ApiUsageStateId)getActualInstance()).toUrlQueryString(prefix + "one_of_4" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof AssetId) { + if (getActualInstance() != null) { + joiner.add(((AssetId)getActualInstance()).toUrlQueryString(prefix + "one_of_5" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof AssetProfileId) { + if (getActualInstance() != null) { + joiner.add(((AssetProfileId)getActualInstance()).toUrlQueryString(prefix + "one_of_6" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof BlobEntityId) { + if (getActualInstance() != null) { + joiner.add(((BlobEntityId)getActualInstance()).toUrlQueryString(prefix + "one_of_7" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CalculatedFieldId) { + if (getActualInstance() != null) { + joiner.add(((CalculatedFieldId)getActualInstance()).toUrlQueryString(prefix + "one_of_8" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ConverterId) { + if (getActualInstance() != null) { + joiner.add(((ConverterId)getActualInstance()).toUrlQueryString(prefix + "one_of_9" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CustomerId) { + if (getActualInstance() != null) { + joiner.add(((CustomerId)getActualInstance()).toUrlQueryString(prefix + "one_of_10" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof DashboardId) { + if (getActualInstance() != null) { + joiner.add(((DashboardId)getActualInstance()).toUrlQueryString(prefix + "one_of_11" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof DeviceId) { + if (getActualInstance() != null) { + joiner.add(((DeviceId)getActualInstance()).toUrlQueryString(prefix + "one_of_12" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof DeviceProfileId) { + if (getActualInstance() != null) { + joiner.add(((DeviceProfileId)getActualInstance()).toUrlQueryString(prefix + "one_of_13" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof DomainId) { + if (getActualInstance() != null) { + joiner.add(((DomainId)getActualInstance()).toUrlQueryString(prefix + "one_of_14" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof EdgeId) { + if (getActualInstance() != null) { + joiner.add(((EdgeId)getActualInstance()).toUrlQueryString(prefix + "one_of_15" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof EntityGroupId) { + if (getActualInstance() != null) { + joiner.add(((EntityGroupId)getActualInstance()).toUrlQueryString(prefix + "one_of_16" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof EntityViewId) { + if (getActualInstance() != null) { + joiner.add(((EntityViewId)getActualInstance()).toUrlQueryString(prefix + "one_of_17" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof GroupPermissionId) { + if (getActualInstance() != null) { + joiner.add(((GroupPermissionId)getActualInstance()).toUrlQueryString(prefix + "one_of_18" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof IntegrationId) { + if (getActualInstance() != null) { + joiner.add(((IntegrationId)getActualInstance()).toUrlQueryString(prefix + "one_of_19" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof JobId) { + if (getActualInstance() != null) { + joiner.add(((JobId)getActualInstance()).toUrlQueryString(prefix + "one_of_20" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof MobileAppBundleId) { + if (getActualInstance() != null) { + joiner.add(((MobileAppBundleId)getActualInstance()).toUrlQueryString(prefix + "one_of_21" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof MobileAppId) { + if (getActualInstance() != null) { + joiner.add(((MobileAppId)getActualInstance()).toUrlQueryString(prefix + "one_of_22" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof NotificationId) { + if (getActualInstance() != null) { + joiner.add(((NotificationId)getActualInstance()).toUrlQueryString(prefix + "one_of_23" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof NotificationRequestId) { + if (getActualInstance() != null) { + joiner.add(((NotificationRequestId)getActualInstance()).toUrlQueryString(prefix + "one_of_24" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof NotificationRuleId) { + if (getActualInstance() != null) { + joiner.add(((NotificationRuleId)getActualInstance()).toUrlQueryString(prefix + "one_of_25" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof NotificationTargetId) { + if (getActualInstance() != null) { + joiner.add(((NotificationTargetId)getActualInstance()).toUrlQueryString(prefix + "one_of_26" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof NotificationTemplateId) { + if (getActualInstance() != null) { + joiner.add(((NotificationTemplateId)getActualInstance()).toUrlQueryString(prefix + "one_of_27" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof OAuth2ClientId) { + if (getActualInstance() != null) { + joiner.add(((OAuth2ClientId)getActualInstance()).toUrlQueryString(prefix + "one_of_28" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof OtaPackageId) { + if (getActualInstance() != null) { + joiner.add(((OtaPackageId)getActualInstance()).toUrlQueryString(prefix + "one_of_29" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof QueueId) { + if (getActualInstance() != null) { + joiner.add(((QueueId)getActualInstance()).toUrlQueryString(prefix + "one_of_30" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof QueueStatsId) { + if (getActualInstance() != null) { + joiner.add(((QueueStatsId)getActualInstance()).toUrlQueryString(prefix + "one_of_31" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ReportId) { + if (getActualInstance() != null) { + joiner.add(((ReportId)getActualInstance()).toUrlQueryString(prefix + "one_of_32" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ReportTemplateId) { + if (getActualInstance() != null) { + joiner.add(((ReportTemplateId)getActualInstance()).toUrlQueryString(prefix + "one_of_33" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof RoleId) { + if (getActualInstance() != null) { + joiner.add(((RoleId)getActualInstance()).toUrlQueryString(prefix + "one_of_34" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof RpcId) { + if (getActualInstance() != null) { + joiner.add(((RpcId)getActualInstance()).toUrlQueryString(prefix + "one_of_35" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof RuleChainId) { + if (getActualInstance() != null) { + joiner.add(((RuleChainId)getActualInstance()).toUrlQueryString(prefix + "one_of_36" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof RuleNodeId) { + if (getActualInstance() != null) { + joiner.add(((RuleNodeId)getActualInstance()).toUrlQueryString(prefix + "one_of_37" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof SchedulerEventId) { + if (getActualInstance() != null) { + joiner.add(((SchedulerEventId)getActualInstance()).toUrlQueryString(prefix + "one_of_38" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof SecretId) { + if (getActualInstance() != null) { + joiner.add(((SecretId)getActualInstance()).toUrlQueryString(prefix + "one_of_39" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof TbResourceId) { + if (getActualInstance() != null) { + joiner.add(((TbResourceId)getActualInstance()).toUrlQueryString(prefix + "one_of_40" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof TenantId) { + if (getActualInstance() != null) { + joiner.add(((TenantId)getActualInstance()).toUrlQueryString(prefix + "one_of_41" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof TenantProfileId) { + if (getActualInstance() != null) { + joiner.add(((TenantProfileId)getActualInstance()).toUrlQueryString(prefix + "one_of_42" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof UserId) { + if (getActualInstance() != null) { + joiner.add(((UserId)getActualInstance()).toUrlQueryString(prefix + "one_of_43" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof WidgetTypeId) { + if (getActualInstance() != null) { + joiner.add(((WidgetTypeId)getActualInstance()).toUrlQueryString(prefix + "one_of_44" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof WidgetsBundleId) { + if (getActualInstance() != null) { + joiner.add(((WidgetsBundleId)getActualInstance()).toUrlQueryString(prefix + "one_of_45" + suffix)); + } + return joiner.toString(); + } + return null; + } + +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityId.java b/paas/src/main/java/org/thingsboard/client/model/EntityId.java index e1008491..026d4143 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityId.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityId.java @@ -21,9 +21,12 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; @@ -32,6 +35,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * EntityId @@ -41,6 +45,60 @@ EntityId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = AdminSettingsId.class, name = "ADMIN_SETTINGS"), + @JsonSubTypes.Type(value = AiModelId.class, name = "AI_MODEL"), + @JsonSubTypes.Type(value = AlarmId.class, name = "ALARM"), + @JsonSubTypes.Type(value = ApiKeyId.class, name = "API_KEY"), + @JsonSubTypes.Type(value = ApiUsageStateId.class, name = "API_USAGE_STATE"), + @JsonSubTypes.Type(value = AssetId.class, name = "ASSET"), + @JsonSubTypes.Type(value = AssetProfileId.class, name = "ASSET_PROFILE"), + @JsonSubTypes.Type(value = BlobEntityId.class, name = "BLOB_ENTITY"), + @JsonSubTypes.Type(value = CalculatedFieldId.class, name = "CALCULATED_FIELD"), + @JsonSubTypes.Type(value = ConverterId.class, name = "CONVERTER"), + @JsonSubTypes.Type(value = CustomerId.class, name = "CUSTOMER"), + @JsonSubTypes.Type(value = DashboardId.class, name = "DASHBOARD"), + @JsonSubTypes.Type(value = DeviceId.class, name = "DEVICE"), + @JsonSubTypes.Type(value = DeviceProfileId.class, name = "DEVICE_PROFILE"), + @JsonSubTypes.Type(value = DomainId.class, name = "DOMAIN"), + @JsonSubTypes.Type(value = EdgeId.class, name = "EDGE"), + @JsonSubTypes.Type(value = EntityGroupId.class, name = "ENTITY_GROUP"), + @JsonSubTypes.Type(value = EntityViewId.class, name = "ENTITY_VIEW"), + @JsonSubTypes.Type(value = GroupPermissionId.class, name = "GROUP_PERMISSION"), + @JsonSubTypes.Type(value = IntegrationId.class, name = "INTEGRATION"), + @JsonSubTypes.Type(value = JobId.class, name = "JOB"), + @JsonSubTypes.Type(value = MobileAppId.class, name = "MOBILE_APP"), + @JsonSubTypes.Type(value = MobileAppBundleId.class, name = "MOBILE_APP_BUNDLE"), + @JsonSubTypes.Type(value = NotificationId.class, name = "NOTIFICATION"), + @JsonSubTypes.Type(value = NotificationRequestId.class, name = "NOTIFICATION_REQUEST"), + @JsonSubTypes.Type(value = NotificationRuleId.class, name = "NOTIFICATION_RULE"), + @JsonSubTypes.Type(value = NotificationTargetId.class, name = "NOTIFICATION_TARGET"), + @JsonSubTypes.Type(value = NotificationTemplateId.class, name = "NOTIFICATION_TEMPLATE"), + @JsonSubTypes.Type(value = OAuth2ClientId.class, name = "OAUTH2_CLIENT"), + @JsonSubTypes.Type(value = OtaPackageId.class, name = "OTA_PACKAGE"), + @JsonSubTypes.Type(value = QueueId.class, name = "QUEUE"), + @JsonSubTypes.Type(value = QueueStatsId.class, name = "QUEUE_STATS"), + @JsonSubTypes.Type(value = ReportId.class, name = "REPORT"), + @JsonSubTypes.Type(value = ReportTemplateId.class, name = "REPORT_TEMPLATE"), + @JsonSubTypes.Type(value = RoleId.class, name = "ROLE"), + @JsonSubTypes.Type(value = RpcId.class, name = "RPC"), + @JsonSubTypes.Type(value = RuleChainId.class, name = "RULE_CHAIN"), + @JsonSubTypes.Type(value = RuleNodeId.class, name = "RULE_NODE"), + @JsonSubTypes.Type(value = SchedulerEventId.class, name = "SCHEDULER_EVENT"), + @JsonSubTypes.Type(value = SecretId.class, name = "SECRET"), + @JsonSubTypes.Type(value = TbResourceId.class, name = "TB_RESOURCE"), + @JsonSubTypes.Type(value = TenantId.class, name = "TENANT"), + @JsonSubTypes.Type(value = TenantProfileId.class, name = "TENANT_PROFILE"), + @JsonSubTypes.Type(value = UserId.class, name = "USER"), + @JsonSubTypes.Type(value = WidgetsBundleId.class, name = "WIDGETS_BUNDLE"), + @JsonSubTypes.Type(value = WidgetTypeId.class, name = "WIDGET_TYPE"), +}) + public class EntityId { public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nonnull @@ -187,5 +245,57 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ADMIN_SETTINGS", AdminSettingsId.class); + mappings.put("AI_MODEL", AiModelId.class); + mappings.put("ALARM", AlarmId.class); + mappings.put("API_KEY", ApiKeyId.class); + mappings.put("API_USAGE_STATE", ApiUsageStateId.class); + mappings.put("ASSET", AssetId.class); + mappings.put("ASSET_PROFILE", AssetProfileId.class); + mappings.put("BLOB_ENTITY", BlobEntityId.class); + mappings.put("CALCULATED_FIELD", CalculatedFieldId.class); + mappings.put("CONVERTER", ConverterId.class); + mappings.put("CUSTOMER", CustomerId.class); + mappings.put("DASHBOARD", DashboardId.class); + mappings.put("DEVICE", DeviceId.class); + mappings.put("DEVICE_PROFILE", DeviceProfileId.class); + mappings.put("DOMAIN", DomainId.class); + mappings.put("EDGE", EdgeId.class); + mappings.put("ENTITY_GROUP", EntityGroupId.class); + mappings.put("ENTITY_VIEW", EntityViewId.class); + mappings.put("GROUP_PERMISSION", GroupPermissionId.class); + mappings.put("INTEGRATION", IntegrationId.class); + mappings.put("JOB", JobId.class); + mappings.put("MOBILE_APP", MobileAppId.class); + mappings.put("MOBILE_APP_BUNDLE", MobileAppBundleId.class); + mappings.put("NOTIFICATION", NotificationId.class); + mappings.put("NOTIFICATION_REQUEST", NotificationRequestId.class); + mappings.put("NOTIFICATION_RULE", NotificationRuleId.class); + mappings.put("NOTIFICATION_TARGET", NotificationTargetId.class); + mappings.put("NOTIFICATION_TEMPLATE", NotificationTemplateId.class); + mappings.put("OAUTH2_CLIENT", OAuth2ClientId.class); + mappings.put("OTA_PACKAGE", OtaPackageId.class); + mappings.put("QUEUE", QueueId.class); + mappings.put("QUEUE_STATS", QueueStatsId.class); + mappings.put("REPORT", ReportId.class); + mappings.put("REPORT_TEMPLATE", ReportTemplateId.class); + mappings.put("ROLE", RoleId.class); + mappings.put("RPC", RpcId.class); + mappings.put("RULE_CHAIN", RuleChainId.class); + mappings.put("RULE_NODE", RuleNodeId.class); + mappings.put("SCHEDULER_EVENT", SchedulerEventId.class); + mappings.put("SECRET", SecretId.class); + mappings.put("TB_RESOURCE", TbResourceId.class); + mappings.put("TENANT", TenantId.class); + mappings.put("TENANT_PROFILE", TenantProfileId.class); + mappings.put("USER", UserId.class); + mappings.put("WIDGETS_BUNDLE", WidgetsBundleId.class); + mappings.put("WIDGET_TYPE", WidgetTypeId.class); + mappings.put("EntityId", EntityId.class); + JSON.registerDiscriminator(EntityId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityView.java b/paas/src/main/java/org/thingsboard/client/model/EntityView.java index 7f9479a2..bbed15c0 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityView.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityView.java @@ -115,14 +115,12 @@ public EntityView() { public EntityView( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime ) { this(); this.tenantId = tenantId; this.customerId = customerId; this.createdTime = createdTime; - this.ownerId = ownerId; } public EntityView entityId(@javax.annotation.Nonnull EntityId entityId) { @@ -359,6 +357,11 @@ public Long getCreatedTime() { + public EntityView ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -371,6 +374,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public EntityView additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityViewId.java b/paas/src/main/java/org/thingsboard/client/model/EntityViewId.java index 275255ba..8f144abd 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityViewId.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityViewId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * EntityViewId */ @JsonPropertyOrder({ - EntityViewId.JSON_PROPERTY_ID, - EntityViewId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class EntityViewId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class EntityViewId extends EntityId { public EntityViewId() { } + @Override public EntityViewId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public EntityViewId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this EntityViewId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - EntityViewId entityViewId = (EntityViewId) o; - return Objects.equals(this.id, entityViewId.id) && - Objects.equals(this.entityType, entityViewId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EntityViewId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EntityViewId", EntityViewId.class); + JSON.registerDiscriminator(EntityViewId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityViewInfo.java b/paas/src/main/java/org/thingsboard/client/model/EntityViewInfo.java index 74c8e402..75bd9bcd 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityViewInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityViewInfo.java @@ -129,15 +129,13 @@ public EntityViewInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; this.ownerName = ownerName; - this.ownerId = ownerId; } public EntityViewInfo id(@javax.annotation.Nullable EntityViewId id) { @@ -420,6 +418,11 @@ public void setGroups(@javax.annotation.Nullable List groups) { } + public EntityViewInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -432,6 +435,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public EntityViewInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/ErrorComponentAllOfException.java b/paas/src/main/java/org/thingsboard/client/model/ErrorComponentAllOfException.java index 4e4fbc22..e9b38739 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ErrorComponentAllOfException.java +++ b/paas/src/main/java/org/thingsboard/client/model/ErrorComponentAllOfException.java @@ -41,9 +41,9 @@ @JsonPropertyOrder({ ErrorComponentAllOfException.JSON_PROPERTY_CAUSE, ErrorComponentAllOfException.JSON_PROPERTY_STACK_TRACE, + ErrorComponentAllOfException.JSON_PROPERTY_LOCALIZED_MESSAGE, ErrorComponentAllOfException.JSON_PROPERTY_MESSAGE, - ErrorComponentAllOfException.JSON_PROPERTY_SUPPRESSED, - ErrorComponentAllOfException.JSON_PROPERTY_LOCALIZED_MESSAGE + ErrorComponentAllOfException.JSON_PROPERTY_SUPPRESSED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class ErrorComponentAllOfException { @@ -55,6 +55,10 @@ public class ErrorComponentAllOfException { @javax.annotation.Nullable private List stackTrace = new ArrayList<>(); + public static final String JSON_PROPERTY_LOCALIZED_MESSAGE = "localizedMessage"; + @javax.annotation.Nullable + private String localizedMessage; + public static final String JSON_PROPERTY_MESSAGE = "message"; @javax.annotation.Nullable private String message; @@ -63,10 +67,6 @@ public class ErrorComponentAllOfException { @javax.annotation.Nullable private List suppressed = new ArrayList<>(); - public static final String JSON_PROPERTY_LOCALIZED_MESSAGE = "localizedMessage"; - @javax.annotation.Nullable - private String localizedMessage; - public ErrorComponentAllOfException() { } @@ -126,6 +126,30 @@ public void setStackTrace(@javax.annotation.Nullable List stackTrace = new ArrayList<>(); - public static final String JSON_PROPERTY_MESSAGE = "message"; - @javax.annotation.Nullable - private String message; - public static final String JSON_PROPERTY_LOCALIZED_MESSAGE = "localizedMessage"; @javax.annotation.Nullable private String localizedMessage; + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + public ErrorComponentAllOfExceptionCause() { } @@ -91,51 +91,51 @@ public void setStackTrace(@javax.annotation.Nullable List> @Override - public EscalatedNotificationRuleRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public EscalatedNotificationRuleRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/paas/src/main/java/org/thingsboard/client/model/EventInfo.java b/paas/src/main/java/org/thingsboard/client/model/EventInfo.java index e367fdbf..1cbe3f86 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EventInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/EventInfo.java @@ -82,13 +82,11 @@ public EventInfo() { @JsonCreator public EventInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_ENTITY_ID) EntityId entityId + @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; - this.entityId = entityId; } public EventInfo id(@javax.annotation.Nullable EventId id) { @@ -191,6 +189,11 @@ public void setUid(@javax.annotation.Nullable String uid) { } + public EventInfo entityId(@javax.annotation.Nullable EntityId entityId) { + this.entityId = entityId; + return this; + } + /** * JSON object with Entity Id for which event is created. * @return entityId @@ -203,6 +206,11 @@ public EntityId getEntityId() { } + @JsonProperty(value = JSON_PROPERTY_ENTITY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityId(@javax.annotation.Nullable EntityId entityId) { + this.entityId = entityId; + } public EventInfo body(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode body) { diff --git a/paas/src/main/java/org/thingsboard/client/model/Failure.java b/paas/src/main/java/org/thingsboard/client/model/Failure.java index ae611e38..4a671180 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Failure.java +++ b/paas/src/main/java/org/thingsboard/client/model/Failure.java @@ -40,8 +40,7 @@ * Failure */ @JsonPropertyOrder({ - Failure.JSON_PROPERTY_ERROR_DETAILS, - Failure.JSON_PROPERTY_STATUS + Failure.JSON_PROPERTY_ERROR_DETAILS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -55,10 +54,6 @@ public class Failure extends TbChatResponse { @javax.annotation.Nullable private String errorDetails; - public static final String JSON_PROPERTY_STATUS = "status"; - @javax.annotation.Nullable - private String status; - public Failure() { } @@ -86,30 +81,12 @@ public void setErrorDetails(@javax.annotation.Nullable String errorDetails) { } - public Failure status(@javax.annotation.Nullable String status) { - this.status = status; + @Override + public Failure status(@javax.annotation.Nonnull String status) { + this.setStatus(status); return this; } - /** - * Get status - * @return status - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_STATUS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } - - - @JsonProperty(value = JSON_PROPERTY_STATUS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatus(@javax.annotation.Nullable String status) { - this.status = status; - } - - /** * Return true if this Failure object is equal to o. */ @@ -123,13 +100,12 @@ public boolean equals(Object o) { } Failure failure = (Failure) o; return Objects.equals(this.errorDetails, failure.errorDetails) && - Objects.equals(this.status, failure.status) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(errorDetails, status, super.hashCode()); + return Objects.hash(errorDetails, super.hashCode()); } @Override @@ -138,7 +114,6 @@ public String toString() { sb.append("class Failure {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" errorDetails: ").append(toIndentedString(errorDetails)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/paas/src/main/java/org/thingsboard/client/model/FeaturesInfo.java b/paas/src/main/java/org/thingsboard/client/model/FeaturesInfo.java index eab34c56..482a62d0 100644 --- a/paas/src/main/java/org/thingsboard/client/model/FeaturesInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/FeaturesInfo.java @@ -35,87 +35,111 @@ * FeaturesInfo */ @JsonPropertyOrder({ + FeaturesInfo.JSON_PROPERTY_WHITE_LABELING_ENABLED, + FeaturesInfo.JSON_PROPERTY_EMAIL_ENABLED, FeaturesInfo.JSON_PROPERTY_SMS_ENABLED, - FeaturesInfo.JSON_PROPERTY_OAUTH_ENABLED, FeaturesInfo.JSON_PROPERTY_NOTIFICATION_ENABLED, - FeaturesInfo.JSON_PROPERTY_WHITE_LABELING_ENABLED, - FeaturesInfo.JSON_PROPERTY_TWO_FA_ENABLED, - FeaturesInfo.JSON_PROPERTY_EMAIL_ENABLED + FeaturesInfo.JSON_PROPERTY_OAUTH_ENABLED, + FeaturesInfo.JSON_PROPERTY_TWO_FA_ENABLED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class FeaturesInfo { - public static final String JSON_PROPERTY_SMS_ENABLED = "smsEnabled"; + public static final String JSON_PROPERTY_WHITE_LABELING_ENABLED = "whiteLabelingEnabled"; @javax.annotation.Nullable - private Boolean smsEnabled; + private Boolean whiteLabelingEnabled; - public static final String JSON_PROPERTY_OAUTH_ENABLED = "oauthEnabled"; + public static final String JSON_PROPERTY_EMAIL_ENABLED = "emailEnabled"; @javax.annotation.Nullable - private Boolean oauthEnabled; + private Boolean emailEnabled; + + public static final String JSON_PROPERTY_SMS_ENABLED = "smsEnabled"; + @javax.annotation.Nullable + private Boolean smsEnabled; public static final String JSON_PROPERTY_NOTIFICATION_ENABLED = "notificationEnabled"; @javax.annotation.Nullable private Boolean notificationEnabled; - public static final String JSON_PROPERTY_WHITE_LABELING_ENABLED = "whiteLabelingEnabled"; + public static final String JSON_PROPERTY_OAUTH_ENABLED = "oauthEnabled"; @javax.annotation.Nullable - private Boolean whiteLabelingEnabled; + private Boolean oauthEnabled; public static final String JSON_PROPERTY_TWO_FA_ENABLED = "twoFaEnabled"; @javax.annotation.Nullable private Boolean twoFaEnabled; - public static final String JSON_PROPERTY_EMAIL_ENABLED = "emailEnabled"; + public FeaturesInfo() { + } + + public FeaturesInfo whiteLabelingEnabled(@javax.annotation.Nullable Boolean whiteLabelingEnabled) { + this.whiteLabelingEnabled = whiteLabelingEnabled; + return this; + } + + /** + * Get whiteLabelingEnabled + * @return whiteLabelingEnabled + */ @javax.annotation.Nullable - private Boolean emailEnabled; + @JsonProperty(value = JSON_PROPERTY_WHITE_LABELING_ENABLED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getWhiteLabelingEnabled() { + return whiteLabelingEnabled; + } - public FeaturesInfo() { + + @JsonProperty(value = JSON_PROPERTY_WHITE_LABELING_ENABLED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWhiteLabelingEnabled(@javax.annotation.Nullable Boolean whiteLabelingEnabled) { + this.whiteLabelingEnabled = whiteLabelingEnabled; } - public FeaturesInfo smsEnabled(@javax.annotation.Nullable Boolean smsEnabled) { - this.smsEnabled = smsEnabled; + + public FeaturesInfo emailEnabled(@javax.annotation.Nullable Boolean emailEnabled) { + this.emailEnabled = emailEnabled; return this; } /** - * Get smsEnabled - * @return smsEnabled + * Get emailEnabled + * @return emailEnabled */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SMS_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_EMAIL_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSmsEnabled() { - return smsEnabled; + public Boolean getEmailEnabled() { + return emailEnabled; } - @JsonProperty(value = JSON_PROPERTY_SMS_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_EMAIL_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsEnabled(@javax.annotation.Nullable Boolean smsEnabled) { - this.smsEnabled = smsEnabled; + public void setEmailEnabled(@javax.annotation.Nullable Boolean emailEnabled) { + this.emailEnabled = emailEnabled; } - public FeaturesInfo oauthEnabled(@javax.annotation.Nullable Boolean oauthEnabled) { - this.oauthEnabled = oauthEnabled; + public FeaturesInfo smsEnabled(@javax.annotation.Nullable Boolean smsEnabled) { + this.smsEnabled = smsEnabled; return this; } /** - * Get oauthEnabled - * @return oauthEnabled + * Get smsEnabled + * @return smsEnabled */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_OAUTH_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_SMS_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getOauthEnabled() { - return oauthEnabled; + public Boolean getSmsEnabled() { + return smsEnabled; } - @JsonProperty(value = JSON_PROPERTY_OAUTH_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_SMS_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauthEnabled(@javax.annotation.Nullable Boolean oauthEnabled) { - this.oauthEnabled = oauthEnabled; + public void setSmsEnabled(@javax.annotation.Nullable Boolean smsEnabled) { + this.smsEnabled = smsEnabled; } @@ -143,27 +167,27 @@ public void setNotificationEnabled(@javax.annotation.Nullable Boolean notificati } - public FeaturesInfo whiteLabelingEnabled(@javax.annotation.Nullable Boolean whiteLabelingEnabled) { - this.whiteLabelingEnabled = whiteLabelingEnabled; + public FeaturesInfo oauthEnabled(@javax.annotation.Nullable Boolean oauthEnabled) { + this.oauthEnabled = oauthEnabled; return this; } /** - * Get whiteLabelingEnabled - * @return whiteLabelingEnabled + * Get oauthEnabled + * @return oauthEnabled */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_WHITE_LABELING_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_OAUTH_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getWhiteLabelingEnabled() { - return whiteLabelingEnabled; + public Boolean getOauthEnabled() { + return oauthEnabled; } - @JsonProperty(value = JSON_PROPERTY_WHITE_LABELING_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_OAUTH_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWhiteLabelingEnabled(@javax.annotation.Nullable Boolean whiteLabelingEnabled) { - this.whiteLabelingEnabled = whiteLabelingEnabled; + public void setOauthEnabled(@javax.annotation.Nullable Boolean oauthEnabled) { + this.oauthEnabled = oauthEnabled; } @@ -191,30 +215,6 @@ public void setTwoFaEnabled(@javax.annotation.Nullable Boolean twoFaEnabled) { } - public FeaturesInfo emailEnabled(@javax.annotation.Nullable Boolean emailEnabled) { - this.emailEnabled = emailEnabled; - return this; - } - - /** - * Get emailEnabled - * @return emailEnabled - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_EMAIL_ENABLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEmailEnabled() { - return emailEnabled; - } - - - @JsonProperty(value = JSON_PROPERTY_EMAIL_ENABLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailEnabled(@javax.annotation.Nullable Boolean emailEnabled) { - this.emailEnabled = emailEnabled; - } - - /** * Return true if this FeaturesInfo object is equal to o. */ @@ -227,29 +227,29 @@ public boolean equals(Object o) { return false; } FeaturesInfo featuresInfo = (FeaturesInfo) o; - return Objects.equals(this.smsEnabled, featuresInfo.smsEnabled) && - Objects.equals(this.oauthEnabled, featuresInfo.oauthEnabled) && + return Objects.equals(this.whiteLabelingEnabled, featuresInfo.whiteLabelingEnabled) && + Objects.equals(this.emailEnabled, featuresInfo.emailEnabled) && + Objects.equals(this.smsEnabled, featuresInfo.smsEnabled) && Objects.equals(this.notificationEnabled, featuresInfo.notificationEnabled) && - Objects.equals(this.whiteLabelingEnabled, featuresInfo.whiteLabelingEnabled) && - Objects.equals(this.twoFaEnabled, featuresInfo.twoFaEnabled) && - Objects.equals(this.emailEnabled, featuresInfo.emailEnabled); + Objects.equals(this.oauthEnabled, featuresInfo.oauthEnabled) && + Objects.equals(this.twoFaEnabled, featuresInfo.twoFaEnabled); } @Override public int hashCode() { - return Objects.hash(smsEnabled, oauthEnabled, notificationEnabled, whiteLabelingEnabled, twoFaEnabled, emailEnabled); + return Objects.hash(whiteLabelingEnabled, emailEnabled, smsEnabled, notificationEnabled, oauthEnabled, twoFaEnabled); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FeaturesInfo {\n"); + sb.append(" whiteLabelingEnabled: ").append(toIndentedString(whiteLabelingEnabled)).append("\n"); + sb.append(" emailEnabled: ").append(toIndentedString(emailEnabled)).append("\n"); sb.append(" smsEnabled: ").append(toIndentedString(smsEnabled)).append("\n"); - sb.append(" oauthEnabled: ").append(toIndentedString(oauthEnabled)).append("\n"); sb.append(" notificationEnabled: ").append(toIndentedString(notificationEnabled)).append("\n"); - sb.append(" whiteLabelingEnabled: ").append(toIndentedString(whiteLabelingEnabled)).append("\n"); + sb.append(" oauthEnabled: ").append(toIndentedString(oauthEnabled)).append("\n"); sb.append(" twoFaEnabled: ").append(toIndentedString(twoFaEnabled)).append("\n"); - sb.append(" emailEnabled: ").append(toIndentedString(emailEnabled)).append("\n"); sb.append("}"); return sb.toString(); } @@ -297,24 +297,29 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); + // add `whiteLabelingEnabled` to the URL query string + if (getWhiteLabelingEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%swhiteLabelingEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWhiteLabelingEnabled())))); + } + + // add `emailEnabled` to the URL query string + if (getEmailEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%semailEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmailEnabled())))); + } + // add `smsEnabled` to the URL query string if (getSmsEnabled() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%ssmsEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSmsEnabled())))); } - // add `oauthEnabled` to the URL query string - if (getOauthEnabled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%soauthEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOauthEnabled())))); - } - // add `notificationEnabled` to the URL query string if (getNotificationEnabled() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%snotificationEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotificationEnabled())))); } - // add `whiteLabelingEnabled` to the URL query string - if (getWhiteLabelingEnabled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%swhiteLabelingEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWhiteLabelingEnabled())))); + // add `oauthEnabled` to the URL query string + if (getOauthEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%soauthEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOauthEnabled())))); } // add `twoFaEnabled` to the URL query string @@ -322,11 +327,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%stwoFaEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTwoFaEnabled())))); } - // add `emailEnabled` to the URL query string - if (getEmailEnabled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%semailEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmailEnabled())))); - } - return joiner.toString(); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/GeofencingCalculatedFieldConfiguration.java b/paas/src/main/java/org/thingsboard/client/model/GeofencingCalculatedFieldConfiguration.java index 60f0a24e..e0ae8741 100644 --- a/paas/src/main/java/org/thingsboard/client/model/GeofencingCalculatedFieldConfiguration.java +++ b/paas/src/main/java/org/thingsboard/client/model/GeofencingCalculatedFieldConfiguration.java @@ -46,9 +46,9 @@ */ @JsonPropertyOrder({ GeofencingCalculatedFieldConfiguration.JSON_PROPERTY_ENTITY_COORDINATES, - GeofencingCalculatedFieldConfiguration.JSON_PROPERTY_ZONE_GROUPS, GeofencingCalculatedFieldConfiguration.JSON_PROPERTY_SCHEDULED_UPDATE_ENABLED, - GeofencingCalculatedFieldConfiguration.JSON_PROPERTY_SCHEDULED_UPDATE_INTERVAL + GeofencingCalculatedFieldConfiguration.JSON_PROPERTY_SCHEDULED_UPDATE_INTERVAL, + GeofencingCalculatedFieldConfiguration.JSON_PROPERTY_ZONE_GROUPS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -62,10 +62,6 @@ public class GeofencingCalculatedFieldConfiguration extends CalculatedFieldConfi @javax.annotation.Nonnull private EntityCoordinates entityCoordinates; - public static final String JSON_PROPERTY_ZONE_GROUPS = "zoneGroups"; - @javax.annotation.Nonnull - private Map zoneGroups = new HashMap<>(); - public static final String JSON_PROPERTY_SCHEDULED_UPDATE_ENABLED = "scheduledUpdateEnabled"; @javax.annotation.Nullable private Boolean scheduledUpdateEnabled; @@ -74,6 +70,10 @@ public class GeofencingCalculatedFieldConfiguration extends CalculatedFieldConfi @javax.annotation.Nullable private Integer scheduledUpdateInterval; + public static final String JSON_PROPERTY_ZONE_GROUPS = "zoneGroups"; + @javax.annotation.Nonnull + private Map zoneGroups = new HashMap<>(); + public GeofencingCalculatedFieldConfiguration() { } @@ -101,38 +101,6 @@ public void setEntityCoordinates(@javax.annotation.Nonnull EntityCoordinates ent } - public GeofencingCalculatedFieldConfiguration zoneGroups(@javax.annotation.Nonnull Map zoneGroups) { - this.zoneGroups = zoneGroups; - return this; - } - - public GeofencingCalculatedFieldConfiguration putZoneGroupsItem(String key, ZoneGroupConfiguration zoneGroupsItem) { - if (this.zoneGroups == null) { - this.zoneGroups = new HashMap<>(); - } - this.zoneGroups.put(key, zoneGroupsItem); - return this; - } - - /** - * Get zoneGroups - * @return zoneGroups - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ZONE_GROUPS, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Map getZoneGroups() { - return zoneGroups; - } - - - @JsonProperty(value = JSON_PROPERTY_ZONE_GROUPS, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setZoneGroups(@javax.annotation.Nonnull Map zoneGroups) { - this.zoneGroups = zoneGroups; - } - - public GeofencingCalculatedFieldConfiguration scheduledUpdateEnabled(@javax.annotation.Nullable Boolean scheduledUpdateEnabled) { this.scheduledUpdateEnabled = scheduledUpdateEnabled; return this; @@ -181,18 +149,50 @@ public void setScheduledUpdateInterval(@javax.annotation.Nullable Integer schedu } - @Override - public GeofencingCalculatedFieldConfiguration aiGenerated(@javax.annotation.Nullable Boolean aiGenerated) { - this.setAiGenerated(aiGenerated); + public GeofencingCalculatedFieldConfiguration zoneGroups(@javax.annotation.Nonnull Map zoneGroups) { + this.zoneGroups = zoneGroups; + return this; + } + + public GeofencingCalculatedFieldConfiguration putZoneGroupsItem(String key, ZoneGroupConfiguration zoneGroupsItem) { + if (this.zoneGroups == null) { + this.zoneGroups = new HashMap<>(); + } + this.zoneGroups.put(key, zoneGroupsItem); return this; } + /** + * Get zoneGroups + * @return zoneGroups + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_ZONE_GROUPS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getZoneGroups() { + return zoneGroups; + } + + + @JsonProperty(value = JSON_PROPERTY_ZONE_GROUPS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setZoneGroups(@javax.annotation.Nonnull Map zoneGroups) { + this.zoneGroups = zoneGroups; + } + + @Override - public GeofencingCalculatedFieldConfiguration output(@javax.annotation.Nonnull Output output) { + public GeofencingCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { this.setOutput(output); return this; } + @Override + public GeofencingCalculatedFieldConfiguration aiGenerated(@javax.annotation.Nullable Boolean aiGenerated) { + this.setAiGenerated(aiGenerated); + return this; + } + @Override public GeofencingCalculatedFieldConfiguration type(@javax.annotation.Nonnull String type) { this.setType(type); @@ -212,15 +212,15 @@ public boolean equals(Object o) { } GeofencingCalculatedFieldConfiguration geofencingCalculatedFieldConfiguration = (GeofencingCalculatedFieldConfiguration) o; return Objects.equals(this.entityCoordinates, geofencingCalculatedFieldConfiguration.entityCoordinates) && - Objects.equals(this.zoneGroups, geofencingCalculatedFieldConfiguration.zoneGroups) && Objects.equals(this.scheduledUpdateEnabled, geofencingCalculatedFieldConfiguration.scheduledUpdateEnabled) && Objects.equals(this.scheduledUpdateInterval, geofencingCalculatedFieldConfiguration.scheduledUpdateInterval) && + Objects.equals(this.zoneGroups, geofencingCalculatedFieldConfiguration.zoneGroups) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(entityCoordinates, zoneGroups, scheduledUpdateEnabled, scheduledUpdateInterval, super.hashCode()); + return Objects.hash(entityCoordinates, scheduledUpdateEnabled, scheduledUpdateInterval, zoneGroups, super.hashCode()); } @Override @@ -229,9 +229,9 @@ public String toString() { sb.append("class GeofencingCalculatedFieldConfiguration {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" entityCoordinates: ").append(toIndentedString(entityCoordinates)).append("\n"); - sb.append(" zoneGroups: ").append(toIndentedString(zoneGroups)).append("\n"); sb.append(" scheduledUpdateEnabled: ").append(toIndentedString(scheduledUpdateEnabled)).append("\n"); sb.append(" scheduledUpdateInterval: ").append(toIndentedString(scheduledUpdateInterval)).append("\n"); + sb.append(" zoneGroups: ").append(toIndentedString(zoneGroups)).append("\n"); sb.append("}"); return sb.toString(); } @@ -279,16 +279,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `aiGenerated` to the URL query string - if (getAiGenerated() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%saiGenerated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAiGenerated())))); - } - // add `output` to the URL query string if (getOutput() != null) { joiner.add(getOutput().toUrlQueryString(prefix + "output" + suffix)); } + // add `aiGenerated` to the URL query string + if (getAiGenerated() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%saiGenerated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAiGenerated())))); + } + // add `type` to the URL query string if (getType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); @@ -299,16 +299,6 @@ public String toUrlQueryString(String prefix) { joiner.add(getEntityCoordinates().toUrlQueryString(prefix + "entityCoordinates" + suffix)); } - // add `zoneGroups` to the URL query string - if (getZoneGroups() != null) { - for (String _key : getZoneGroups().keySet()) { - if (getZoneGroups().get(_key) != null) { - joiner.add(getZoneGroups().get(_key).toUrlQueryString(String.format(java.util.Locale.ROOT, "%szoneGroups%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix)))); - } - } - } - // add `scheduledUpdateEnabled` to the URL query string if (getScheduledUpdateEnabled() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sscheduledUpdateEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScheduledUpdateEnabled())))); @@ -319,6 +309,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sscheduledUpdateInterval%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScheduledUpdateInterval())))); } + // add `zoneGroups` to the URL query string + if (getZoneGroups() != null) { + for (String _key : getZoneGroups().keySet()) { + if (getZoneGroups().get(_key) != null) { + joiner.add(getZoneGroups().get(_key).toUrlQueryString(String.format(java.util.Locale.ROOT, "%szoneGroups%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/GroupPermissionId.java b/paas/src/main/java/org/thingsboard/client/model/GroupPermissionId.java index 8f16dcbc..6507f66f 100644 --- a/paas/src/main/java/org/thingsboard/client/model/GroupPermissionId.java +++ b/paas/src/main/java/org/thingsboard/client/model/GroupPermissionId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * GroupPermissionId */ @JsonPropertyOrder({ - GroupPermissionId.JSON_PROPERTY_ID, - GroupPermissionId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class GroupPermissionId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class GroupPermissionId extends EntityId { public GroupPermissionId() { } + @Override public GroupPermissionId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public GroupPermissionId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this GroupPermissionId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - GroupPermissionId groupPermissionId = (GroupPermissionId) o; - return Objects.equals(this.id, groupPermissionId.id) && - Objects.equals(this.entityType, groupPermissionId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GroupPermissionId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("GroupPermissionId", GroupPermissionId.class); + JSON.registerDiscriminator(GroupPermissionId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/HomeMenuItem.java b/paas/src/main/java/org/thingsboard/client/model/HomeMenuItem.java index d862e250..55c3feae 100644 --- a/paas/src/main/java/org/thingsboard/client/model/HomeMenuItem.java +++ b/paas/src/main/java/org/thingsboard/client/model/HomeMenuItem.java @@ -48,7 +48,6 @@ HomeMenuItem.JSON_PROPERTY_ID, HomeMenuItem.JSON_PROPERTY_NAME, HomeMenuItem.JSON_PROPERTY_ICON, - HomeMenuItem.JSON_PROPERTY_VISIBLE, HomeMenuItem.JSON_PROPERTY_PAGES, HomeMenuItem.JSON_PROPERTY_HOME_TYPE, HomeMenuItem.JSON_PROPERTY_DASHBOARD_ID, @@ -74,10 +73,6 @@ public class HomeMenuItem extends MenuItem { @javax.annotation.Nullable private String icon; - public static final String JSON_PROPERTY_VISIBLE = "visible"; - @javax.annotation.Nullable - private Boolean visible; - public static final String JSON_PROPERTY_PAGES = "pages"; @javax.annotation.Nullable private List pages = new ArrayList<>(); @@ -167,30 +162,6 @@ public void setIcon(@javax.annotation.Nullable String icon) { } - public HomeMenuItem visible(@javax.annotation.Nullable Boolean visible) { - this.visible = visible; - return this; - } - - /** - * Mark if menu item is visible for user - * @return visible - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getVisible() { - return visible; - } - - - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setVisible(@javax.annotation.Nullable Boolean visible) { - this.visible = visible; - } - - public HomeMenuItem pages(@javax.annotation.Nullable List pages) { this.pages = pages; return this; @@ -301,6 +272,12 @@ public HomeMenuItem type(@javax.annotation.Nonnull MenuItemType type) { return this; } + @Override + public HomeMenuItem visible(@javax.annotation.Nullable Boolean visible) { + this.setVisible(visible); + return this; + } + /** * Return true if this HomeMenuItem object is equal to o. */ @@ -316,7 +293,6 @@ public boolean equals(Object o) { return Objects.equals(this.id, homeMenuItem.id) && Objects.equals(this.name, homeMenuItem.name) && Objects.equals(this.icon, homeMenuItem.icon) && - Objects.equals(this.visible, homeMenuItem.visible) && Objects.equals(this.pages, homeMenuItem.pages) && Objects.equals(this.homeType, homeMenuItem.homeType) && Objects.equals(this.dashboardId, homeMenuItem.dashboardId) && @@ -326,7 +302,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, name, icon, visible, pages, homeType, dashboardId, hideDashboardToolbar, super.hashCode()); + return Objects.hash(id, name, icon, pages, homeType, dashboardId, hideDashboardToolbar, super.hashCode()); } @Override @@ -337,7 +313,6 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); - sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); sb.append(" pages: ").append(toIndentedString(pages)).append("\n"); sb.append(" homeType: ").append(toIndentedString(homeType)).append("\n"); sb.append(" dashboardId: ").append(toIndentedString(dashboardId)).append("\n"); diff --git a/paas/src/main/java/org/thingsboard/client/model/Integration.java b/paas/src/main/java/org/thingsboard/client/model/Integration.java index 5ea643ca..513468ea 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Integration.java +++ b/paas/src/main/java/org/thingsboard/client/model/Integration.java @@ -49,6 +49,7 @@ Integration.JSON_PROPERTY_DEBUG_SETTINGS, Integration.JSON_PROPERTY_ENABLED, Integration.JSON_PROPERTY_ALLOW_CREATE_DEVICES_OR_ASSETS, + Integration.JSON_PROPERTY_EDGE_TEMPLATE, Integration.JSON_PROPERTY_VERSION, Integration.JSON_PROPERTY_DEFAULT_CONVERTER_ID, Integration.JSON_PROPERTY_DOWNLINK_CONVERTER_ID, @@ -56,7 +57,6 @@ Integration.JSON_PROPERTY_SECRET, Integration.JSON_PROPERTY_CONFIGURATION, Integration.JSON_PROPERTY_ADDITIONAL_INFO, - Integration.JSON_PROPERTY_EDGE_TEMPLATE, Integration.JSON_PROPERTY_REMOTE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @@ -97,6 +97,10 @@ public class Integration { @javax.annotation.Nullable private Boolean allowCreateDevicesOrAssets; + public static final String JSON_PROPERTY_EDGE_TEMPLATE = "edgeTemplate"; + @javax.annotation.Nullable + private Boolean edgeTemplate; + public static final String JSON_PROPERTY_VERSION = "version"; @javax.annotation.Nullable private Long version; @@ -125,10 +129,6 @@ public class Integration { @javax.annotation.Nullable private com.fasterxml.jackson.databind.JsonNode additionalInfo; - public static final String JSON_PROPERTY_EDGE_TEMPLATE = "edgeTemplate"; - @javax.annotation.Nullable - private Boolean edgeTemplate; - public static final String JSON_PROPERTY_REMOTE = "remote"; @javax.annotation.Nullable private Boolean remote; @@ -344,6 +344,30 @@ public void setAllowCreateDevicesOrAssets(@javax.annotation.Nullable Boolean all } + public Integration edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; + return this; + } + + /** + * Boolean flag that specifies that is regular or edge template integration + * @return edgeTemplate + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEdgeTemplate() { + return edgeTemplate; + } + + + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; + } + + public Integration version(@javax.annotation.Nullable Long version) { this.version = version; return this; @@ -512,30 +536,6 @@ public void setAdditionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.d } - public Integration edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; - return this; - } - - /** - * Boolean flag that specifies that is regular or edge template integration - * @return edgeTemplate - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEdgeTemplate() { - return edgeTemplate; - } - - - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; - } - - public Integration remote(@javax.annotation.Nullable Boolean remote) { this.remote = remote; return this; @@ -581,6 +581,7 @@ public boolean equals(Object o) { Objects.equals(this.debugSettings, integration.debugSettings) && Objects.equals(this.enabled, integration.enabled) && Objects.equals(this.allowCreateDevicesOrAssets, integration.allowCreateDevicesOrAssets) && + Objects.equals(this.edgeTemplate, integration.edgeTemplate) && Objects.equals(this.version, integration.version) && Objects.equals(this.defaultConverterId, integration.defaultConverterId) && Objects.equals(this.downlinkConverterId, integration.downlinkConverterId) && @@ -588,13 +589,12 @@ public boolean equals(Object o) { Objects.equals(this.secret, integration.secret) && Objects.equals(this._configuration, integration._configuration) && Objects.equals(this.additionalInfo, integration.additionalInfo) && - Objects.equals(this.edgeTemplate, integration.edgeTemplate) && Objects.equals(this.remote, integration.remote); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, allowCreateDevicesOrAssets, version, defaultConverterId, downlinkConverterId, routingKey, secret, _configuration, additionalInfo, edgeTemplate, remote); + return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, allowCreateDevicesOrAssets, edgeTemplate, version, defaultConverterId, downlinkConverterId, routingKey, secret, _configuration, additionalInfo, remote); } @Override @@ -610,6 +610,7 @@ public String toString() { sb.append(" debugSettings: ").append(toIndentedString(debugSettings)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); sb.append(" allowCreateDevicesOrAssets: ").append(toIndentedString(allowCreateDevicesOrAssets)).append("\n"); + sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" defaultConverterId: ").append(toIndentedString(defaultConverterId)).append("\n"); sb.append(" downlinkConverterId: ").append(toIndentedString(downlinkConverterId)).append("\n"); @@ -617,7 +618,6 @@ public String toString() { sb.append(" secret: ").append(toIndentedString(secret)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); - sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append("}"); return sb.toString(); @@ -711,6 +711,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sallowCreateDevicesOrAssets%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAllowCreateDevicesOrAssets())))); } + // add `edgeTemplate` to the URL query string + if (getEdgeTemplate() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sedgeTemplate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEdgeTemplate())))); + } + // add `version` to the URL query string if (getVersion() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); @@ -746,11 +751,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sadditionalInfo%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInfo())))); } - // add `edgeTemplate` to the URL query string - if (getEdgeTemplate() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sedgeTemplate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEdgeTemplate())))); - } - // add `remote` to the URL query string if (getRemote() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); diff --git a/paas/src/main/java/org/thingsboard/client/model/IntegrationId.java b/paas/src/main/java/org/thingsboard/client/model/IntegrationId.java index e5c79693..1a5fbc28 100644 --- a/paas/src/main/java/org/thingsboard/client/model/IntegrationId.java +++ b/paas/src/main/java/org/thingsboard/client/model/IntegrationId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * IntegrationId */ @JsonPropertyOrder({ - IntegrationId.JSON_PROPERTY_ID, - IntegrationId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class IntegrationId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class IntegrationId extends EntityId { public IntegrationId() { } + @Override public IntegrationId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public IntegrationId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this IntegrationId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IntegrationId integrationId = (IntegrationId) o; - return Objects.equals(this.id, integrationId.id) && - Objects.equals(this.entityType, integrationId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IntegrationId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("IntegrationId", IntegrationId.class); + JSON.registerDiscriminator(IntegrationId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/IntegrationInfo.java b/paas/src/main/java/org/thingsboard/client/model/IntegrationInfo.java index 7f818e83..b542806f 100644 --- a/paas/src/main/java/org/thingsboard/client/model/IntegrationInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/IntegrationInfo.java @@ -52,10 +52,10 @@ IntegrationInfo.JSON_PROPERTY_DEBUG_SETTINGS, IntegrationInfo.JSON_PROPERTY_ENABLED, IntegrationInfo.JSON_PROPERTY_ALLOW_CREATE_DEVICES_OR_ASSETS, + IntegrationInfo.JSON_PROPERTY_EDGE_TEMPLATE, IntegrationInfo.JSON_PROPERTY_VERSION, IntegrationInfo.JSON_PROPERTY_STATUS, IntegrationInfo.JSON_PROPERTY_STATS, - IntegrationInfo.JSON_PROPERTY_EDGE_TEMPLATE, IntegrationInfo.JSON_PROPERTY_REMOTE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @@ -96,6 +96,10 @@ public class IntegrationInfo { @javax.annotation.Nullable private Boolean allowCreateDevicesOrAssets; + public static final String JSON_PROPERTY_EDGE_TEMPLATE = "edgeTemplate"; + @javax.annotation.Nullable + private Boolean edgeTemplate; + public static final String JSON_PROPERTY_VERSION = "version"; @javax.annotation.Nullable private Long version; @@ -107,10 +111,6 @@ public class IntegrationInfo { public static final String JSON_PROPERTY_STATS = "stats"; private JsonNullable stats = JsonNullable.of(null); - public static final String JSON_PROPERTY_EDGE_TEMPLATE = "edgeTemplate"; - @javax.annotation.Nullable - private Boolean edgeTemplate; - public static final String JSON_PROPERTY_REMOTE = "remote"; @javax.annotation.Nullable private Boolean remote; @@ -326,6 +326,30 @@ public void setAllowCreateDevicesOrAssets(@javax.annotation.Nullable Boolean all } + public IntegrationInfo edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; + return this; + } + + /** + * Boolean flag that specifies that is regular or edge template integration + * @return edgeTemplate + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEdgeTemplate() { + return edgeTemplate; + } + + + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; + } + + public IntegrationInfo version(@javax.annotation.Nullable Long version) { this.version = version; return this; @@ -406,30 +430,6 @@ public void setStats(@javax.annotation.Nullable Object stats) { } - public IntegrationInfo edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; - return this; - } - - /** - * Boolean flag that specifies that is regular or edge template integration - * @return edgeTemplate - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEdgeTemplate() { - return edgeTemplate; - } - - - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; - } - - public IntegrationInfo remote(@javax.annotation.Nullable Boolean remote) { this.remote = remote; return this; @@ -475,10 +475,10 @@ public boolean equals(Object o) { Objects.equals(this.debugSettings, integrationInfo.debugSettings) && Objects.equals(this.enabled, integrationInfo.enabled) && Objects.equals(this.allowCreateDevicesOrAssets, integrationInfo.allowCreateDevicesOrAssets) && + Objects.equals(this.edgeTemplate, integrationInfo.edgeTemplate) && Objects.equals(this.version, integrationInfo.version) && Objects.equals(this.status, integrationInfo.status) && equalsNullable(this.stats, integrationInfo.stats) && - Objects.equals(this.edgeTemplate, integrationInfo.edgeTemplate) && Objects.equals(this.remote, integrationInfo.remote); } @@ -488,7 +488,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, allowCreateDevicesOrAssets, version, status, hashCodeNullable(stats), edgeTemplate, remote); + return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, allowCreateDevicesOrAssets, edgeTemplate, version, status, hashCodeNullable(stats), remote); } private static int hashCodeNullable(JsonNullable a) { @@ -511,10 +511,10 @@ public String toString() { sb.append(" debugSettings: ").append(toIndentedString(debugSettings)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); sb.append(" allowCreateDevicesOrAssets: ").append(toIndentedString(allowCreateDevicesOrAssets)).append("\n"); + sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" stats: ").append(toIndentedString(stats)).append("\n"); - sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append("}"); return sb.toString(); @@ -608,6 +608,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sallowCreateDevicesOrAssets%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAllowCreateDevicesOrAssets())))); } + // add `edgeTemplate` to the URL query string + if (getEdgeTemplate() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sedgeTemplate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEdgeTemplate())))); + } + // add `version` to the URL query string if (getVersion() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); @@ -623,11 +628,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstats%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStats())))); } - // add `edgeTemplate` to the URL query string - if (getEdgeTemplate() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sedgeTemplate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEdgeTemplate())))); - } - // add `remote` to the URL query string if (getRemote() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); diff --git a/paas/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventRecipientsConfig.java index b9c5d542..7a5c61f7 100644 --- a/paas/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventRecipientsConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public IntegrationLifecycleEventRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public IntegrationLifecycleEventRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/paas/src/main/java/org/thingsboard/client/model/JobId.java b/paas/src/main/java/org/thingsboard/client/model/JobId.java index 323bed6e..93be4634 100644 --- a/paas/src/main/java/org/thingsboard/client/model/JobId.java +++ b/paas/src/main/java/org/thingsboard/client/model/JobId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * JobId */ @JsonPropertyOrder({ - JobId.JSON_PROPERTY_ID, - JobId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class JobId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class JobId extends EntityId { public JobId() { } + @Override public JobId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public JobId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this JobId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - JobId jobId = (JobId) o; - return Objects.equals(this.id, jobId.id) && - Objects.equals(this.entityType, jobId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class JobId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("JobId", JobId.class); + JSON.registerDiscriminator(JobId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/MicrosoftTeamsNotificationTargetConfig.java b/paas/src/main/java/org/thingsboard/client/model/MicrosoftTeamsNotificationTargetConfig.java index bcb0bd69..8b371354 100644 --- a/paas/src/main/java/org/thingsboard/client/model/MicrosoftTeamsNotificationTargetConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/MicrosoftTeamsNotificationTargetConfig.java @@ -47,11 +47,11 @@ MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_WEBHOOK_URL, MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_CHANNEL_NAME, MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_USE_OLD_API, - MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_ID, - MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_TITLE, MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_EMAIL, MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_FIRST_NAME, - MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_LAST_NAME + MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_ID, + MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_LAST_NAME, + MicrosoftTeamsNotificationTargetConfig.JSON_PROPERTY_TITLE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -73,13 +73,6 @@ public class MicrosoftTeamsNotificationTargetConfig extends NotificationTargetCo @javax.annotation.Nullable private Boolean useOldApi; - public static final String JSON_PROPERTY_ID = "id"; - private JsonNullable id = JsonNullable.of(null); - - public static final String JSON_PROPERTY_TITLE = "title"; - @javax.annotation.Nullable - private String title; - public static final String JSON_PROPERTY_EMAIL = "email"; @javax.annotation.Nullable private String email; @@ -88,10 +81,17 @@ public class MicrosoftTeamsNotificationTargetConfig extends NotificationTargetCo @javax.annotation.Nullable private String firstName; + public static final String JSON_PROPERTY_ID = "id"; + private JsonNullable id = JsonNullable.of(null); + public static final String JSON_PROPERTY_LAST_NAME = "lastName"; @javax.annotation.Nullable private String lastName; + public static final String JSON_PROPERTY_TITLE = "title"; + @javax.annotation.Nullable + private String title; + public MicrosoftTeamsNotificationTargetConfig() { } @@ -167,62 +167,6 @@ public void setUseOldApi(@javax.annotation.Nullable Boolean useOldApi) { } - public MicrosoftTeamsNotificationTargetConfig id(@javax.annotation.Nullable Object id) { - this.id = JsonNullable.of(id); - return this; - } - - /** - * Get id - * @return id - */ - @javax.annotation.Nullable - @JsonIgnore - public Object getId() { - return id.orElse(null); - } - - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getId_JsonNullable() { - return id; - } - - @JsonProperty(JSON_PROPERTY_ID) - public void setId_JsonNullable(JsonNullable id) { - this.id = id; - } - - public void setId(@javax.annotation.Nullable Object id) { - this.id = JsonNullable.of(id); - } - - - public MicrosoftTeamsNotificationTargetConfig title(@javax.annotation.Nullable String title) { - this.title = title; - return this; - } - - /** - * Get title - * @return title - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(@javax.annotation.Nullable String title) { - this.title = title; - } - - public MicrosoftTeamsNotificationTargetConfig email(@javax.annotation.Nullable String email) { this.email = email; return this; @@ -271,6 +215,38 @@ public void setFirstName(@javax.annotation.Nullable String firstName) { } + public MicrosoftTeamsNotificationTargetConfig id(@javax.annotation.Nullable Object id) { + this.id = JsonNullable.of(id); + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonIgnore + public Object getId() { + return id.orElse(null); + } + + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getId_JsonNullable() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + public void setId_JsonNullable(JsonNullable id) { + this.id = id; + } + + public void setId(@javax.annotation.Nullable Object id) { + this.id = JsonNullable.of(id); + } + + public MicrosoftTeamsNotificationTargetConfig lastName(@javax.annotation.Nullable String lastName) { this.lastName = lastName; return this; @@ -295,6 +271,30 @@ public void setLastName(@javax.annotation.Nullable String lastName) { } + public MicrosoftTeamsNotificationTargetConfig title(@javax.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * Get title + * @return title + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } + + + @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTitle(@javax.annotation.Nullable String title) { + this.title = title; + } + + @Override public MicrosoftTeamsNotificationTargetConfig description(@javax.annotation.Nullable String description) { this.setDescription(description); @@ -322,11 +322,11 @@ public boolean equals(Object o) { return Objects.equals(this.webhookUrl, microsoftTeamsNotificationTargetConfig.webhookUrl) && Objects.equals(this.channelName, microsoftTeamsNotificationTargetConfig.channelName) && Objects.equals(this.useOldApi, microsoftTeamsNotificationTargetConfig.useOldApi) && - equalsNullable(this.id, microsoftTeamsNotificationTargetConfig.id) && - Objects.equals(this.title, microsoftTeamsNotificationTargetConfig.title) && Objects.equals(this.email, microsoftTeamsNotificationTargetConfig.email) && Objects.equals(this.firstName, microsoftTeamsNotificationTargetConfig.firstName) && + equalsNullable(this.id, microsoftTeamsNotificationTargetConfig.id) && Objects.equals(this.lastName, microsoftTeamsNotificationTargetConfig.lastName) && + Objects.equals(this.title, microsoftTeamsNotificationTargetConfig.title) && super.equals(o); } @@ -336,7 +336,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(webhookUrl, channelName, useOldApi, hashCodeNullable(id), title, email, firstName, lastName, super.hashCode()); + return Objects.hash(webhookUrl, channelName, useOldApi, email, firstName, hashCodeNullable(id), lastName, title, super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -354,11 +354,11 @@ public String toString() { sb.append(" webhookUrl: ").append(toIndentedString(webhookUrl)).append("\n"); sb.append(" channelName: ").append(toIndentedString(channelName)).append("\n"); sb.append(" useOldApi: ").append(toIndentedString(useOldApi)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append("}"); return sb.toString(); } @@ -431,16 +431,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%suseOldApi%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUseOldApi())))); } - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - - // add `title` to the URL query string - if (getTitle() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); - } - // add `email` to the URL query string if (getEmail() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%semail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmail())))); @@ -451,11 +441,21 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sfirstName%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFirstName())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + // add `lastName` to the URL query string if (getLastName() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%slastName%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLastName())))); } + // add `title` to the URL query string + if (getTitle() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); + } + return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java b/paas/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java index f3f8ed8d..9b4735e5 100644 --- a/paas/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java +++ b/paas/src/main/java/org/thingsboard/client/model/MobileAppBundleId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * MobileAppBundleId */ @JsonPropertyOrder({ - MobileAppBundleId.JSON_PROPERTY_ID, - MobileAppBundleId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class MobileAppBundleId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class MobileAppBundleId extends EntityId { public MobileAppBundleId() { } + @Override public MobileAppBundleId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public MobileAppBundleId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * Get entityType - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this MobileAppBundleId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MobileAppBundleId mobileAppBundleId = (MobileAppBundleId) o; - return Objects.equals(this.id, mobileAppBundleId.id) && - Objects.equals(this.entityType, mobileAppBundleId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MobileAppBundleId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("MobileAppBundleId", MobileAppBundleId.class); + JSON.registerDiscriminator(MobileAppBundleId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/MobileAppId.java b/paas/src/main/java/org/thingsboard/client/model/MobileAppId.java index 1a70f01b..c4325164 100644 --- a/paas/src/main/java/org/thingsboard/client/model/MobileAppId.java +++ b/paas/src/main/java/org/thingsboard/client/model/MobileAppId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * MobileAppId */ @JsonPropertyOrder({ - MobileAppId.JSON_PROPERTY_ID, - MobileAppId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class MobileAppId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class MobileAppId extends EntityId { public MobileAppId() { } + @Override public MobileAppId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public MobileAppId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * Get entityType - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this MobileAppId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MobileAppId mobileAppId = (MobileAppId) o; - return Objects.equals(this.id, mobileAppId.id) && - Objects.equals(this.entityType, mobileAppId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MobileAppId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("MobileAppId", MobileAppId.class); + JSON.registerDiscriminator(MobileAppId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java b/paas/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java index 79df485c..bdfe791f 100644 --- a/paas/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java +++ b/paas/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java @@ -52,22 +52,9 @@ * MobileSelfRegistrationParams */ @JsonPropertyOrder({ - MobileSelfRegistrationParams.JSON_PROPERTY_ENABLED, - MobileSelfRegistrationParams.JSON_PROPERTY_TITLE, - MobileSelfRegistrationParams.JSON_PROPERTY_CAPTCHA, - MobileSelfRegistrationParams.JSON_PROPERTY_SIGN_UP_FIELDS, - MobileSelfRegistrationParams.JSON_PROPERTY_SHOW_PRIVACY_POLICY, - MobileSelfRegistrationParams.JSON_PROPERTY_SHOW_TERMS_OF_USE, - MobileSelfRegistrationParams.JSON_PROPERTY_NOTIFICATION_RECIPIENT, - MobileSelfRegistrationParams.JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, - MobileSelfRegistrationParams.JSON_PROPERTY_CUSTOMER_GROUP_ID, - MobileSelfRegistrationParams.JSON_PROPERTY_PERMISSIONS, - MobileSelfRegistrationParams.JSON_PROPERTY_DEFAULT_DASHBOARD, - MobileSelfRegistrationParams.JSON_PROPERTY_HOME_DASHBOARD, - MobileSelfRegistrationParams.JSON_PROPERTY_CUSTOM_MENU_ID, MobileSelfRegistrationParams.JSON_PROPERTY_PRIVACY_POLICY, - MobileSelfRegistrationParams.JSON_PROPERTY_TERMS_OF_USE, - MobileSelfRegistrationParams.JSON_PROPERTY_REDIRECT + MobileSelfRegistrationParams.JSON_PROPERTY_REDIRECT, + MobileSelfRegistrationParams.JSON_PROPERTY_TERMS_OF_USE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -77,476 +64,162 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) public class MobileSelfRegistrationParams extends SelfRegistrationParams { - public static final String JSON_PROPERTY_ENABLED = "enabled"; - @javax.annotation.Nullable - private Boolean enabled; - - public static final String JSON_PROPERTY_TITLE = "title"; - @javax.annotation.Nonnull - private String title; - - public static final String JSON_PROPERTY_CAPTCHA = "captcha"; - @javax.annotation.Nonnull - private CaptchaParams captcha; - - public static final String JSON_PROPERTY_SIGN_UP_FIELDS = "signUpFields"; - @javax.annotation.Nonnull - private List signUpFields = new ArrayList<>(); - - public static final String JSON_PROPERTY_SHOW_PRIVACY_POLICY = "showPrivacyPolicy"; - @javax.annotation.Nullable - private Boolean showPrivacyPolicy; - - public static final String JSON_PROPERTY_SHOW_TERMS_OF_USE = "showTermsOfUse"; - @javax.annotation.Nullable - private Boolean showTermsOfUse; - - public static final String JSON_PROPERTY_NOTIFICATION_RECIPIENT = "notificationRecipient"; - @javax.annotation.Nullable - private NotificationTargetId notificationRecipient; - - public static final String JSON_PROPERTY_CUSTOMER_TITLE_PREFIX = "customerTitlePrefix"; - @javax.annotation.Nullable - private String customerTitlePrefix; - - public static final String JSON_PROPERTY_CUSTOMER_GROUP_ID = "customerGroupId"; - @javax.annotation.Nullable - private EntityGroupId customerGroupId; - - public static final String JSON_PROPERTY_PERMISSIONS = "permissions"; - @javax.annotation.Nonnull - private List permissions = new ArrayList<>(); - - public static final String JSON_PROPERTY_DEFAULT_DASHBOARD = "defaultDashboard"; - @javax.annotation.Nullable - private DefaultDashboardParams defaultDashboard; - - public static final String JSON_PROPERTY_HOME_DASHBOARD = "homeDashboard"; - @javax.annotation.Nullable - private HomeDashboardParams homeDashboard; - - public static final String JSON_PROPERTY_CUSTOM_MENU_ID = "customMenuId"; - @javax.annotation.Nullable - private CustomMenuId customMenuId; - public static final String JSON_PROPERTY_PRIVACY_POLICY = "privacyPolicy"; @javax.annotation.Nullable private String privacyPolicy; - public static final String JSON_PROPERTY_TERMS_OF_USE = "termsOfUse"; - @javax.annotation.Nullable - private String termsOfUse; - public static final String JSON_PROPERTY_REDIRECT = "redirect"; @javax.annotation.Nonnull private MobileRedirectParams redirect; + public static final String JSON_PROPERTY_TERMS_OF_USE = "termsOfUse"; + @javax.annotation.Nullable + private String termsOfUse; + public MobileSelfRegistrationParams() { } - public MobileSelfRegistrationParams enabled(@javax.annotation.Nullable Boolean enabled) { - this.enabled = enabled; + public MobileSelfRegistrationParams privacyPolicy(@javax.annotation.Nullable String privacyPolicy) { + this.privacyPolicy = privacyPolicy; return this; } /** - * Indicates if self-registration is allowed via sign-up form - * @return enabled + * Privacy policy text. Supports HTML. + * @return privacyPolicy */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_PRIVACY_POLICY, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEnabled() { - return enabled; + public String getPrivacyPolicy() { + return privacyPolicy; } - @JsonProperty(value = JSON_PROPERTY_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_PRIVACY_POLICY, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEnabled(@javax.annotation.Nullable Boolean enabled) { - this.enabled = enabled; - } - - - public MobileSelfRegistrationParams title(@javax.annotation.Nonnull String title) { - this.title = title; - return this; - } - - /** - * The text message to appear on login form - * @return title - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_TITLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTitle() { - return title; - } - - - @JsonProperty(value = JSON_PROPERTY_TITLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTitle(@javax.annotation.Nonnull String title) { - this.title = title; - } - - - public MobileSelfRegistrationParams captcha(@javax.annotation.Nonnull CaptchaParams captcha) { - this.captcha = captcha; - return this; - } - - /** - * Captcha site key for 'I'm not a robot' validation - * @return captcha - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CaptchaParams getCaptcha() { - return captcha; - } - - - @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCaptcha(@javax.annotation.Nonnull CaptchaParams captcha) { - this.captcha = captcha; + public void setPrivacyPolicy(@javax.annotation.Nullable String privacyPolicy) { + this.privacyPolicy = privacyPolicy; } - public MobileSelfRegistrationParams signUpFields(@javax.annotation.Nonnull List signUpFields) { - this.signUpFields = signUpFields; - return this; - } - - public MobileSelfRegistrationParams addSignUpFieldsItem(SignUpField signUpFieldsItem) { - if (this.signUpFields == null) { - this.signUpFields = new ArrayList<>(); - } - this.signUpFields.add(signUpFieldsItem); + public MobileSelfRegistrationParams redirect(@javax.annotation.Nonnull MobileRedirectParams redirect) { + this.redirect = redirect; return this; } /** - * List of sign-up form fields - * @return signUpFields + * Mobile redirect params. + * @return redirect */ @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_SIGN_UP_FIELDS, required = true) + @JsonProperty(value = JSON_PROPERTY_REDIRECT, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSignUpFields() { - return signUpFields; + public MobileRedirectParams getRedirect() { + return redirect; } - @JsonProperty(value = JSON_PROPERTY_SIGN_UP_FIELDS, required = true) + @JsonProperty(value = JSON_PROPERTY_REDIRECT, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignUpFields(@javax.annotation.Nonnull List signUpFields) { - this.signUpFields = signUpFields; + public void setRedirect(@javax.annotation.Nonnull MobileRedirectParams redirect) { + this.redirect = redirect; } - public MobileSelfRegistrationParams showPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { - this.showPrivacyPolicy = showPrivacyPolicy; + public MobileSelfRegistrationParams termsOfUse(@javax.annotation.Nullable String termsOfUse) { + this.termsOfUse = termsOfUse; return this; } /** - * Show or hide 'Privacy Policy' - * @return showPrivacyPolicy + * Terms of User text. Supports HTML. + * @return termsOfUse */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SHOW_PRIVACY_POLICY, required = false) + @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowPrivacyPolicy() { - return showPrivacyPolicy; + public String getTermsOfUse() { + return termsOfUse; } - @JsonProperty(value = JSON_PROPERTY_SHOW_PRIVACY_POLICY, required = false) + @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { - this.showPrivacyPolicy = showPrivacyPolicy; + public void setTermsOfUse(@javax.annotation.Nullable String termsOfUse) { + this.termsOfUse = termsOfUse; } - public MobileSelfRegistrationParams showTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { - this.showTermsOfUse = showTermsOfUse; + @Override + public MobileSelfRegistrationParams type(@javax.annotation.Nonnull SelfRegistrationType type) { + this.setType(type); return this; } - /** - * Show or hide 'Terms of Use' - * @return showTermsOfUse - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SHOW_TERMS_OF_USE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowTermsOfUse() { - return showTermsOfUse; + @Override + public MobileSelfRegistrationParams enabled(@javax.annotation.Nullable Boolean enabled) { + this.setEnabled(enabled); + return this; } - - @JsonProperty(value = JSON_PROPERTY_SHOW_TERMS_OF_USE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { - this.showTermsOfUse = showTermsOfUse; + @Override + public MobileSelfRegistrationParams captcha(@javax.annotation.Nullable CaptchaParams captcha) { + this.setCaptcha(captcha); + return this; } - + @Override public MobileSelfRegistrationParams notificationRecipient(@javax.annotation.Nullable NotificationTargetId notificationRecipient) { - this.notificationRecipient = notificationRecipient; + this.setNotificationRecipient(notificationRecipient); return this; } - /** - * Recipient to use for notifications when new user self-registered. - * @return notificationRecipient - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_RECIPIENT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotificationTargetId getNotificationRecipient() { - return notificationRecipient; - } - - - @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_RECIPIENT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNotificationRecipient(@javax.annotation.Nullable NotificationTargetId notificationRecipient) { - this.notificationRecipient = notificationRecipient; - } - - - public MobileSelfRegistrationParams customerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { - this.customerTitlePrefix = customerTitlePrefix; + @Override + public MobileSelfRegistrationParams signUpFields(@javax.annotation.Nullable List signUpFields) { + this.setSignUpFields(signUpFields); return this; } - /** - * Prefix to add to created customer - * @return customerTitlePrefix - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCustomerTitlePrefix() { - return customerTitlePrefix; - } - - - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { - this.customerTitlePrefix = customerTitlePrefix; - } - - - public MobileSelfRegistrationParams customerGroupId(@javax.annotation.Nullable EntityGroupId customerGroupId) { - this.customerGroupId = customerGroupId; + @Override + public MobileSelfRegistrationParams customerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { + this.setCustomerTitlePrefix(customerTitlePrefix); return this; } - /** - * Id of the customer group customer wil be added to. - * @return customerGroupId - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_GROUP_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EntityGroupId getCustomerGroupId() { - return customerGroupId; - } - - - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_GROUP_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerGroupId(@javax.annotation.Nullable EntityGroupId customerGroupId) { - this.customerGroupId = customerGroupId; - } - - - public MobileSelfRegistrationParams permissions(@javax.annotation.Nonnull List permissions) { - this.permissions = permissions; + @Override + public MobileSelfRegistrationParams showPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { + this.setShowPrivacyPolicy(showPrivacyPolicy); return this; } - public MobileSelfRegistrationParams addPermissionsItem(GroupPermission permissionsItem) { - if (this.permissions == null) { - this.permissions = new ArrayList<>(); - } - this.permissions.add(permissionsItem); + @Override + public MobileSelfRegistrationParams showTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { + this.setShowTermsOfUse(showTermsOfUse); return this; } - /** - * Group Permissions to assign for the new customer user. - * @return permissions - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_PERMISSIONS, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getPermissions() { - return permissions; - } - - - @JsonProperty(value = JSON_PROPERTY_PERMISSIONS, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setPermissions(@javax.annotation.Nonnull List permissions) { - this.permissions = permissions; - } - - + @Override public MobileSelfRegistrationParams defaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { - this.defaultDashboard = defaultDashboard; + this.setDefaultDashboard(defaultDashboard); return this; } - /** - * Default dashboard params - * @return defaultDashboard - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DEFAULT_DASHBOARD, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DefaultDashboardParams getDefaultDashboard() { - return defaultDashboard; - } - - - @JsonProperty(value = JSON_PROPERTY_DEFAULT_DASHBOARD, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDefaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { - this.defaultDashboard = defaultDashboard; - } - - + @Override public MobileSelfRegistrationParams homeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { - this.homeDashboard = homeDashboard; - return this; - } - - /** - * Home dashboard params - * @return homeDashboard - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_HOME_DASHBOARD, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HomeDashboardParams getHomeDashboard() { - return homeDashboard; - } - - - @JsonProperty(value = JSON_PROPERTY_HOME_DASHBOARD, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHomeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { - this.homeDashboard = homeDashboard; - } - - - public MobileSelfRegistrationParams customMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { - this.customMenuId = customMenuId; + this.setHomeDashboard(homeDashboard); return this; } - /** - * Custom menu id - * @return customMenuId - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOM_MENU_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CustomMenuId getCustomMenuId() { - return customMenuId; - } - - - @JsonProperty(value = JSON_PROPERTY_CUSTOM_MENU_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { - this.customMenuId = customMenuId; - } - - - public MobileSelfRegistrationParams privacyPolicy(@javax.annotation.Nullable String privacyPolicy) { - this.privacyPolicy = privacyPolicy; - return this; - } - - /** - * Privacy policy text. Supports HTML. - * @return privacyPolicy - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PRIVACY_POLICY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrivacyPolicy() { - return privacyPolicy; - } - - - @JsonProperty(value = JSON_PROPERTY_PRIVACY_POLICY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrivacyPolicy(@javax.annotation.Nullable String privacyPolicy) { - this.privacyPolicy = privacyPolicy; - } - - - public MobileSelfRegistrationParams termsOfUse(@javax.annotation.Nullable String termsOfUse) { - this.termsOfUse = termsOfUse; - return this; - } - - /** - * Terms of User text. Supports HTML. - * @return termsOfUse - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTermsOfUse() { - return termsOfUse; - } - - - @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTermsOfUse(@javax.annotation.Nullable String termsOfUse) { - this.termsOfUse = termsOfUse; - } - - - public MobileSelfRegistrationParams redirect(@javax.annotation.Nonnull MobileRedirectParams redirect) { - this.redirect = redirect; + @Override + public MobileSelfRegistrationParams customerGroupId(@javax.annotation.Nullable EntityGroupId customerGroupId) { + this.setCustomerGroupId(customerGroupId); return this; } - /** - * Mobile redirect params. - * @return redirect - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_REDIRECT, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MobileRedirectParams getRedirect() { - return redirect; - } - - - @JsonProperty(value = JSON_PROPERTY_REDIRECT, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRedirect(@javax.annotation.Nonnull MobileRedirectParams redirect) { - this.redirect = redirect; - } - - @Override - public MobileSelfRegistrationParams type(@javax.annotation.Nonnull SelfRegistrationType type) { - this.setType(type); + public MobileSelfRegistrationParams customMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { + this.setCustomMenuId(customMenuId); return this; } @@ -562,28 +235,15 @@ public boolean equals(Object o) { return false; } MobileSelfRegistrationParams mobileSelfRegistrationParams = (MobileSelfRegistrationParams) o; - return Objects.equals(this.enabled, mobileSelfRegistrationParams.enabled) && - Objects.equals(this.title, mobileSelfRegistrationParams.title) && - Objects.equals(this.captcha, mobileSelfRegistrationParams.captcha) && - Objects.equals(this.signUpFields, mobileSelfRegistrationParams.signUpFields) && - Objects.equals(this.showPrivacyPolicy, mobileSelfRegistrationParams.showPrivacyPolicy) && - Objects.equals(this.showTermsOfUse, mobileSelfRegistrationParams.showTermsOfUse) && - Objects.equals(this.notificationRecipient, mobileSelfRegistrationParams.notificationRecipient) && - Objects.equals(this.customerTitlePrefix, mobileSelfRegistrationParams.customerTitlePrefix) && - Objects.equals(this.customerGroupId, mobileSelfRegistrationParams.customerGroupId) && - Objects.equals(this.permissions, mobileSelfRegistrationParams.permissions) && - Objects.equals(this.defaultDashboard, mobileSelfRegistrationParams.defaultDashboard) && - Objects.equals(this.homeDashboard, mobileSelfRegistrationParams.homeDashboard) && - Objects.equals(this.customMenuId, mobileSelfRegistrationParams.customMenuId) && - Objects.equals(this.privacyPolicy, mobileSelfRegistrationParams.privacyPolicy) && - Objects.equals(this.termsOfUse, mobileSelfRegistrationParams.termsOfUse) && + return Objects.equals(this.privacyPolicy, mobileSelfRegistrationParams.privacyPolicy) && Objects.equals(this.redirect, mobileSelfRegistrationParams.redirect) && + Objects.equals(this.termsOfUse, mobileSelfRegistrationParams.termsOfUse) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(enabled, title, captcha, signUpFields, showPrivacyPolicy, showTermsOfUse, notificationRecipient, customerTitlePrefix, customerGroupId, permissions, defaultDashboard, homeDashboard, customMenuId, privacyPolicy, termsOfUse, redirect, super.hashCode()); + return Objects.hash(privacyPolicy, redirect, termsOfUse, super.hashCode()); } @Override @@ -591,22 +251,9 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MobileSelfRegistrationParams {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" captcha: ").append(toIndentedString(captcha)).append("\n"); - sb.append(" signUpFields: ").append(toIndentedString(signUpFields)).append("\n"); - sb.append(" showPrivacyPolicy: ").append(toIndentedString(showPrivacyPolicy)).append("\n"); - sb.append(" showTermsOfUse: ").append(toIndentedString(showTermsOfUse)).append("\n"); - sb.append(" notificationRecipient: ").append(toIndentedString(notificationRecipient)).append("\n"); - sb.append(" customerTitlePrefix: ").append(toIndentedString(customerTitlePrefix)).append("\n"); - sb.append(" customerGroupId: ").append(toIndentedString(customerGroupId)).append("\n"); - sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); - sb.append(" defaultDashboard: ").append(toIndentedString(defaultDashboard)).append("\n"); - sb.append(" homeDashboard: ").append(toIndentedString(homeDashboard)).append("\n"); - sb.append(" customMenuId: ").append(toIndentedString(customMenuId)).append("\n"); sb.append(" privacyPolicy: ").append(toIndentedString(privacyPolicy)).append("\n"); - sb.append(" termsOfUse: ").append(toIndentedString(termsOfUse)).append("\n"); sb.append(" redirect: ").append(toIndentedString(redirect)).append("\n"); + sb.append(" termsOfUse: ").append(toIndentedString(termsOfUse)).append("\n"); sb.append("}"); return sb.toString(); } @@ -654,29 +301,14 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `permissions` to the URL query string - if (getPermissions() != null) { - for (int i = 0; i < getPermissions().size(); i++) { - if (getPermissions().get(i) != null) { - joiner.add(getPermissions().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%spermissions%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - // add `type` to the URL query string if (getType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); } - // add `showPrivacyPolicy` to the URL query string - if (getShowPrivacyPolicy() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sshowPrivacyPolicy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowPrivacyPolicy())))); - } - - // add `showTermsOfUse` to the URL query string - if (getShowTermsOfUse() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sshowTermsOfUse%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowTermsOfUse())))); + // add `enabled` to the URL query string + if (getEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); } // add `title` to the URL query string @@ -684,14 +316,19 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); } - // add `enabled` to the URL query string - if (getEnabled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); + // add `captcha` to the URL query string + if (getCaptcha() != null) { + joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); } - // add `homeDashboard` to the URL query string - if (getHomeDashboard() != null) { - joiner.add(getHomeDashboard().toUrlQueryString(prefix + "homeDashboard" + suffix)); + // add `permissions` to the URL query string + if (getPermissions() != null) { + for (int i = 0; i < getPermissions().size(); i++) { + if (getPermissions().get(i) != null) { + joiner.add(getPermissions().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%spermissions%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } } // add `notificationRecipient` to the URL query string @@ -699,11 +336,6 @@ public String toUrlQueryString(String prefix) { joiner.add(getNotificationRecipient().toUrlQueryString(prefix + "notificationRecipient" + suffix)); } - // add `captcha` to the URL query string - if (getCaptcha() != null) { - joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); - } - // add `signUpFields` to the URL query string if (getSignUpFields() != null) { for (int i = 0; i < getSignUpFields().size(); i++) { @@ -714,19 +346,29 @@ public String toUrlQueryString(String prefix) { } } - // add `defaultDashboard` to the URL query string - if (getDefaultDashboard() != null) { - joiner.add(getDefaultDashboard().toUrlQueryString(prefix + "defaultDashboard" + suffix)); - } - // add `customerTitlePrefix` to the URL query string if (getCustomerTitlePrefix() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%scustomerTitlePrefix%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCustomerTitlePrefix())))); } - // add `customMenuId` to the URL query string - if (getCustomMenuId() != null) { - joiner.add(getCustomMenuId().toUrlQueryString(prefix + "customMenuId" + suffix)); + // add `showPrivacyPolicy` to the URL query string + if (getShowPrivacyPolicy() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sshowPrivacyPolicy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowPrivacyPolicy())))); + } + + // add `showTermsOfUse` to the URL query string + if (getShowTermsOfUse() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sshowTermsOfUse%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowTermsOfUse())))); + } + + // add `defaultDashboard` to the URL query string + if (getDefaultDashboard() != null) { + joiner.add(getDefaultDashboard().toUrlQueryString(prefix + "defaultDashboard" + suffix)); + } + + // add `homeDashboard` to the URL query string + if (getHomeDashboard() != null) { + joiner.add(getHomeDashboard().toUrlQueryString(prefix + "homeDashboard" + suffix)); } // add `customerGroupId` to the URL query string @@ -734,21 +376,26 @@ public String toUrlQueryString(String prefix) { joiner.add(getCustomerGroupId().toUrlQueryString(prefix + "customerGroupId" + suffix)); } + // add `customMenuId` to the URL query string + if (getCustomMenuId() != null) { + joiner.add(getCustomMenuId().toUrlQueryString(prefix + "customMenuId" + suffix)); + } + // add `privacyPolicy` to the URL query string if (getPrivacyPolicy() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sprivacyPolicy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrivacyPolicy())))); } - // add `termsOfUse` to the URL query string - if (getTermsOfUse() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stermsOfUse%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTermsOfUse())))); - } - // add `redirect` to the URL query string if (getRedirect() != null) { joiner.add(getRedirect().toUrlQueryString(prefix + "redirect" + suffix)); } + // add `termsOfUse` to the URL query string + if (getTermsOfUse() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stermsOfUse%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTermsOfUse())))); + } + return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java index 97cc594a..9268f516 100644 --- a/paas/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public NewPlatformVersionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public NewPlatformVersionRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/paas/src/main/java/org/thingsboard/client/model/NotificationId.java b/paas/src/main/java/org/thingsboard/client/model/NotificationId.java index 21266446..453f31fb 100644 --- a/paas/src/main/java/org/thingsboard/client/model/NotificationId.java +++ b/paas/src/main/java/org/thingsboard/client/model/NotificationId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * NotificationId */ @JsonPropertyOrder({ - NotificationId.JSON_PROPERTY_ID, - NotificationId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class NotificationId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class NotificationId extends EntityId { public NotificationId() { } + @Override public NotificationId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public NotificationId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this NotificationId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotificationId notificationId = (NotificationId) o; - return Objects.equals(this.id, notificationId.id) && - Objects.equals(this.entityType, notificationId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationId", NotificationId.class); + JSON.registerDiscriminator(NotificationId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/NotificationRequestId.java b/paas/src/main/java/org/thingsboard/client/model/NotificationRequestId.java index 353f62f2..e2706589 100644 --- a/paas/src/main/java/org/thingsboard/client/model/NotificationRequestId.java +++ b/paas/src/main/java/org/thingsboard/client/model/NotificationRequestId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * NotificationRequestId */ @JsonPropertyOrder({ - NotificationRequestId.JSON_PROPERTY_ID, - NotificationRequestId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class NotificationRequestId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class NotificationRequestId extends EntityId { public NotificationRequestId() { } + @Override public NotificationRequestId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public NotificationRequestId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this NotificationRequestId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotificationRequestId notificationRequestId = (NotificationRequestId) o; - return Objects.equals(this.id, notificationRequestId.id) && - Objects.equals(this.entityType, notificationRequestId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationRequestId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationRequestId", NotificationRequestId.class); + JSON.registerDiscriminator(NotificationRequestId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/NotificationRuleId.java b/paas/src/main/java/org/thingsboard/client/model/NotificationRuleId.java index 04c7333e..c9f1bb8e 100644 --- a/paas/src/main/java/org/thingsboard/client/model/NotificationRuleId.java +++ b/paas/src/main/java/org/thingsboard/client/model/NotificationRuleId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * NotificationRuleId */ @JsonPropertyOrder({ - NotificationRuleId.JSON_PROPERTY_ID, - NotificationRuleId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class NotificationRuleId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class NotificationRuleId extends EntityId { public NotificationRuleId() { } + @Override public NotificationRuleId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public NotificationRuleId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this NotificationRuleId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotificationRuleId notificationRuleId = (NotificationRuleId) o; - return Objects.equals(this.id, notificationRuleId.id) && - Objects.equals(this.entityType, notificationRuleId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationRuleId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationRuleId", NotificationRuleId.class); + JSON.registerDiscriminator(NotificationRuleId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java index cff3b700..d0d30ecf 100644 --- a/paas/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java @@ -68,13 +68,13 @@ public class NotificationRuleRecipientsConfig { public static final String JSON_PROPERTY_TRIGGER_TYPE = "triggerType"; - @javax.annotation.Nonnull + @javax.annotation.Nullable private NotificationRuleTriggerType triggerType; public NotificationRuleRecipientsConfig() { } - public NotificationRuleRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public NotificationRuleRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.triggerType = triggerType; return this; } @@ -83,17 +83,17 @@ public NotificationRuleRecipientsConfig triggerType(@javax.annotation.Nonnull No * Get triggerType * @return triggerType */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public NotificationRuleTriggerType getTriggerType() { return triggerType; } - @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTriggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTriggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.triggerType = triggerType; } diff --git a/paas/src/main/java/org/thingsboard/client/model/NotificationTargetId.java b/paas/src/main/java/org/thingsboard/client/model/NotificationTargetId.java index ffa24e3c..3a6d606a 100644 --- a/paas/src/main/java/org/thingsboard/client/model/NotificationTargetId.java +++ b/paas/src/main/java/org/thingsboard/client/model/NotificationTargetId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * NotificationTargetId */ @JsonPropertyOrder({ - NotificationTargetId.JSON_PROPERTY_ID, - NotificationTargetId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class NotificationTargetId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class NotificationTargetId extends EntityId { public NotificationTargetId() { } + @Override public NotificationTargetId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public NotificationTargetId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this NotificationTargetId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotificationTargetId notificationTargetId = (NotificationTargetId) o; - return Objects.equals(this.id, notificationTargetId.id) && - Objects.equals(this.entityType, notificationTargetId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationTargetId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationTargetId", NotificationTargetId.class); + JSON.registerDiscriminator(NotificationTargetId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java b/paas/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java index 1e637658..7e564198 100644 --- a/paas/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java +++ b/paas/src/main/java/org/thingsboard/client/model/NotificationTemplateId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * NotificationTemplateId */ @JsonPropertyOrder({ - NotificationTemplateId.JSON_PROPERTY_ID, - NotificationTemplateId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class NotificationTemplateId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class NotificationTemplateId extends EntityId { public NotificationTemplateId() { } + @Override public NotificationTemplateId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public NotificationTemplateId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this NotificationTemplateId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotificationTemplateId notificationTemplateId = (NotificationTemplateId) o; - return Objects.equals(this.id, notificationTemplateId.id) && - Objects.equals(this.entityType, notificationTemplateId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationTemplateId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationTemplateId", NotificationTemplateId.class); + JSON.registerDiscriminator(NotificationTemplateId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/OAuth2Client.java b/paas/src/main/java/org/thingsboard/client/model/OAuth2Client.java index f67c506a..75bf88b9 100644 --- a/paas/src/main/java/org/thingsboard/client/model/OAuth2Client.java +++ b/paas/src/main/java/org/thingsboard/client/model/OAuth2Client.java @@ -157,13 +157,11 @@ public OAuth2Client() { @JsonCreator public OAuth2Client( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_NAME) String name ) { this(); this.createdTime = createdTime; this.name = name; - this.ownerId = ownerId; } public OAuth2Client id(@javax.annotation.Nullable OAuth2ClientId id) { @@ -642,6 +640,11 @@ public String getName() { + public OAuth2Client ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * Get ownerId * @return ownerId @@ -654,6 +657,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java b/paas/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java index 13d9d4af..cea44821 100644 --- a/paas/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java +++ b/paas/src/main/java/org/thingsboard/client/model/OAuth2ClientId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * OAuth2ClientId */ @JsonPropertyOrder({ - OAuth2ClientId.JSON_PROPERTY_ID, - OAuth2ClientId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class OAuth2ClientId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class OAuth2ClientId extends EntityId { public OAuth2ClientId() { } + @Override public OAuth2ClientId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public OAuth2ClientId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * Get entityType - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this OAuth2ClientId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OAuth2ClientId oauth2ClientId = (OAuth2ClientId) o; - return Objects.equals(this.id, oauth2ClientId.id) && - Objects.equals(this.entityType, oauth2ClientId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OAuth2ClientId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("OAuth2ClientId", OAuth2ClientId.class); + JSON.registerDiscriminator(OAuth2ClientId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/OtaPackageData.java b/paas/src/main/java/org/thingsboard/client/model/OtaPackageData.java index 8cfce7f9..8cb07905 100644 --- a/paas/src/main/java/org/thingsboard/client/model/OtaPackageData.java +++ b/paas/src/main/java/org/thingsboard/client/model/OtaPackageData.java @@ -35,76 +35,52 @@ * OtaPackageData */ @JsonPropertyOrder({ - OtaPackageData.JSON_PROPERTY_SHORT, OtaPackageData.JSON_PROPERTY_CHAR, + OtaPackageData.JSON_PROPERTY_DIRECT, + OtaPackageData.JSON_PROPERTY_DOUBLE, + OtaPackageData.JSON_PROPERTY_FLOAT, OtaPackageData.JSON_PROPERTY_INT, OtaPackageData.JSON_PROPERTY_LONG, - OtaPackageData.JSON_PROPERTY_FLOAT, - OtaPackageData.JSON_PROPERTY_DOUBLE, - OtaPackageData.JSON_PROPERTY_DIRECT, - OtaPackageData.JSON_PROPERTY_READ_ONLY + OtaPackageData.JSON_PROPERTY_READ_ONLY, + OtaPackageData.JSON_PROPERTY_SHORT }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class OtaPackageData { - public static final String JSON_PROPERTY_SHORT = "short"; - @javax.annotation.Nullable - private Integer _short; - public static final String JSON_PROPERTY_CHAR = "char"; @javax.annotation.Nullable private String _char; - public static final String JSON_PROPERTY_INT = "int"; + public static final String JSON_PROPERTY_DIRECT = "direct"; @javax.annotation.Nullable - private Integer _int; + private Boolean direct; - public static final String JSON_PROPERTY_LONG = "long"; + public static final String JSON_PROPERTY_DOUBLE = "double"; @javax.annotation.Nullable - private Long _long; + private Double _double; public static final String JSON_PROPERTY_FLOAT = "float"; @javax.annotation.Nullable private Float _float; - public static final String JSON_PROPERTY_DOUBLE = "double"; + public static final String JSON_PROPERTY_INT = "int"; @javax.annotation.Nullable - private Double _double; + private Integer _int; - public static final String JSON_PROPERTY_DIRECT = "direct"; + public static final String JSON_PROPERTY_LONG = "long"; @javax.annotation.Nullable - private Boolean direct; + private Long _long; public static final String JSON_PROPERTY_READ_ONLY = "readOnly"; @javax.annotation.Nullable private Boolean readOnly; - public OtaPackageData() { - } - - public OtaPackageData _short(@javax.annotation.Nullable Integer _short) { - this._short = _short; - return this; - } - - /** - * Get _short - * @return _short - */ + public static final String JSON_PROPERTY_SHORT = "short"; @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SHORT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getShort() { - return _short; - } - + private Integer _short; - @JsonProperty(value = JSON_PROPERTY_SHORT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShort(@javax.annotation.Nullable Integer _short) { - this._short = _short; + public OtaPackageData() { } - public OtaPackageData _char(@javax.annotation.Nullable String _char) { this._char = _char; return this; @@ -129,51 +105,51 @@ public void setChar(@javax.annotation.Nullable String _char) { } - public OtaPackageData _int(@javax.annotation.Nullable Integer _int) { - this._int = _int; + public OtaPackageData direct(@javax.annotation.Nullable Boolean direct) { + this.direct = direct; return this; } /** - * Get _int - * @return _int + * Get direct + * @return direct */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_INT, required = false) + @JsonProperty(value = JSON_PROPERTY_DIRECT, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getInt() { - return _int; + public Boolean getDirect() { + return direct; } - @JsonProperty(value = JSON_PROPERTY_INT, required = false) + @JsonProperty(value = JSON_PROPERTY_DIRECT, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInt(@javax.annotation.Nullable Integer _int) { - this._int = _int; + public void setDirect(@javax.annotation.Nullable Boolean direct) { + this.direct = direct; } - public OtaPackageData _long(@javax.annotation.Nullable Long _long) { - this._long = _long; + public OtaPackageData _double(@javax.annotation.Nullable Double _double) { + this._double = _double; return this; } /** - * Get _long - * @return _long + * Get _double + * @return _double */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LONG, required = false) + @JsonProperty(value = JSON_PROPERTY_DOUBLE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLong() { - return _long; + public Double getDouble() { + return _double; } - @JsonProperty(value = JSON_PROPERTY_LONG, required = false) + @JsonProperty(value = JSON_PROPERTY_DOUBLE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLong(@javax.annotation.Nullable Long _long) { - this._long = _long; + public void setDouble(@javax.annotation.Nullable Double _double) { + this._double = _double; } @@ -201,51 +177,51 @@ public void setFloat(@javax.annotation.Nullable Float _float) { } - public OtaPackageData _double(@javax.annotation.Nullable Double _double) { - this._double = _double; + public OtaPackageData _int(@javax.annotation.Nullable Integer _int) { + this._int = _int; return this; } /** - * Get _double - * @return _double + * Get _int + * @return _int */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DOUBLE, required = false) + @JsonProperty(value = JSON_PROPERTY_INT, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDouble() { - return _double; + public Integer getInt() { + return _int; } - @JsonProperty(value = JSON_PROPERTY_DOUBLE, required = false) + @JsonProperty(value = JSON_PROPERTY_INT, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDouble(@javax.annotation.Nullable Double _double) { - this._double = _double; + public void setInt(@javax.annotation.Nullable Integer _int) { + this._int = _int; } - public OtaPackageData direct(@javax.annotation.Nullable Boolean direct) { - this.direct = direct; + public OtaPackageData _long(@javax.annotation.Nullable Long _long) { + this._long = _long; return this; } /** - * Get direct - * @return direct + * Get _long + * @return _long */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DIRECT, required = false) + @JsonProperty(value = JSON_PROPERTY_LONG, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDirect() { - return direct; + public Long getLong() { + return _long; } - @JsonProperty(value = JSON_PROPERTY_DIRECT, required = false) + @JsonProperty(value = JSON_PROPERTY_LONG, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDirect(@javax.annotation.Nullable Boolean direct) { - this.direct = direct; + public void setLong(@javax.annotation.Nullable Long _long) { + this._long = _long; } @@ -273,6 +249,30 @@ public void setReadOnly(@javax.annotation.Nullable Boolean readOnly) { } + public OtaPackageData _short(@javax.annotation.Nullable Integer _short) { + this._short = _short; + return this; + } + + /** + * Get _short + * @return _short + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_SHORT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getShort() { + return _short; + } + + + @JsonProperty(value = JSON_PROPERTY_SHORT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShort(@javax.annotation.Nullable Integer _short) { + this._short = _short; + } + + /** * Return true if this OtaPackage_data object is equal to o. */ @@ -285,33 +285,33 @@ public boolean equals(Object o) { return false; } OtaPackageData otaPackageData = (OtaPackageData) o; - return Objects.equals(this._short, otaPackageData._short) && - Objects.equals(this._char, otaPackageData._char) && + return Objects.equals(this._char, otaPackageData._char) && + Objects.equals(this.direct, otaPackageData.direct) && + Objects.equals(this._double, otaPackageData._double) && + Objects.equals(this._float, otaPackageData._float) && Objects.equals(this._int, otaPackageData._int) && Objects.equals(this._long, otaPackageData._long) && - Objects.equals(this._float, otaPackageData._float) && - Objects.equals(this._double, otaPackageData._double) && - Objects.equals(this.direct, otaPackageData.direct) && - Objects.equals(this.readOnly, otaPackageData.readOnly); + Objects.equals(this.readOnly, otaPackageData.readOnly) && + Objects.equals(this._short, otaPackageData._short); } @Override public int hashCode() { - return Objects.hash(_short, _char, _int, _long, _float, _double, direct, readOnly); + return Objects.hash(_char, direct, _double, _float, _int, _long, readOnly, _short); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OtaPackageData {\n"); - sb.append(" _short: ").append(toIndentedString(_short)).append("\n"); sb.append(" _char: ").append(toIndentedString(_char)).append("\n"); + sb.append(" direct: ").append(toIndentedString(direct)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); sb.append(" _int: ").append(toIndentedString(_int)).append("\n"); sb.append(" _long: ").append(toIndentedString(_long)).append("\n"); - sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); - sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); - sb.append(" direct: ").append(toIndentedString(direct)).append("\n"); sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" _short: ").append(toIndentedString(_short)).append("\n"); sb.append("}"); return sb.toString(); } @@ -359,24 +359,19 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `short` to the URL query string - if (getShort() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sshort%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShort())))); - } - // add `char` to the URL query string if (getChar() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%schar%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getChar())))); } - // add `int` to the URL query string - if (getInt() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sint%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInt())))); + // add `direct` to the URL query string + if (getDirect() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sdirect%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDirect())))); } - // add `long` to the URL query string - if (getLong() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%slong%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLong())))); + // add `double` to the URL query string + if (getDouble() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sdouble%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDouble())))); } // add `float` to the URL query string @@ -384,14 +379,14 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sfloat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFloat())))); } - // add `double` to the URL query string - if (getDouble() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdouble%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDouble())))); + // add `int` to the URL query string + if (getInt() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sint%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInt())))); } - // add `direct` to the URL query string - if (getDirect() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdirect%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDirect())))); + // add `long` to the URL query string + if (getLong() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%slong%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLong())))); } // add `readOnly` to the URL query string @@ -399,6 +394,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sreadOnly%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReadOnly())))); } + // add `short` to the URL query string + if (getShort() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sshort%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShort())))); + } + return joiner.toString(); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/OtaPackageId.java b/paas/src/main/java/org/thingsboard/client/model/OtaPackageId.java index 1630b3c7..73f2ce14 100644 --- a/paas/src/main/java/org/thingsboard/client/model/OtaPackageId.java +++ b/paas/src/main/java/org/thingsboard/client/model/OtaPackageId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * OtaPackageId */ @JsonPropertyOrder({ - OtaPackageId.JSON_PROPERTY_ID, - OtaPackageId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class OtaPackageId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class OtaPackageId extends EntityId { public OtaPackageId() { } + @Override public OtaPackageId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public OtaPackageId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this OtaPackageId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OtaPackageId otaPackageId = (OtaPackageId) o; - return Objects.equals(this.id, otaPackageId.id) && - Objects.equals(this.entityType, otaPackageId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OtaPackageId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("OtaPackageId", OtaPackageId.class); + JSON.registerDiscriminator(OtaPackageId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java b/paas/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java index 83edb1a9..11df6388 100644 --- a/paas/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java @@ -242,12 +242,6 @@ public PdfReportTemplateConfig format(@javax.annotation.Nonnull TbReportFormat f return this; } - @Override - public PdfReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { - this.setEntityAliases(entityAliases); - return this; - } - @Override public PdfReportTemplateConfig filters(@javax.annotation.Nullable List filters) { this.setFilters(filters); @@ -261,7 +255,7 @@ public PdfReportTemplateConfig namePattern(@javax.annotation.Nullable String nam } @Override - public PdfReportTemplateConfig components(@javax.annotation.Nonnull List components) { + public PdfReportTemplateConfig components(@javax.annotation.Nullable List components) { this.setComponents(components); return this; } @@ -272,6 +266,12 @@ public PdfReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String return this; } + @Override + public PdfReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { + this.setEntityAliases(entityAliases); + return this; + } + /** * Return true if this PdfReportTemplateConfig object is equal to o. */ @@ -361,16 +361,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sformat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFormat())))); } - // add `entityAliases` to the URL query string - if (getEntityAliases() != null) { - for (int i = 0; i < getEntityAliases().size(); i++) { - if (getEntityAliases().get(i) != null) { - joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - // add `filters` to the URL query string if (getFilters() != null) { for (int i = 0; i < getFilters().size(); i++) { @@ -401,6 +391,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); } + // add `entityAliases` to the URL query string + if (getEntityAliases() != null) { + for (int i = 0; i < getEntityAliases().size(); i++) { + if (getEntityAliases().get(i) != null) { + joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + // add `pageSize` to the URL query string if (getPageSize() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%spageSize%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageSize())))); diff --git a/paas/src/main/java/org/thingsboard/client/model/PropagationCalculatedFieldConfiguration.java b/paas/src/main/java/org/thingsboard/client/model/PropagationCalculatedFieldConfiguration.java index 0484642c..806fc4be 100644 --- a/paas/src/main/java/org/thingsboard/client/model/PropagationCalculatedFieldConfiguration.java +++ b/paas/src/main/java/org/thingsboard/client/model/PropagationCalculatedFieldConfiguration.java @@ -45,10 +45,10 @@ * PropagationCalculatedFieldConfiguration */ @JsonPropertyOrder({ + PropagationCalculatedFieldConfiguration.JSON_PROPERTY_APPLY_EXPRESSION_TO_RESOLVED_ARGUMENTS, PropagationCalculatedFieldConfiguration.JSON_PROPERTY_ARGUMENTS, PropagationCalculatedFieldConfiguration.JSON_PROPERTY_EXPRESSION, - PropagationCalculatedFieldConfiguration.JSON_PROPERTY_RELATION, - PropagationCalculatedFieldConfiguration.JSON_PROPERTY_APPLY_EXPRESSION_TO_RESOLVED_ARGUMENTS + PropagationCalculatedFieldConfiguration.JSON_PROPERTY_RELATION }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -58,6 +58,10 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) public class PropagationCalculatedFieldConfiguration extends CalculatedFieldConfiguration { + public static final String JSON_PROPERTY_APPLY_EXPRESSION_TO_RESOLVED_ARGUMENTS = "applyExpressionToResolvedArguments"; + @javax.annotation.Nullable + private Boolean applyExpressionToResolvedArguments; + public static final String JSON_PROPERTY_ARGUMENTS = "arguments"; @javax.annotation.Nonnull private Map arguments = new HashMap<>(); @@ -70,13 +74,33 @@ public class PropagationCalculatedFieldConfiguration extends CalculatedFieldConf @javax.annotation.Nonnull private RelationPathLevel relation; - public static final String JSON_PROPERTY_APPLY_EXPRESSION_TO_RESOLVED_ARGUMENTS = "applyExpressionToResolvedArguments"; + public PropagationCalculatedFieldConfiguration() { + } + + public PropagationCalculatedFieldConfiguration applyExpressionToResolvedArguments(@javax.annotation.Nullable Boolean applyExpressionToResolvedArguments) { + this.applyExpressionToResolvedArguments = applyExpressionToResolvedArguments; + return this; + } + + /** + * Get applyExpressionToResolvedArguments + * @return applyExpressionToResolvedArguments + */ @javax.annotation.Nullable - private Boolean applyExpressionToResolvedArguments; + @JsonProperty(value = JSON_PROPERTY_APPLY_EXPRESSION_TO_RESOLVED_ARGUMENTS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getApplyExpressionToResolvedArguments() { + return applyExpressionToResolvedArguments; + } - public PropagationCalculatedFieldConfiguration() { + + @JsonProperty(value = JSON_PROPERTY_APPLY_EXPRESSION_TO_RESOLVED_ARGUMENTS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setApplyExpressionToResolvedArguments(@javax.annotation.Nullable Boolean applyExpressionToResolvedArguments) { + this.applyExpressionToResolvedArguments = applyExpressionToResolvedArguments; } + public PropagationCalculatedFieldConfiguration arguments(@javax.annotation.Nonnull Map arguments) { this.arguments = arguments; return this; @@ -157,42 +181,18 @@ public void setRelation(@javax.annotation.Nonnull RelationPathLevel relation) { } - public PropagationCalculatedFieldConfiguration applyExpressionToResolvedArguments(@javax.annotation.Nullable Boolean applyExpressionToResolvedArguments) { - this.applyExpressionToResolvedArguments = applyExpressionToResolvedArguments; + @Override + public PropagationCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { + this.setOutput(output); return this; } - /** - * Get applyExpressionToResolvedArguments - * @return applyExpressionToResolvedArguments - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_APPLY_EXPRESSION_TO_RESOLVED_ARGUMENTS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getApplyExpressionToResolvedArguments() { - return applyExpressionToResolvedArguments; - } - - - @JsonProperty(value = JSON_PROPERTY_APPLY_EXPRESSION_TO_RESOLVED_ARGUMENTS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApplyExpressionToResolvedArguments(@javax.annotation.Nullable Boolean applyExpressionToResolvedArguments) { - this.applyExpressionToResolvedArguments = applyExpressionToResolvedArguments; - } - - @Override public PropagationCalculatedFieldConfiguration aiGenerated(@javax.annotation.Nullable Boolean aiGenerated) { this.setAiGenerated(aiGenerated); return this; } - @Override - public PropagationCalculatedFieldConfiguration output(@javax.annotation.Nonnull Output output) { - this.setOutput(output); - return this; - } - @Override public PropagationCalculatedFieldConfiguration type(@javax.annotation.Nonnull String type) { this.setType(type); @@ -211,16 +211,16 @@ public boolean equals(Object o) { return false; } PropagationCalculatedFieldConfiguration propagationCalculatedFieldConfiguration = (PropagationCalculatedFieldConfiguration) o; - return Objects.equals(this.arguments, propagationCalculatedFieldConfiguration.arguments) && + return Objects.equals(this.applyExpressionToResolvedArguments, propagationCalculatedFieldConfiguration.applyExpressionToResolvedArguments) && + Objects.equals(this.arguments, propagationCalculatedFieldConfiguration.arguments) && Objects.equals(this.expression, propagationCalculatedFieldConfiguration.expression) && Objects.equals(this.relation, propagationCalculatedFieldConfiguration.relation) && - Objects.equals(this.applyExpressionToResolvedArguments, propagationCalculatedFieldConfiguration.applyExpressionToResolvedArguments) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(arguments, expression, relation, applyExpressionToResolvedArguments, super.hashCode()); + return Objects.hash(applyExpressionToResolvedArguments, arguments, expression, relation, super.hashCode()); } @Override @@ -228,10 +228,10 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PropagationCalculatedFieldConfiguration {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" applyExpressionToResolvedArguments: ").append(toIndentedString(applyExpressionToResolvedArguments)).append("\n"); sb.append(" arguments: ").append(toIndentedString(arguments)).append("\n"); sb.append(" expression: ").append(toIndentedString(expression)).append("\n"); sb.append(" relation: ").append(toIndentedString(relation)).append("\n"); - sb.append(" applyExpressionToResolvedArguments: ").append(toIndentedString(applyExpressionToResolvedArguments)).append("\n"); sb.append("}"); return sb.toString(); } @@ -279,21 +279,26 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `aiGenerated` to the URL query string - if (getAiGenerated() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%saiGenerated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAiGenerated())))); - } - // add `output` to the URL query string if (getOutput() != null) { joiner.add(getOutput().toUrlQueryString(prefix + "output" + suffix)); } + // add `aiGenerated` to the URL query string + if (getAiGenerated() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%saiGenerated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAiGenerated())))); + } + // add `type` to the URL query string if (getType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); } + // add `applyExpressionToResolvedArguments` to the URL query string + if (getApplyExpressionToResolvedArguments() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sapplyExpressionToResolvedArguments%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getApplyExpressionToResolvedArguments())))); + } + // add `arguments` to the URL query string if (getArguments() != null) { for (String _key : getArguments().keySet()) { @@ -314,11 +319,6 @@ public String toUrlQueryString(String prefix) { joiner.add(getRelation().toUrlQueryString(prefix + "relation" + suffix)); } - // add `applyExpressionToResolvedArguments` to the URL query string - if (getApplyExpressionToResolvedArguments() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sapplyExpressionToResolvedArguments%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getApplyExpressionToResolvedArguments())))); - } - return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/QueueId.java b/paas/src/main/java/org/thingsboard/client/model/QueueId.java index 07f86fc6..c1c979b3 100644 --- a/paas/src/main/java/org/thingsboard/client/model/QueueId.java +++ b/paas/src/main/java/org/thingsboard/client/model/QueueId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * QueueId */ @JsonPropertyOrder({ - QueueId.JSON_PROPERTY_ID, - QueueId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class QueueId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class QueueId extends EntityId { public QueueId() { } + @Override public QueueId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public QueueId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this QueueId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - QueueId queueId = (QueueId) o; - return Objects.equals(this.id, queueId.id) && - Objects.equals(this.entityType, queueId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class QueueId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("QueueId", QueueId.class); + JSON.registerDiscriminator(QueueId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/QueueStatsId.java b/paas/src/main/java/org/thingsboard/client/model/QueueStatsId.java index b11bdee7..1aceba74 100644 --- a/paas/src/main/java/org/thingsboard/client/model/QueueStatsId.java +++ b/paas/src/main/java/org/thingsboard/client/model/QueueStatsId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * QueueStatsId */ @JsonPropertyOrder({ - QueueStatsId.JSON_PROPERTY_ID, - QueueStatsId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class QueueStatsId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class QueueStatsId extends EntityId { public QueueStatsId() { } + @Override public QueueStatsId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public QueueStatsId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this QueueStatsId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - QueueStatsId queueStatsId = (QueueStatsId) o; - return Objects.equals(this.id, queueStatsId.id) && - Objects.equals(this.entityType, queueStatsId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class QueueStatsId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("QueueStatsId", QueueStatsId.class); + JSON.registerDiscriminator(QueueStatsId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java index ddd4e212..d31ea72e 100644 --- a/paas/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public RateLimitsRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public RateLimitsRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/paas/src/main/java/org/thingsboard/client/model/RelatedEntitiesAggregationCalculatedFieldConfiguration.java b/paas/src/main/java/org/thingsboard/client/model/RelatedEntitiesAggregationCalculatedFieldConfiguration.java index 322dbec9..ed3fc0d9 100644 --- a/paas/src/main/java/org/thingsboard/client/model/RelatedEntitiesAggregationCalculatedFieldConfiguration.java +++ b/paas/src/main/java/org/thingsboard/client/model/RelatedEntitiesAggregationCalculatedFieldConfiguration.java @@ -46,13 +46,13 @@ * RelatedEntitiesAggregationCalculatedFieldConfiguration */ @JsonPropertyOrder({ - RelatedEntitiesAggregationCalculatedFieldConfiguration.JSON_PROPERTY_RELATION, RelatedEntitiesAggregationCalculatedFieldConfiguration.JSON_PROPERTY_ARGUMENTS, RelatedEntitiesAggregationCalculatedFieldConfiguration.JSON_PROPERTY_DEDUPLICATION_INTERVAL_IN_SEC, RelatedEntitiesAggregationCalculatedFieldConfiguration.JSON_PROPERTY_METRICS, - RelatedEntitiesAggregationCalculatedFieldConfiguration.JSON_PROPERTY_USE_LATEST_TS, + RelatedEntitiesAggregationCalculatedFieldConfiguration.JSON_PROPERTY_RELATION, + RelatedEntitiesAggregationCalculatedFieldConfiguration.JSON_PROPERTY_SCHEDULED_UPDATE_ENABLED, RelatedEntitiesAggregationCalculatedFieldConfiguration.JSON_PROPERTY_SCHEDULED_UPDATE_INTERVAL, - RelatedEntitiesAggregationCalculatedFieldConfiguration.JSON_PROPERTY_SCHEDULED_UPDATE_ENABLED + RelatedEntitiesAggregationCalculatedFieldConfiguration.JSON_PROPERTY_USE_LATEST_TS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -62,10 +62,6 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) public class RelatedEntitiesAggregationCalculatedFieldConfiguration extends CalculatedFieldConfiguration { - public static final String JSON_PROPERTY_RELATION = "relation"; - @javax.annotation.Nonnull - private RelationPathLevel relation; - public static final String JSON_PROPERTY_ARGUMENTS = "arguments"; @javax.annotation.Nonnull private Map arguments = new HashMap<>(); @@ -78,45 +74,25 @@ public class RelatedEntitiesAggregationCalculatedFieldConfiguration extends Calc @javax.annotation.Nonnull private Map metrics = new HashMap<>(); - public static final String JSON_PROPERTY_USE_LATEST_TS = "useLatestTs"; + public static final String JSON_PROPERTY_RELATION = "relation"; + @javax.annotation.Nonnull + private RelationPathLevel relation; + + public static final String JSON_PROPERTY_SCHEDULED_UPDATE_ENABLED = "scheduledUpdateEnabled"; @javax.annotation.Nullable - private Boolean useLatestTs; + private Boolean scheduledUpdateEnabled; public static final String JSON_PROPERTY_SCHEDULED_UPDATE_INTERVAL = "scheduledUpdateInterval"; @javax.annotation.Nullable private Integer scheduledUpdateInterval; - public static final String JSON_PROPERTY_SCHEDULED_UPDATE_ENABLED = "scheduledUpdateEnabled"; + public static final String JSON_PROPERTY_USE_LATEST_TS = "useLatestTs"; @javax.annotation.Nullable - private Boolean scheduledUpdateEnabled; + private Boolean useLatestTs; public RelatedEntitiesAggregationCalculatedFieldConfiguration() { } - public RelatedEntitiesAggregationCalculatedFieldConfiguration relation(@javax.annotation.Nonnull RelationPathLevel relation) { - this.relation = relation; - return this; - } - - /** - * Get relation - * @return relation - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_RELATION, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RelationPathLevel getRelation() { - return relation; - } - - - @JsonProperty(value = JSON_PROPERTY_RELATION, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRelation(@javax.annotation.Nonnull RelationPathLevel relation) { - this.relation = relation; - } - - public RelatedEntitiesAggregationCalculatedFieldConfiguration arguments(@javax.annotation.Nonnull Map arguments) { this.arguments = arguments; return this; @@ -205,27 +181,51 @@ public void setMetrics(@javax.annotation.Nonnull Map metrics) } - public RelatedEntitiesAggregationCalculatedFieldConfiguration useLatestTs(@javax.annotation.Nullable Boolean useLatestTs) { - this.useLatestTs = useLatestTs; + public RelatedEntitiesAggregationCalculatedFieldConfiguration relation(@javax.annotation.Nonnull RelationPathLevel relation) { + this.relation = relation; return this; } /** - * Get useLatestTs - * @return useLatestTs + * Get relation + * @return relation + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_RELATION, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RelationPathLevel getRelation() { + return relation; + } + + + @JsonProperty(value = JSON_PROPERTY_RELATION, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelation(@javax.annotation.Nonnull RelationPathLevel relation) { + this.relation = relation; + } + + + public RelatedEntitiesAggregationCalculatedFieldConfiguration scheduledUpdateEnabled(@javax.annotation.Nullable Boolean scheduledUpdateEnabled) { + this.scheduledUpdateEnabled = scheduledUpdateEnabled; + return this; + } + + /** + * Get scheduledUpdateEnabled + * @return scheduledUpdateEnabled */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_USE_LATEST_TS, required = false) + @JsonProperty(value = JSON_PROPERTY_SCHEDULED_UPDATE_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getUseLatestTs() { - return useLatestTs; + public Boolean getScheduledUpdateEnabled() { + return scheduledUpdateEnabled; } - @JsonProperty(value = JSON_PROPERTY_USE_LATEST_TS, required = false) + @JsonProperty(value = JSON_PROPERTY_SCHEDULED_UPDATE_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseLatestTs(@javax.annotation.Nullable Boolean useLatestTs) { - this.useLatestTs = useLatestTs; + public void setScheduledUpdateEnabled(@javax.annotation.Nullable Boolean scheduledUpdateEnabled) { + this.scheduledUpdateEnabled = scheduledUpdateEnabled; } @@ -253,39 +253,39 @@ public void setScheduledUpdateInterval(@javax.annotation.Nullable Integer schedu } - public RelatedEntitiesAggregationCalculatedFieldConfiguration scheduledUpdateEnabled(@javax.annotation.Nullable Boolean scheduledUpdateEnabled) { - this.scheduledUpdateEnabled = scheduledUpdateEnabled; + public RelatedEntitiesAggregationCalculatedFieldConfiguration useLatestTs(@javax.annotation.Nullable Boolean useLatestTs) { + this.useLatestTs = useLatestTs; return this; } /** - * Get scheduledUpdateEnabled - * @return scheduledUpdateEnabled + * Get useLatestTs + * @return useLatestTs */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SCHEDULED_UPDATE_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_USE_LATEST_TS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getScheduledUpdateEnabled() { - return scheduledUpdateEnabled; + public Boolean getUseLatestTs() { + return useLatestTs; } - @JsonProperty(value = JSON_PROPERTY_SCHEDULED_UPDATE_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_USE_LATEST_TS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setScheduledUpdateEnabled(@javax.annotation.Nullable Boolean scheduledUpdateEnabled) { - this.scheduledUpdateEnabled = scheduledUpdateEnabled; + public void setUseLatestTs(@javax.annotation.Nullable Boolean useLatestTs) { + this.useLatestTs = useLatestTs; } @Override - public RelatedEntitiesAggregationCalculatedFieldConfiguration aiGenerated(@javax.annotation.Nullable Boolean aiGenerated) { - this.setAiGenerated(aiGenerated); + public RelatedEntitiesAggregationCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { + this.setOutput(output); return this; } @Override - public RelatedEntitiesAggregationCalculatedFieldConfiguration output(@javax.annotation.Nonnull Output output) { - this.setOutput(output); + public RelatedEntitiesAggregationCalculatedFieldConfiguration aiGenerated(@javax.annotation.Nullable Boolean aiGenerated) { + this.setAiGenerated(aiGenerated); return this; } @@ -307,19 +307,19 @@ public boolean equals(Object o) { return false; } RelatedEntitiesAggregationCalculatedFieldConfiguration relatedEntitiesAggregationCalculatedFieldConfiguration = (RelatedEntitiesAggregationCalculatedFieldConfiguration) o; - return Objects.equals(this.relation, relatedEntitiesAggregationCalculatedFieldConfiguration.relation) && - Objects.equals(this.arguments, relatedEntitiesAggregationCalculatedFieldConfiguration.arguments) && + return Objects.equals(this.arguments, relatedEntitiesAggregationCalculatedFieldConfiguration.arguments) && Objects.equals(this.deduplicationIntervalInSec, relatedEntitiesAggregationCalculatedFieldConfiguration.deduplicationIntervalInSec) && Objects.equals(this.metrics, relatedEntitiesAggregationCalculatedFieldConfiguration.metrics) && - Objects.equals(this.useLatestTs, relatedEntitiesAggregationCalculatedFieldConfiguration.useLatestTs) && - Objects.equals(this.scheduledUpdateInterval, relatedEntitiesAggregationCalculatedFieldConfiguration.scheduledUpdateInterval) && + Objects.equals(this.relation, relatedEntitiesAggregationCalculatedFieldConfiguration.relation) && Objects.equals(this.scheduledUpdateEnabled, relatedEntitiesAggregationCalculatedFieldConfiguration.scheduledUpdateEnabled) && + Objects.equals(this.scheduledUpdateInterval, relatedEntitiesAggregationCalculatedFieldConfiguration.scheduledUpdateInterval) && + Objects.equals(this.useLatestTs, relatedEntitiesAggregationCalculatedFieldConfiguration.useLatestTs) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(relation, arguments, deduplicationIntervalInSec, metrics, useLatestTs, scheduledUpdateInterval, scheduledUpdateEnabled, super.hashCode()); + return Objects.hash(arguments, deduplicationIntervalInSec, metrics, relation, scheduledUpdateEnabled, scheduledUpdateInterval, useLatestTs, super.hashCode()); } @Override @@ -327,13 +327,13 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RelatedEntitiesAggregationCalculatedFieldConfiguration {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" relation: ").append(toIndentedString(relation)).append("\n"); sb.append(" arguments: ").append(toIndentedString(arguments)).append("\n"); sb.append(" deduplicationIntervalInSec: ").append(toIndentedString(deduplicationIntervalInSec)).append("\n"); sb.append(" metrics: ").append(toIndentedString(metrics)).append("\n"); - sb.append(" useLatestTs: ").append(toIndentedString(useLatestTs)).append("\n"); - sb.append(" scheduledUpdateInterval: ").append(toIndentedString(scheduledUpdateInterval)).append("\n"); + sb.append(" relation: ").append(toIndentedString(relation)).append("\n"); sb.append(" scheduledUpdateEnabled: ").append(toIndentedString(scheduledUpdateEnabled)).append("\n"); + sb.append(" scheduledUpdateInterval: ").append(toIndentedString(scheduledUpdateInterval)).append("\n"); + sb.append(" useLatestTs: ").append(toIndentedString(useLatestTs)).append("\n"); sb.append("}"); return sb.toString(); } @@ -381,26 +381,21 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `aiGenerated` to the URL query string - if (getAiGenerated() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%saiGenerated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAiGenerated())))); - } - // add `output` to the URL query string if (getOutput() != null) { joiner.add(getOutput().toUrlQueryString(prefix + "output" + suffix)); } + // add `aiGenerated` to the URL query string + if (getAiGenerated() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%saiGenerated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAiGenerated())))); + } + // add `type` to the URL query string if (getType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); } - // add `relation` to the URL query string - if (getRelation() != null) { - joiner.add(getRelation().toUrlQueryString(prefix + "relation" + suffix)); - } - // add `arguments` to the URL query string if (getArguments() != null) { for (String _key : getArguments().keySet()) { @@ -426,9 +421,14 @@ public String toUrlQueryString(String prefix) { } } - // add `useLatestTs` to the URL query string - if (getUseLatestTs() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%suseLatestTs%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUseLatestTs())))); + // add `relation` to the URL query string + if (getRelation() != null) { + joiner.add(getRelation().toUrlQueryString(prefix + "relation" + suffix)); + } + + // add `scheduledUpdateEnabled` to the URL query string + if (getScheduledUpdateEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sscheduledUpdateEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScheduledUpdateEnabled())))); } // add `scheduledUpdateInterval` to the URL query string @@ -436,9 +436,9 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sscheduledUpdateInterval%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScheduledUpdateInterval())))); } - // add `scheduledUpdateEnabled` to the URL query string - if (getScheduledUpdateEnabled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sscheduledUpdateEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScheduledUpdateEnabled())))); + // add `useLatestTs` to the URL query string + if (getUseLatestTs() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%suseLatestTs%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUseLatestTs())))); } return joiner.toString(); diff --git a/paas/src/main/java/org/thingsboard/client/model/Report.java b/paas/src/main/java/org/thingsboard/client/model/Report.java index 47d09acf..1a647e51 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Report.java +++ b/paas/src/main/java/org/thingsboard/client/model/Report.java @@ -95,12 +95,10 @@ public Report() { @JsonCreator public Report( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime ) { this(); this.createdTime = createdTime; - this.ownerId = ownerId; } public Report id(@javax.annotation.Nullable ReportId id) { @@ -285,6 +283,11 @@ public void setUserId(@javax.annotation.Nonnull UserId userId) { } + public Report ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -297,6 +300,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/ReportBarChartWithLabelsSettings.java b/paas/src/main/java/org/thingsboard/client/model/ReportBarChartWithLabelsSettings.java index 8c6f6170..1b6bebc1 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ReportBarChartWithLabelsSettings.java +++ b/paas/src/main/java/org/thingsboard/client/model/ReportBarChartWithLabelsSettings.java @@ -507,14 +507,14 @@ public ReportBarChartWithLabelsSettings legendValueColor(@javax.annotation.Nulla } @Override - public ReportBarChartWithLabelsSettings xaxis(@javax.annotation.Nullable TimeSeriesChartXAxisSettings xaxis) { - this.setXaxis(xaxis); + public ReportBarChartWithLabelsSettings yaxes(@javax.annotation.Nullable Map yaxes) { + this.setYaxes(yaxes); return this; } @Override - public ReportBarChartWithLabelsSettings yaxes(@javax.annotation.Nullable Map yaxes) { - this.setYaxes(yaxes); + public ReportBarChartWithLabelsSettings xaxis(@javax.annotation.Nullable TimeSeriesChartXAxisSettings xaxis) { + this.setXaxis(xaxis); return this; } @@ -748,11 +748,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%slegendValueColor%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLegendValueColor())))); } - // add `xaxis` to the URL query string - if (getXaxis() != null) { - joiner.add(getXaxis().toUrlQueryString(prefix + "xaxis" + suffix)); - } - // add `yaxes` to the URL query string if (getYaxes() != null) { for (String _key : getYaxes().keySet()) { @@ -763,6 +758,11 @@ public String toUrlQueryString(String prefix) { } } + // add `xaxis` to the URL query string + if (getXaxis() != null) { + joiner.add(getXaxis().toUrlQueryString(prefix + "xaxis" + suffix)); + } + // add `thresholds` to the URL query string if (getThresholds() != null) { for (int i = 0; i < getThresholds().size(); i++) { diff --git a/paas/src/main/java/org/thingsboard/client/model/ReportId.java b/paas/src/main/java/org/thingsboard/client/model/ReportId.java index f8f01438..1f4fb588 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ReportId.java +++ b/paas/src/main/java/org/thingsboard/client/model/ReportId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * ReportId */ @JsonPropertyOrder({ - ReportId.JSON_PROPERTY_ID, - ReportId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class ReportId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class ReportId extends EntityId { public ReportId() { } + @Override public ReportId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public ReportId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this ReportId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ReportId reportId = (ReportId) o; - return Objects.equals(this.id, reportId.id) && - Objects.equals(this.entityType, reportId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReportId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ReportId", ReportId.class); + JSON.registerDiscriminator(ReportId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/ReportInfo.java b/paas/src/main/java/org/thingsboard/client/model/ReportInfo.java index 14ddbd9c..4cde66d9 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ReportInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/ReportInfo.java @@ -111,12 +111,10 @@ public ReportInfo() { @JsonCreator public ReportInfo( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime ) { this(); this.createdTime = createdTime; - this.ownerId = ownerId; } public ReportInfo id(@javax.annotation.Nullable ReportId id) { @@ -373,6 +371,11 @@ public void setUserName(@javax.annotation.Nullable String userName) { } + public ReportInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -385,6 +388,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/ReportRangeChartSettings.java b/paas/src/main/java/org/thingsboard/client/model/ReportRangeChartSettings.java index f0a3cb85..62693622 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ReportRangeChartSettings.java +++ b/paas/src/main/java/org/thingsboard/client/model/ReportRangeChartSettings.java @@ -429,14 +429,14 @@ public ReportRangeChartSettings legendValueColor(@javax.annotation.Nullable Stri } @Override - public ReportRangeChartSettings xaxis(@javax.annotation.Nullable TimeSeriesChartXAxisSettings xaxis) { - this.setXaxis(xaxis); + public ReportRangeChartSettings yaxes(@javax.annotation.Nullable Map yaxes) { + this.setYaxes(yaxes); return this; } @Override - public ReportRangeChartSettings yaxes(@javax.annotation.Nullable Map yaxes) { - this.setYaxes(yaxes); + public ReportRangeChartSettings xaxis(@javax.annotation.Nullable TimeSeriesChartXAxisSettings xaxis) { + this.setXaxis(xaxis); return this; } @@ -664,11 +664,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%slegendValueColor%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLegendValueColor())))); } - // add `xaxis` to the URL query string - if (getXaxis() != null) { - joiner.add(getXaxis().toUrlQueryString(prefix + "xaxis" + suffix)); - } - // add `yaxes` to the URL query string if (getYaxes() != null) { for (String _key : getYaxes().keySet()) { @@ -679,6 +674,11 @@ public String toUrlQueryString(String prefix) { } } + // add `xaxis` to the URL query string + if (getXaxis() != null) { + joiner.add(getXaxis().toUrlQueryString(prefix + "xaxis" + suffix)); + } + // add `thresholds` to the URL query string if (getThresholds() != null) { for (int i = 0; i < getThresholds().size(); i++) { diff --git a/paas/src/main/java/org/thingsboard/client/model/ReportTemplate.java b/paas/src/main/java/org/thingsboard/client/model/ReportTemplate.java index bdb4dbda..a654ceae 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ReportTemplate.java +++ b/paas/src/main/java/org/thingsboard/client/model/ReportTemplate.java @@ -107,14 +107,12 @@ public ReportTemplate() { public ReportTemplate( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; - this.ownerId = ownerId; } public ReportTemplate id(@javax.annotation.Nullable ReportTemplateId id) { @@ -327,6 +325,11 @@ public void setConfiguration(@javax.annotation.Nonnull ReportTemplateConfig _con } + public ReportTemplate ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -339,6 +342,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java b/paas/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java index fe29bd9e..4a60a202 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java @@ -46,11 +46,11 @@ */ @JsonPropertyOrder({ ReportTemplateConfig.JSON_PROPERTY_FORMAT, - ReportTemplateConfig.JSON_PROPERTY_ENTITY_ALIASES, ReportTemplateConfig.JSON_PROPERTY_FILTERS, ReportTemplateConfig.JSON_PROPERTY_NAME_PATTERN, ReportTemplateConfig.JSON_PROPERTY_COMPONENTS, - ReportTemplateConfig.JSON_PROPERTY_TIME_DATA_PATTERN + ReportTemplateConfig.JSON_PROPERTY_TIME_DATA_PATTERN, + ReportTemplateConfig.JSON_PROPERTY_ENTITY_ALIASES }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -68,10 +68,6 @@ public class ReportTemplateConfig { @javax.annotation.Nonnull private TbReportFormat format; - public static final String JSON_PROPERTY_ENTITY_ALIASES = "entityAliases"; - @javax.annotation.Nullable - private List entityAliases = new ArrayList<>(); - public static final String JSON_PROPERTY_FILTERS = "filters"; @javax.annotation.Nullable private List filters = new ArrayList<>(); @@ -88,6 +84,10 @@ public class ReportTemplateConfig { @javax.annotation.Nullable private String timeDataPattern; + public static final String JSON_PROPERTY_ENTITY_ALIASES = "entityAliases"; + @javax.annotation.Nullable + private List entityAliases = new ArrayList<>(); + public ReportTemplateConfig() { } @@ -115,38 +115,6 @@ public void setFormat(@javax.annotation.Nonnull TbReportFormat format) { } - public ReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { - this.entityAliases = entityAliases; - return this; - } - - public ReportTemplateConfig addEntityAliasesItem(EntityAlias entityAliasesItem) { - if (this.entityAliases == null) { - this.entityAliases = new ArrayList<>(); - } - this.entityAliases.add(entityAliasesItem); - return this; - } - - /** - * Get entityAliases - * @return entityAliases - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ENTITY_ALIASES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getEntityAliases() { - return entityAliases; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_ALIASES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEntityAliases(@javax.annotation.Nullable List entityAliases) { - this.entityAliases = entityAliases; - } - - public ReportTemplateConfig filters(@javax.annotation.Nullable List filters) { this.filters = filters; return this; @@ -259,6 +227,38 @@ public void setTimeDataPattern(@javax.annotation.Nullable String timeDataPattern } + public ReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { + this.entityAliases = entityAliases; + return this; + } + + public ReportTemplateConfig addEntityAliasesItem(EntityAlias entityAliasesItem) { + if (this.entityAliases == null) { + this.entityAliases = new ArrayList<>(); + } + this.entityAliases.add(entityAliasesItem); + return this; + } + + /** + * Get entityAliases + * @return entityAliases + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ENTITY_ALIASES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEntityAliases() { + return entityAliases; + } + + + @JsonProperty(value = JSON_PROPERTY_ENTITY_ALIASES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityAliases(@javax.annotation.Nullable List entityAliases) { + this.entityAliases = entityAliases; + } + + /** * Return true if this ReportTemplateConfig object is equal to o. */ @@ -272,16 +272,16 @@ public boolean equals(Object o) { } ReportTemplateConfig reportTemplateConfig = (ReportTemplateConfig) o; return Objects.equals(this.format, reportTemplateConfig.format) && - Objects.equals(this.entityAliases, reportTemplateConfig.entityAliases) && Objects.equals(this.filters, reportTemplateConfig.filters) && Objects.equals(this.namePattern, reportTemplateConfig.namePattern) && Objects.equals(this.components, reportTemplateConfig.components) && - Objects.equals(this.timeDataPattern, reportTemplateConfig.timeDataPattern); + Objects.equals(this.timeDataPattern, reportTemplateConfig.timeDataPattern) && + Objects.equals(this.entityAliases, reportTemplateConfig.entityAliases); } @Override public int hashCode() { - return Objects.hash(format, entityAliases, filters, namePattern, components, timeDataPattern); + return Objects.hash(format, filters, namePattern, components, timeDataPattern, entityAliases); } @Override @@ -289,11 +289,11 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReportTemplateConfig {\n"); sb.append(" format: ").append(toIndentedString(format)).append("\n"); - sb.append(" entityAliases: ").append(toIndentedString(entityAliases)).append("\n"); sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); sb.append(" components: ").append(toIndentedString(components)).append("\n"); sb.append(" timeDataPattern: ").append(toIndentedString(timeDataPattern)).append("\n"); + sb.append(" entityAliases: ").append(toIndentedString(entityAliases)).append("\n"); sb.append("}"); return sb.toString(); } @@ -346,16 +346,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sformat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFormat())))); } - // add `entityAliases` to the URL query string - if (getEntityAliases() != null) { - for (int i = 0; i < getEntityAliases().size(); i++) { - if (getEntityAliases().get(i) != null) { - joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - // add `filters` to the URL query string if (getFilters() != null) { for (int i = 0; i < getFilters().size(); i++) { @@ -386,6 +376,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); } + // add `entityAliases` to the URL query string + if (getEntityAliases() != null) { + for (int i = 0; i < getEntityAliases().size(); i++) { + if (getEntityAliases().get(i) != null) { + joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/ReportTemplateId.java b/paas/src/main/java/org/thingsboard/client/model/ReportTemplateId.java index f0ca8458..b26a5154 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ReportTemplateId.java +++ b/paas/src/main/java/org/thingsboard/client/model/ReportTemplateId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * ReportTemplateId */ @JsonPropertyOrder({ - ReportTemplateId.JSON_PROPERTY_ID, - ReportTemplateId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class ReportTemplateId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class ReportTemplateId extends EntityId { public ReportTemplateId() { } + @Override public ReportTemplateId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public ReportTemplateId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this ReportTemplateId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ReportTemplateId reportTemplateId = (ReportTemplateId) o; - return Objects.equals(this.id, reportTemplateId.id) && - Objects.equals(this.entityType, reportTemplateId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReportTemplateId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ReportTemplateId", ReportTemplateId.class); + JSON.registerDiscriminator(ReportTemplateId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java b/paas/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java index a2501762..e5507ea6 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java @@ -107,15 +107,13 @@ public ReportTemplateInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; this.ownerName = ownerName; - this.ownerId = ownerId; } public ReportTemplateInfo id(@javax.annotation.Nullable ReportTemplateId id) { @@ -318,6 +316,11 @@ public String getOwnerName() { + public ReportTemplateInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -330,6 +333,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/ReportTimeSeriesChartSettings.java b/paas/src/main/java/org/thingsboard/client/model/ReportTimeSeriesChartSettings.java index f145248a..d6966038 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ReportTimeSeriesChartSettings.java +++ b/paas/src/main/java/org/thingsboard/client/model/ReportTimeSeriesChartSettings.java @@ -70,8 +70,8 @@ ReportTimeSeriesChartSettings.JSON_PROPERTY_LEGEND_LABEL_COLOR, ReportTimeSeriesChartSettings.JSON_PROPERTY_LEGEND_VALUE_FONT, ReportTimeSeriesChartSettings.JSON_PROPERTY_LEGEND_VALUE_COLOR, - ReportTimeSeriesChartSettings.JSON_PROPERTY_XAXIS, ReportTimeSeriesChartSettings.JSON_PROPERTY_YAXES, + ReportTimeSeriesChartSettings.JSON_PROPERTY_XAXIS, ReportTimeSeriesChartSettings.JSON_PROPERTY_THRESHOLDS, ReportTimeSeriesChartSettings.JSON_PROPERTY_GRID, ReportTimeSeriesChartSettings.JSON_PROPERTY_Y_AXES, @@ -158,14 +158,14 @@ public class ReportTimeSeriesChartSettings { @javax.annotation.Nullable private String legendValueColor; - public static final String JSON_PROPERTY_XAXIS = "xaxis"; - @javax.annotation.Nullable - private TimeSeriesChartXAxisSettings xaxis; - public static final String JSON_PROPERTY_YAXES = "yaxes"; @javax.annotation.Nullable private Map yaxes = new HashMap<>(); + public static final String JSON_PROPERTY_XAXIS = "xaxis"; + @javax.annotation.Nullable + private TimeSeriesChartXAxisSettings xaxis; + public static final String JSON_PROPERTY_THRESHOLDS = "thresholds"; @javax.annotation.Nullable private List thresholds = new ArrayList<>(); @@ -589,30 +589,6 @@ public void setLegendValueColor(@javax.annotation.Nullable String legendValueCol } - public ReportTimeSeriesChartSettings xaxis(@javax.annotation.Nullable TimeSeriesChartXAxisSettings xaxis) { - this.xaxis = xaxis; - return this; - } - - /** - * Get xaxis - * @return xaxis - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_XAXIS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TimeSeriesChartXAxisSettings getXaxis() { - return xaxis; - } - - - @JsonProperty(value = JSON_PROPERTY_XAXIS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setXaxis(@javax.annotation.Nullable TimeSeriesChartXAxisSettings xaxis) { - this.xaxis = xaxis; - } - - public ReportTimeSeriesChartSettings yaxes(@javax.annotation.Nullable Map yaxes) { this.yaxes = yaxes; return this; @@ -645,6 +621,30 @@ public void setYaxes(@javax.annotation.Nullable Map thresholds) { this.thresholds = thresholds; return this; @@ -913,8 +913,8 @@ public boolean equals(Object o) { Objects.equals(this.legendLabelColor, reportTimeSeriesChartSettings.legendLabelColor) && Objects.equals(this.legendValueFont, reportTimeSeriesChartSettings.legendValueFont) && Objects.equals(this.legendValueColor, reportTimeSeriesChartSettings.legendValueColor) && - Objects.equals(this.xaxis, reportTimeSeriesChartSettings.xaxis) && Objects.equals(this.yaxes, reportTimeSeriesChartSettings.yaxes) && + Objects.equals(this.xaxis, reportTimeSeriesChartSettings.xaxis) && Objects.equals(this.thresholds, reportTimeSeriesChartSettings.thresholds) && Objects.equals(this.grid, reportTimeSeriesChartSettings.grid) && Objects.equals(this.yAxes, reportTimeSeriesChartSettings.yAxes) && @@ -928,7 +928,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(showTitle, title, titleFont, titleColor, titleAlignment, stack, comparisonEnabled, timeForComparison, comparisonCustomIntervalValue, showLegend, legendColumnTitleFont, legendColumnTitleColor, legendLabelFont, legendLabelColor, legendValueFont, legendValueColor, xaxis, yaxes, thresholds, grid, yAxes, xAxis, barWidthSettings, noAggregationBarWidthSettings, states, comparisonXAxis, legendConfig); + return Objects.hash(showTitle, title, titleFont, titleColor, titleAlignment, stack, comparisonEnabled, timeForComparison, comparisonCustomIntervalValue, showLegend, legendColumnTitleFont, legendColumnTitleColor, legendLabelFont, legendLabelColor, legendValueFont, legendValueColor, yaxes, xaxis, thresholds, grid, yAxes, xAxis, barWidthSettings, noAggregationBarWidthSettings, states, comparisonXAxis, legendConfig); } @Override @@ -951,8 +951,8 @@ public String toString() { sb.append(" legendLabelColor: ").append(toIndentedString(legendLabelColor)).append("\n"); sb.append(" legendValueFont: ").append(toIndentedString(legendValueFont)).append("\n"); sb.append(" legendValueColor: ").append(toIndentedString(legendValueColor)).append("\n"); - sb.append(" xaxis: ").append(toIndentedString(xaxis)).append("\n"); sb.append(" yaxes: ").append(toIndentedString(yaxes)).append("\n"); + sb.append(" xaxis: ").append(toIndentedString(xaxis)).append("\n"); sb.append(" thresholds: ").append(toIndentedString(thresholds)).append("\n"); sb.append(" grid: ").append(toIndentedString(grid)).append("\n"); sb.append(" yAxes: ").append(toIndentedString(yAxes)).append("\n"); @@ -1089,11 +1089,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%slegendValueColor%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLegendValueColor())))); } - // add `xaxis` to the URL query string - if (getXaxis() != null) { - joiner.add(getXaxis().toUrlQueryString(prefix + "xaxis" + suffix)); - } - // add `yaxes` to the URL query string if (getYaxes() != null) { for (String _key : getYaxes().keySet()) { @@ -1104,6 +1099,11 @@ public String toUrlQueryString(String prefix) { } } + // add `xaxis` to the URL query string + if (getXaxis() != null) { + joiner.add(getXaxis().toUrlQueryString(prefix + "xaxis" + suffix)); + } + // add `thresholds` to the URL query string if (getThresholds() != null) { for (int i = 0; i < getThresholds().size(); i++) { diff --git a/paas/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java index fec24a83..2648f043 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public ResourceShortageRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public ResourceShortageRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/paas/src/main/java/org/thingsboard/client/model/Role.java b/paas/src/main/java/org/thingsboard/client/model/Role.java index 83d7b32e..fa769846 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Role.java +++ b/paas/src/main/java/org/thingsboard/client/model/Role.java @@ -100,14 +100,12 @@ public Role() { public Role( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime ) { this(); this.tenantId = tenantId; this.customerId = customerId; this.createdTime = createdTime; - this.ownerId = ownerId; } /** @@ -272,6 +270,11 @@ public Long getCreatedTime() { + public Role ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -284,6 +287,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public Role additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/RoleId.java b/paas/src/main/java/org/thingsboard/client/model/RoleId.java index 11ce9b7f..dcda95f8 100644 --- a/paas/src/main/java/org/thingsboard/client/model/RoleId.java +++ b/paas/src/main/java/org/thingsboard/client/model/RoleId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * RoleId */ @JsonPropertyOrder({ - RoleId.JSON_PROPERTY_ID, - RoleId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class RoleId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class RoleId extends EntityId { public RoleId() { } + @Override public RoleId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public RoleId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this RoleId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RoleId roleId = (RoleId) o; - return Objects.equals(this.id, roleId.id) && - Objects.equals(this.entityType, roleId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RoleId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RoleId", RoleId.class); + JSON.registerDiscriminator(RoleId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/RpcId.java b/paas/src/main/java/org/thingsboard/client/model/RpcId.java index 1239c609..fd1aeb41 100644 --- a/paas/src/main/java/org/thingsboard/client/model/RpcId.java +++ b/paas/src/main/java/org/thingsboard/client/model/RpcId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * RpcId */ @JsonPropertyOrder({ - RpcId.JSON_PROPERTY_ID, - RpcId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class RpcId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class RpcId extends EntityId { public RpcId() { } + @Override public RpcId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public RpcId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this RpcId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RpcId rpcId = (RpcId) o; - return Objects.equals(this.id, rpcId.id) && - Objects.equals(this.entityType, rpcId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RpcId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RpcId", RpcId.class); + JSON.registerDiscriminator(RpcId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java b/paas/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java index 833de14b..fb6e8069 100644 --- a/paas/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java +++ b/paas/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java @@ -44,8 +44,8 @@ RuleChainDebugEventFilter.JSON_PROPERTY_SERVER, RuleChainDebugEventFilter.JSON_PROPERTY_ERROR_STR, RuleChainDebugEventFilter.JSON_PROPERTY_MESSAGE, - RuleChainDebugEventFilter.JSON_PROPERTY_IS_ERROR, - RuleChainDebugEventFilter.JSON_PROPERTY_ERROR + RuleChainDebugEventFilter.JSON_PROPERTY_ERROR, + RuleChainDebugEventFilter.JSON_PROPERTY_IS_ERROR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -67,14 +67,14 @@ public class RuleChainDebugEventFilter extends EventFilter { @javax.annotation.Nullable private String message; - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public static final String JSON_PROPERTY_ERROR = "error"; @javax.annotation.Nullable private Boolean error; + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private Boolean isError; + public RuleChainDebugEventFilter() { } @@ -150,51 +150,51 @@ public void setMessage(@javax.annotation.Nullable String message) { } - public RuleChainDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public RuleChainDebugEventFilter error(@javax.annotation.Nullable Boolean error) { + this.error = error; return this; } /** - * Get isError - * @return isError + * Get error + * @return error */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; + public Boolean getError() { + return error; } - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public void setError(@javax.annotation.Nullable Boolean error) { + this.error = error; } - public RuleChainDebugEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; + public RuleChainDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; return this; } /** - * Get error - * @return error + * Get isError + * @return isError */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; + public Boolean getIsError() { + return isError; } - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; + public void setIsError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; } @@ -225,14 +225,14 @@ public boolean equals(Object o) { return Objects.equals(this.server, ruleChainDebugEventFilter.server) && Objects.equals(this.errorStr, ruleChainDebugEventFilter.errorStr) && Objects.equals(this.message, ruleChainDebugEventFilter.message) && - Objects.equals(this.isError, ruleChainDebugEventFilter.isError) && Objects.equals(this.error, ruleChainDebugEventFilter.error) && + Objects.equals(this.isError, ruleChainDebugEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, message, isError, error, super.hashCode()); + return Objects.hash(server, errorStr, message, error, isError, super.hashCode()); } @Override @@ -243,8 +243,8 @@ public String toString() { sb.append(" server: ").append(toIndentedString(server)).append("\n"); sb.append(" errorStr: ").append(toIndentedString(errorStr)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -317,16 +317,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); } - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - // add `error` to the URL query string if (getError() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/RuleChainId.java b/paas/src/main/java/org/thingsboard/client/model/RuleChainId.java index 2eb75b35..7299e140 100644 --- a/paas/src/main/java/org/thingsboard/client/model/RuleChainId.java +++ b/paas/src/main/java/org/thingsboard/client/model/RuleChainId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * RuleChainId */ @JsonPropertyOrder({ - RuleChainId.JSON_PROPERTY_ID, - RuleChainId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class RuleChainId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class RuleChainId extends EntityId { public RuleChainId() { } + @Override public RuleChainId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public RuleChainId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this RuleChainId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RuleChainId ruleChainId = (RuleChainId) o; - return Objects.equals(this.id, ruleChainId.id) && - Objects.equals(this.entityType, ruleChainId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RuleChainId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RuleChainId", RuleChainId.class); + JSON.registerDiscriminator(RuleChainId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java index ba2ded17..ecb3241e 100644 --- a/paas/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public RuleEngineComponentLifecycleEventRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public RuleEngineComponentLifecycleEventRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/paas/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java b/paas/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java index 2bb03d17..3ce2fe1f 100644 --- a/paas/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java +++ b/paas/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java @@ -51,8 +51,8 @@ RuleNodeDebugEventFilter.JSON_PROPERTY_RELATION_TYPE, RuleNodeDebugEventFilter.JSON_PROPERTY_DATA_SEARCH, RuleNodeDebugEventFilter.JSON_PROPERTY_METADATA_SEARCH, - RuleNodeDebugEventFilter.JSON_PROPERTY_IS_ERROR, - RuleNodeDebugEventFilter.JSON_PROPERTY_ERROR + RuleNodeDebugEventFilter.JSON_PROPERTY_ERROR, + RuleNodeDebugEventFilter.JSON_PROPERTY_IS_ERROR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -170,14 +170,14 @@ public static EntityTypeEnum fromValue(String value) { @javax.annotation.Nullable private String metadataSearch; - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public static final String JSON_PROPERTY_ERROR = "error"; @javax.annotation.Nullable private Boolean error; + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private Boolean isError; + public RuleNodeDebugEventFilter() { } @@ -421,51 +421,51 @@ public void setMetadataSearch(@javax.annotation.Nullable String metadataSearch) } - public RuleNodeDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public RuleNodeDebugEventFilter error(@javax.annotation.Nullable Boolean error) { + this.error = error; return this; } /** - * Get isError - * @return isError + * Get error + * @return error */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; + public Boolean getError() { + return error; } - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public void setError(@javax.annotation.Nullable Boolean error) { + this.error = error; } - public RuleNodeDebugEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; + public RuleNodeDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; return this; } /** - * Get error - * @return error + * Get isError + * @return isError */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; + public Boolean getIsError() { + return isError; } - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; + public void setIsError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; } @@ -503,14 +503,14 @@ public boolean equals(Object o) { Objects.equals(this.relationType, ruleNodeDebugEventFilter.relationType) && Objects.equals(this.dataSearch, ruleNodeDebugEventFilter.dataSearch) && Objects.equals(this.metadataSearch, ruleNodeDebugEventFilter.metadataSearch) && - Objects.equals(this.isError, ruleNodeDebugEventFilter.isError) && Objects.equals(this.error, ruleNodeDebugEventFilter.error) && + Objects.equals(this.isError, ruleNodeDebugEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, msgDirectionType, entityId, entityType, msgId, msgType, relationType, dataSearch, metadataSearch, isError, error, super.hashCode()); + return Objects.hash(server, errorStr, msgDirectionType, entityId, entityType, msgId, msgType, relationType, dataSearch, metadataSearch, error, isError, super.hashCode()); } @Override @@ -528,8 +528,8 @@ public String toString() { sb.append(" relationType: ").append(toIndentedString(relationType)).append("\n"); sb.append(" dataSearch: ").append(toIndentedString(dataSearch)).append("\n"); sb.append(" metadataSearch: ").append(toIndentedString(metadataSearch)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -637,16 +637,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smetadataSearch%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMetadataSearch())))); } - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - // add `error` to the URL query string if (getError() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/RuleNodeId.java b/paas/src/main/java/org/thingsboard/client/model/RuleNodeId.java index 958781cb..4f370578 100644 --- a/paas/src/main/java/org/thingsboard/client/model/RuleNodeId.java +++ b/paas/src/main/java/org/thingsboard/client/model/RuleNodeId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * RuleNodeId */ @JsonPropertyOrder({ - RuleNodeId.JSON_PROPERTY_ID, - RuleNodeId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class RuleNodeId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class RuleNodeId extends EntityId { public RuleNodeId() { } + @Override public RuleNodeId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public RuleNodeId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this RuleNodeId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RuleNodeId ruleNodeId = (RuleNodeId) o; - return Objects.equals(this.id, ruleNodeId.id) && - Objects.equals(this.entityType, ruleNodeId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RuleNodeId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RuleNodeId", RuleNodeId.class); + JSON.registerDiscriminator(RuleNodeId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java b/paas/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java index c8a0ede2..666f0815 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java @@ -126,21 +126,17 @@ public ScheduledReportInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, @JsonProperty(JSON_PROPERTY_TEMPLATE_INFO) EntityInfo templateInfo, @JsonProperty(JSON_PROPERTY_CUSTOMER_TITLE) String customerTitle, - @JsonProperty(JSON_PROPERTY_USER_NAME) String userName, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_USER_NAME) String userName ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; - this.originatorId = originatorId; this.templateInfo = templateInfo; this.customerTitle = customerTitle; this.userName = userName; - this.ownerId = ownerId; } public ScheduledReportInfo id(@javax.annotation.Nullable SchedulerEventId id) { @@ -209,6 +205,11 @@ public CustomerId getCustomerId() { + public ScheduledReportInfo originatorId(@javax.annotation.Nullable EntityId originatorId) { + this.originatorId = originatorId; + return this; + } + /** * JSON object with Originator Id * @return originatorId @@ -221,6 +222,11 @@ public EntityId getOriginatorId() { } + @JsonProperty(value = JSON_PROPERTY_ORIGINATOR_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOriginatorId(@javax.annotation.Nullable EntityId originatorId) { + this.originatorId = originatorId; + } public ScheduledReportInfo name(@javax.annotation.Nullable String name) { @@ -385,6 +391,11 @@ public String getUserName() { + public ScheduledReportInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -397,6 +408,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public ScheduledReportInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/SchedulerEvent.java b/paas/src/main/java/org/thingsboard/client/model/SchedulerEvent.java index 4ba83359..320fd250 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SchedulerEvent.java +++ b/paas/src/main/java/org/thingsboard/client/model/SchedulerEvent.java @@ -114,16 +114,12 @@ public SchedulerEvent() { public SchedulerEvent( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; - this.originatorId = originatorId; - this.ownerId = ownerId; } public SchedulerEvent id(@javax.annotation.Nullable SchedulerEventId id) { @@ -192,6 +188,11 @@ public CustomerId getCustomerId() { + public SchedulerEvent originatorId(@javax.annotation.Nullable EntityId originatorId) { + this.originatorId = originatorId; + return this; + } + /** * JSON object with Originator Id * @return originatorId @@ -204,6 +205,11 @@ public EntityId getOriginatorId() { } + @JsonProperty(value = JSON_PROPERTY_ORIGINATOR_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOriginatorId(@javax.annotation.Nullable EntityId originatorId) { + this.originatorId = originatorId; + } public SchedulerEvent name(@javax.annotation.Nullable String name) { @@ -350,6 +356,11 @@ public void setConfiguration(@javax.annotation.Nullable com.fasterxml.jackson.da } + public SchedulerEvent ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -362,6 +373,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public SchedulerEvent additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/SchedulerEventId.java b/paas/src/main/java/org/thingsboard/client/model/SchedulerEventId.java index f2e94e09..3f7afdd4 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SchedulerEventId.java +++ b/paas/src/main/java/org/thingsboard/client/model/SchedulerEventId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * SchedulerEventId */ @JsonPropertyOrder({ - SchedulerEventId.JSON_PROPERTY_ID, - SchedulerEventId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class SchedulerEventId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class SchedulerEventId extends EntityId { public SchedulerEventId() { } + @Override public SchedulerEventId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public SchedulerEventId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this SchedulerEventId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SchedulerEventId schedulerEventId = (SchedulerEventId) o; - return Objects.equals(this.id, schedulerEventId.id) && - Objects.equals(this.entityType, schedulerEventId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SchedulerEventId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("SchedulerEventId", SchedulerEventId.class); + JSON.registerDiscriminator(SchedulerEventId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java b/paas/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java index 376887d7..cfcd9048 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java @@ -109,16 +109,12 @@ public SchedulerEventInfo() { public SchedulerEventInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; - this.originatorId = originatorId; - this.ownerId = ownerId; } public SchedulerEventInfo id(@javax.annotation.Nullable SchedulerEventId id) { @@ -187,6 +183,11 @@ public CustomerId getCustomerId() { + public SchedulerEventInfo originatorId(@javax.annotation.Nullable EntityId originatorId) { + this.originatorId = originatorId; + return this; + } + /** * JSON object with Originator Id * @return originatorId @@ -199,6 +200,11 @@ public EntityId getOriginatorId() { } + @JsonProperty(value = JSON_PROPERTY_ORIGINATOR_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOriginatorId(@javax.annotation.Nullable EntityId originatorId) { + this.originatorId = originatorId; + } public SchedulerEventInfo name(@javax.annotation.Nullable String name) { @@ -321,6 +327,11 @@ public void setVersion(@javax.annotation.Nullable Long version) { } + public SchedulerEventInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -333,6 +344,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public SchedulerEventInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java b/paas/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java index 82d5bc53..01c75b25 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java @@ -127,17 +127,13 @@ public SchedulerEventWithCustomerInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_IS_PUBLIC) Boolean customerIsPublic, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_IS_PUBLIC) Boolean customerIsPublic ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; - this.originatorId = originatorId; this.customerIsPublic = customerIsPublic; - this.ownerId = ownerId; } public SchedulerEventWithCustomerInfo id(@javax.annotation.Nullable SchedulerEventId id) { @@ -206,6 +202,11 @@ public CustomerId getCustomerId() { + public SchedulerEventWithCustomerInfo originatorId(@javax.annotation.Nullable EntityId originatorId) { + this.originatorId = originatorId; + return this; + } + /** * JSON object with Originator Id * @return originatorId @@ -218,6 +219,11 @@ public EntityId getOriginatorId() { } + @JsonProperty(value = JSON_PROPERTY_ORIGINATOR_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOriginatorId(@javax.annotation.Nullable EntityId originatorId) { + this.originatorId = originatorId; + } public SchedulerEventWithCustomerInfo name(@javax.annotation.Nullable String name) { @@ -410,6 +416,11 @@ public void setTimestamps(@javax.annotation.Nullable List timestamps) { } + public SchedulerEventWithCustomerInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -422,6 +433,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public SchedulerEventWithCustomerInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/ScriptCalculatedFieldConfiguration.java b/paas/src/main/java/org/thingsboard/client/model/ScriptCalculatedFieldConfiguration.java index b8c38311..0b6c4418 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ScriptCalculatedFieldConfiguration.java +++ b/paas/src/main/java/org/thingsboard/client/model/ScriptCalculatedFieldConfiguration.java @@ -123,14 +123,14 @@ public void setExpression(@javax.annotation.Nullable String expression) { @Override - public ScriptCalculatedFieldConfiguration aiGenerated(@javax.annotation.Nullable Boolean aiGenerated) { - this.setAiGenerated(aiGenerated); + public ScriptCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { + this.setOutput(output); return this; } @Override - public ScriptCalculatedFieldConfiguration output(@javax.annotation.Nonnull Output output) { - this.setOutput(output); + public ScriptCalculatedFieldConfiguration aiGenerated(@javax.annotation.Nullable Boolean aiGenerated) { + this.setAiGenerated(aiGenerated); return this; } @@ -216,16 +216,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `aiGenerated` to the URL query string - if (getAiGenerated() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%saiGenerated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAiGenerated())))); - } - // add `output` to the URL query string if (getOutput() != null) { joiner.add(getOutput().toUrlQueryString(prefix + "output" + suffix)); } + // add `aiGenerated` to the URL query string + if (getAiGenerated() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%saiGenerated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAiGenerated())))); + } + // add `type` to the URL query string if (getType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); diff --git a/paas/src/main/java/org/thingsboard/client/model/SecretId.java b/paas/src/main/java/org/thingsboard/client/model/SecretId.java index cb4fd334..2871141a 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SecretId.java +++ b/paas/src/main/java/org/thingsboard/client/model/SecretId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * SecretId */ @JsonPropertyOrder({ - SecretId.JSON_PROPERTY_ID, - SecretId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class SecretId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class SecretId extends EntityId { public SecretId() { } + @Override public SecretId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public SecretId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this SecretId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecretId secretId = (SecretId) o; - return Objects.equals(this.id, secretId.id) && - Objects.equals(this.entityType, secretId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SecretId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("SecretId", SecretId.class); + JSON.registerDiscriminator(SecretId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/SelfRegistrationParams.java b/paas/src/main/java/org/thingsboard/client/model/SelfRegistrationParams.java index b81fc8a4..54b3295c 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SelfRegistrationParams.java +++ b/paas/src/main/java/org/thingsboard/client/model/SelfRegistrationParams.java @@ -50,20 +50,20 @@ * SelfRegistrationParams */ @JsonPropertyOrder({ - SelfRegistrationParams.JSON_PROPERTY_PERMISSIONS, SelfRegistrationParams.JSON_PROPERTY_TYPE, - SelfRegistrationParams.JSON_PROPERTY_SHOW_PRIVACY_POLICY, - SelfRegistrationParams.JSON_PROPERTY_SHOW_TERMS_OF_USE, - SelfRegistrationParams.JSON_PROPERTY_TITLE, SelfRegistrationParams.JSON_PROPERTY_ENABLED, - SelfRegistrationParams.JSON_PROPERTY_HOME_DASHBOARD, - SelfRegistrationParams.JSON_PROPERTY_NOTIFICATION_RECIPIENT, + SelfRegistrationParams.JSON_PROPERTY_TITLE, SelfRegistrationParams.JSON_PROPERTY_CAPTCHA, + SelfRegistrationParams.JSON_PROPERTY_PERMISSIONS, + SelfRegistrationParams.JSON_PROPERTY_NOTIFICATION_RECIPIENT, SelfRegistrationParams.JSON_PROPERTY_SIGN_UP_FIELDS, - SelfRegistrationParams.JSON_PROPERTY_DEFAULT_DASHBOARD, SelfRegistrationParams.JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, - SelfRegistrationParams.JSON_PROPERTY_CUSTOM_MENU_ID, - SelfRegistrationParams.JSON_PROPERTY_CUSTOMER_GROUP_ID + SelfRegistrationParams.JSON_PROPERTY_SHOW_PRIVACY_POLICY, + SelfRegistrationParams.JSON_PROPERTY_SHOW_TERMS_OF_USE, + SelfRegistrationParams.JSON_PROPERTY_DEFAULT_DASHBOARD, + SelfRegistrationParams.JSON_PROPERTY_HOME_DASHBOARD, + SelfRegistrationParams.JSON_PROPERTY_CUSTOMER_GROUP_ID, + SelfRegistrationParams.JSON_PROPERTY_CUSTOM_MENU_ID }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -77,97 +77,65 @@ }) public class SelfRegistrationParams { - public static final String JSON_PROPERTY_PERMISSIONS = "permissions"; - @javax.annotation.Nullable - private List permissions = new ArrayList<>(); - public static final String JSON_PROPERTY_TYPE = "type"; @javax.annotation.Nonnull private SelfRegistrationType type; - public static final String JSON_PROPERTY_SHOW_PRIVACY_POLICY = "showPrivacyPolicy"; - @javax.annotation.Nullable - private Boolean showPrivacyPolicy; - - public static final String JSON_PROPERTY_SHOW_TERMS_OF_USE = "showTermsOfUse"; + public static final String JSON_PROPERTY_ENABLED = "enabled"; @javax.annotation.Nullable - private Boolean showTermsOfUse; + private Boolean enabled; public static final String JSON_PROPERTY_TITLE = "title"; @javax.annotation.Nullable private String title; - public static final String JSON_PROPERTY_ENABLED = "enabled"; + public static final String JSON_PROPERTY_CAPTCHA = "captcha"; @javax.annotation.Nullable - private Boolean enabled; + private CaptchaParams captcha; - public static final String JSON_PROPERTY_HOME_DASHBOARD = "homeDashboard"; + public static final String JSON_PROPERTY_PERMISSIONS = "permissions"; @javax.annotation.Nullable - private HomeDashboardParams homeDashboard; + private List permissions = new ArrayList<>(); public static final String JSON_PROPERTY_NOTIFICATION_RECIPIENT = "notificationRecipient"; @javax.annotation.Nullable private NotificationTargetId notificationRecipient; - public static final String JSON_PROPERTY_CAPTCHA = "captcha"; - @javax.annotation.Nullable - private CaptchaParams captcha; - public static final String JSON_PROPERTY_SIGN_UP_FIELDS = "signUpFields"; @javax.annotation.Nullable private List signUpFields = new ArrayList<>(); - public static final String JSON_PROPERTY_DEFAULT_DASHBOARD = "defaultDashboard"; - @javax.annotation.Nullable - private DefaultDashboardParams defaultDashboard; - public static final String JSON_PROPERTY_CUSTOMER_TITLE_PREFIX = "customerTitlePrefix"; @javax.annotation.Nullable private String customerTitlePrefix; - public static final String JSON_PROPERTY_CUSTOM_MENU_ID = "customMenuId"; + public static final String JSON_PROPERTY_SHOW_PRIVACY_POLICY = "showPrivacyPolicy"; @javax.annotation.Nullable - private CustomMenuId customMenuId; + private Boolean showPrivacyPolicy; - public static final String JSON_PROPERTY_CUSTOMER_GROUP_ID = "customerGroupId"; + public static final String JSON_PROPERTY_SHOW_TERMS_OF_USE = "showTermsOfUse"; @javax.annotation.Nullable - private EntityGroupId customerGroupId; - - public SelfRegistrationParams() { - } + private Boolean showTermsOfUse; - public SelfRegistrationParams permissions(@javax.annotation.Nullable List permissions) { - this.permissions = permissions; - return this; - } + public static final String JSON_PROPERTY_DEFAULT_DASHBOARD = "defaultDashboard"; + @javax.annotation.Nullable + private DefaultDashboardParams defaultDashboard; - public SelfRegistrationParams addPermissionsItem(GroupPermission permissionsItem) { - if (this.permissions == null) { - this.permissions = new ArrayList<>(); - } - this.permissions.add(permissionsItem); - return this; - } + public static final String JSON_PROPERTY_HOME_DASHBOARD = "homeDashboard"; + @javax.annotation.Nullable + private HomeDashboardParams homeDashboard; - /** - * Get permissions - * @return permissions - */ + public static final String JSON_PROPERTY_CUSTOMER_GROUP_ID = "customerGroupId"; @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PERMISSIONS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPermissions() { - return permissions; - } + private EntityGroupId customerGroupId; + public static final String JSON_PROPERTY_CUSTOM_MENU_ID = "customMenuId"; + @javax.annotation.Nullable + private CustomMenuId customMenuId; - @JsonProperty(value = JSON_PROPERTY_PERMISSIONS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPermissions(@javax.annotation.Nullable List permissions) { - this.permissions = permissions; + public SelfRegistrationParams() { } - public SelfRegistrationParams type(@javax.annotation.Nonnull SelfRegistrationType type) { this.type = type; return this; @@ -192,51 +160,27 @@ public void setType(@javax.annotation.Nonnull SelfRegistrationType type) { } - public SelfRegistrationParams showPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { - this.showPrivacyPolicy = showPrivacyPolicy; - return this; - } - - /** - * Get showPrivacyPolicy - * @return showPrivacyPolicy - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SHOW_PRIVACY_POLICY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowPrivacyPolicy() { - return showPrivacyPolicy; - } - - - @JsonProperty(value = JSON_PROPERTY_SHOW_PRIVACY_POLICY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { - this.showPrivacyPolicy = showPrivacyPolicy; - } - - - public SelfRegistrationParams showTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { - this.showTermsOfUse = showTermsOfUse; + public SelfRegistrationParams enabled(@javax.annotation.Nullable Boolean enabled) { + this.enabled = enabled; return this; } /** - * Get showTermsOfUse - * @return showTermsOfUse + * Get enabled + * @return enabled */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SHOW_TERMS_OF_USE, required = false) + @JsonProperty(value = JSON_PROPERTY_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowTermsOfUse() { - return showTermsOfUse; + public Boolean getEnabled() { + return enabled; } - @JsonProperty(value = JSON_PROPERTY_SHOW_TERMS_OF_USE, required = false) + @JsonProperty(value = JSON_PROPERTY_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { - this.showTermsOfUse = showTermsOfUse; + public void setEnabled(@javax.annotation.Nullable Boolean enabled) { + this.enabled = enabled; } @@ -264,51 +208,59 @@ public void setTitle(@javax.annotation.Nullable String title) { } - public SelfRegistrationParams enabled(@javax.annotation.Nullable Boolean enabled) { - this.enabled = enabled; + public SelfRegistrationParams captcha(@javax.annotation.Nullable CaptchaParams captcha) { + this.captcha = captcha; return this; } /** - * Get enabled - * @return enabled + * Get captcha + * @return captcha */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEnabled() { - return enabled; + public CaptchaParams getCaptcha() { + return captcha; } - @JsonProperty(value = JSON_PROPERTY_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEnabled(@javax.annotation.Nullable Boolean enabled) { - this.enabled = enabled; + public void setCaptcha(@javax.annotation.Nullable CaptchaParams captcha) { + this.captcha = captcha; } - public SelfRegistrationParams homeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { - this.homeDashboard = homeDashboard; + public SelfRegistrationParams permissions(@javax.annotation.Nullable List permissions) { + this.permissions = permissions; + return this; + } + + public SelfRegistrationParams addPermissionsItem(GroupPermission permissionsItem) { + if (this.permissions == null) { + this.permissions = new ArrayList<>(); + } + this.permissions.add(permissionsItem); return this; } /** - * Get homeDashboard - * @return homeDashboard + * Get permissions + * @return permissions */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_HOME_DASHBOARD, required = false) + @JsonProperty(value = JSON_PROPERTY_PERMISSIONS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HomeDashboardParams getHomeDashboard() { - return homeDashboard; + public List getPermissions() { + return permissions; } - @JsonProperty(value = JSON_PROPERTY_HOME_DASHBOARD, required = false) + @JsonProperty(value = JSON_PROPERTY_PERMISSIONS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHomeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { - this.homeDashboard = homeDashboard; + public void setPermissions(@javax.annotation.Nullable List permissions) { + this.permissions = permissions; } @@ -336,30 +288,6 @@ public void setNotificationRecipient(@javax.annotation.Nullable NotificationTarg } - public SelfRegistrationParams captcha(@javax.annotation.Nullable CaptchaParams captcha) { - this.captcha = captcha; - return this; - } - - /** - * Get captcha - * @return captcha - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CaptchaParams getCaptcha() { - return captcha; - } - - - @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCaptcha(@javax.annotation.Nullable CaptchaParams captcha) { - this.captcha = captcha; - } - - public SelfRegistrationParams signUpFields(@javax.annotation.Nullable List signUpFields) { this.signUpFields = signUpFields; return this; @@ -392,75 +320,123 @@ public void setSignUpFields(@javax.annotation.Nullable List signUpF } - public SelfRegistrationParams defaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { - this.defaultDashboard = defaultDashboard; + public SelfRegistrationParams customerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { + this.customerTitlePrefix = customerTitlePrefix; return this; } /** - * Get defaultDashboard - * @return defaultDashboard + * Get customerTitlePrefix + * @return customerTitlePrefix */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DEFAULT_DASHBOARD, required = false) + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DefaultDashboardParams getDefaultDashboard() { - return defaultDashboard; + public String getCustomerTitlePrefix() { + return customerTitlePrefix; } - @JsonProperty(value = JSON_PROPERTY_DEFAULT_DASHBOARD, required = false) + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDefaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { - this.defaultDashboard = defaultDashboard; + public void setCustomerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { + this.customerTitlePrefix = customerTitlePrefix; } - public SelfRegistrationParams customerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { - this.customerTitlePrefix = customerTitlePrefix; + public SelfRegistrationParams showPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { + this.showPrivacyPolicy = showPrivacyPolicy; return this; } /** - * Get customerTitlePrefix - * @return customerTitlePrefix + * Get showPrivacyPolicy + * @return showPrivacyPolicy */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, required = false) + @JsonProperty(value = JSON_PROPERTY_SHOW_PRIVACY_POLICY, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCustomerTitlePrefix() { - return customerTitlePrefix; + public Boolean getShowPrivacyPolicy() { + return showPrivacyPolicy; } - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, required = false) + @JsonProperty(value = JSON_PROPERTY_SHOW_PRIVACY_POLICY, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { - this.customerTitlePrefix = customerTitlePrefix; + public void setShowPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { + this.showPrivacyPolicy = showPrivacyPolicy; } - public SelfRegistrationParams customMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { - this.customMenuId = customMenuId; + public SelfRegistrationParams showTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { + this.showTermsOfUse = showTermsOfUse; return this; } /** - * Get customMenuId - * @return customMenuId + * Get showTermsOfUse + * @return showTermsOfUse */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOM_MENU_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_SHOW_TERMS_OF_USE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CustomMenuId getCustomMenuId() { - return customMenuId; + public Boolean getShowTermsOfUse() { + return showTermsOfUse; } - @JsonProperty(value = JSON_PROPERTY_CUSTOM_MENU_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_SHOW_TERMS_OF_USE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { - this.customMenuId = customMenuId; + public void setShowTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { + this.showTermsOfUse = showTermsOfUse; + } + + + public SelfRegistrationParams defaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { + this.defaultDashboard = defaultDashboard; + return this; + } + + /** + * Get defaultDashboard + * @return defaultDashboard + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_DEFAULT_DASHBOARD, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DefaultDashboardParams getDefaultDashboard() { + return defaultDashboard; + } + + + @JsonProperty(value = JSON_PROPERTY_DEFAULT_DASHBOARD, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { + this.defaultDashboard = defaultDashboard; + } + + + public SelfRegistrationParams homeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { + this.homeDashboard = homeDashboard; + return this; + } + + /** + * Get homeDashboard + * @return homeDashboard + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_HOME_DASHBOARD, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public HomeDashboardParams getHomeDashboard() { + return homeDashboard; + } + + + @JsonProperty(value = JSON_PROPERTY_HOME_DASHBOARD, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHomeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { + this.homeDashboard = homeDashboard; } @@ -488,6 +464,30 @@ public void setCustomerGroupId(@javax.annotation.Nullable EntityGroupId customer } + public SelfRegistrationParams customMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { + this.customMenuId = customMenuId; + return this; + } + + /** + * Get customMenuId + * @return customMenuId + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_CUSTOM_MENU_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CustomMenuId getCustomMenuId() { + return customMenuId; + } + + + @JsonProperty(value = JSON_PROPERTY_CUSTOM_MENU_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { + this.customMenuId = customMenuId; + } + + /** * Return true if this SelfRegistrationParams object is equal to o. */ @@ -500,45 +500,45 @@ public boolean equals(Object o) { return false; } SelfRegistrationParams selfRegistrationParams = (SelfRegistrationParams) o; - return Objects.equals(this.permissions, selfRegistrationParams.permissions) && - Objects.equals(this.type, selfRegistrationParams.type) && - Objects.equals(this.showPrivacyPolicy, selfRegistrationParams.showPrivacyPolicy) && - Objects.equals(this.showTermsOfUse, selfRegistrationParams.showTermsOfUse) && - Objects.equals(this.title, selfRegistrationParams.title) && + return Objects.equals(this.type, selfRegistrationParams.type) && Objects.equals(this.enabled, selfRegistrationParams.enabled) && - Objects.equals(this.homeDashboard, selfRegistrationParams.homeDashboard) && - Objects.equals(this.notificationRecipient, selfRegistrationParams.notificationRecipient) && + Objects.equals(this.title, selfRegistrationParams.title) && Objects.equals(this.captcha, selfRegistrationParams.captcha) && + Objects.equals(this.permissions, selfRegistrationParams.permissions) && + Objects.equals(this.notificationRecipient, selfRegistrationParams.notificationRecipient) && Objects.equals(this.signUpFields, selfRegistrationParams.signUpFields) && - Objects.equals(this.defaultDashboard, selfRegistrationParams.defaultDashboard) && Objects.equals(this.customerTitlePrefix, selfRegistrationParams.customerTitlePrefix) && - Objects.equals(this.customMenuId, selfRegistrationParams.customMenuId) && - Objects.equals(this.customerGroupId, selfRegistrationParams.customerGroupId); + Objects.equals(this.showPrivacyPolicy, selfRegistrationParams.showPrivacyPolicy) && + Objects.equals(this.showTermsOfUse, selfRegistrationParams.showTermsOfUse) && + Objects.equals(this.defaultDashboard, selfRegistrationParams.defaultDashboard) && + Objects.equals(this.homeDashboard, selfRegistrationParams.homeDashboard) && + Objects.equals(this.customerGroupId, selfRegistrationParams.customerGroupId) && + Objects.equals(this.customMenuId, selfRegistrationParams.customMenuId); } @Override public int hashCode() { - return Objects.hash(permissions, type, showPrivacyPolicy, showTermsOfUse, title, enabled, homeDashboard, notificationRecipient, captcha, signUpFields, defaultDashboard, customerTitlePrefix, customMenuId, customerGroupId); + return Objects.hash(type, enabled, title, captcha, permissions, notificationRecipient, signUpFields, customerTitlePrefix, showPrivacyPolicy, showTermsOfUse, defaultDashboard, homeDashboard, customerGroupId, customMenuId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SelfRegistrationParams {\n"); - sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" showPrivacyPolicy: ").append(toIndentedString(showPrivacyPolicy)).append("\n"); - sb.append(" showTermsOfUse: ").append(toIndentedString(showTermsOfUse)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" homeDashboard: ").append(toIndentedString(homeDashboard)).append("\n"); - sb.append(" notificationRecipient: ").append(toIndentedString(notificationRecipient)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" captcha: ").append(toIndentedString(captcha)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); + sb.append(" notificationRecipient: ").append(toIndentedString(notificationRecipient)).append("\n"); sb.append(" signUpFields: ").append(toIndentedString(signUpFields)).append("\n"); - sb.append(" defaultDashboard: ").append(toIndentedString(defaultDashboard)).append("\n"); sb.append(" customerTitlePrefix: ").append(toIndentedString(customerTitlePrefix)).append("\n"); - sb.append(" customMenuId: ").append(toIndentedString(customMenuId)).append("\n"); + sb.append(" showPrivacyPolicy: ").append(toIndentedString(showPrivacyPolicy)).append("\n"); + sb.append(" showTermsOfUse: ").append(toIndentedString(showTermsOfUse)).append("\n"); + sb.append(" defaultDashboard: ").append(toIndentedString(defaultDashboard)).append("\n"); + sb.append(" homeDashboard: ").append(toIndentedString(homeDashboard)).append("\n"); sb.append(" customerGroupId: ").append(toIndentedString(customerGroupId)).append("\n"); + sb.append(" customMenuId: ").append(toIndentedString(customMenuId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -586,29 +586,14 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `permissions` to the URL query string - if (getPermissions() != null) { - for (int i = 0; i < getPermissions().size(); i++) { - if (getPermissions().get(i) != null) { - joiner.add(getPermissions().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%spermissions%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - // add `type` to the URL query string if (getType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); } - // add `showPrivacyPolicy` to the URL query string - if (getShowPrivacyPolicy() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sshowPrivacyPolicy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowPrivacyPolicy())))); - } - - // add `showTermsOfUse` to the URL query string - if (getShowTermsOfUse() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sshowTermsOfUse%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowTermsOfUse())))); + // add `enabled` to the URL query string + if (getEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); } // add `title` to the URL query string @@ -616,14 +601,19 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); } - // add `enabled` to the URL query string - if (getEnabled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); + // add `captcha` to the URL query string + if (getCaptcha() != null) { + joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); } - // add `homeDashboard` to the URL query string - if (getHomeDashboard() != null) { - joiner.add(getHomeDashboard().toUrlQueryString(prefix + "homeDashboard" + suffix)); + // add `permissions` to the URL query string + if (getPermissions() != null) { + for (int i = 0; i < getPermissions().size(); i++) { + if (getPermissions().get(i) != null) { + joiner.add(getPermissions().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%spermissions%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } } // add `notificationRecipient` to the URL query string @@ -631,11 +621,6 @@ public String toUrlQueryString(String prefix) { joiner.add(getNotificationRecipient().toUrlQueryString(prefix + "notificationRecipient" + suffix)); } - // add `captcha` to the URL query string - if (getCaptcha() != null) { - joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); - } - // add `signUpFields` to the URL query string if (getSignUpFields() != null) { for (int i = 0; i < getSignUpFields().size(); i++) { @@ -646,19 +631,29 @@ public String toUrlQueryString(String prefix) { } } - // add `defaultDashboard` to the URL query string - if (getDefaultDashboard() != null) { - joiner.add(getDefaultDashboard().toUrlQueryString(prefix + "defaultDashboard" + suffix)); - } - // add `customerTitlePrefix` to the URL query string if (getCustomerTitlePrefix() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%scustomerTitlePrefix%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCustomerTitlePrefix())))); } - // add `customMenuId` to the URL query string - if (getCustomMenuId() != null) { - joiner.add(getCustomMenuId().toUrlQueryString(prefix + "customMenuId" + suffix)); + // add `showPrivacyPolicy` to the URL query string + if (getShowPrivacyPolicy() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sshowPrivacyPolicy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowPrivacyPolicy())))); + } + + // add `showTermsOfUse` to the URL query string + if (getShowTermsOfUse() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sshowTermsOfUse%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowTermsOfUse())))); + } + + // add `defaultDashboard` to the URL query string + if (getDefaultDashboard() != null) { + joiner.add(getDefaultDashboard().toUrlQueryString(prefix + "defaultDashboard" + suffix)); + } + + // add `homeDashboard` to the URL query string + if (getHomeDashboard() != null) { + joiner.add(getHomeDashboard().toUrlQueryString(prefix + "homeDashboard" + suffix)); } // add `customerGroupId` to the URL query string @@ -666,6 +661,11 @@ public String toUrlQueryString(String prefix) { joiner.add(getCustomerGroupId().toUrlQueryString(prefix + "customerGroupId" + suffix)); } + // add `customMenuId` to the URL query string + if (getCustomMenuId() != null) { + joiner.add(getCustomMenuId().toUrlQueryString(prefix + "customMenuId" + suffix)); + } + return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/ShortEntityView.java b/paas/src/main/java/org/thingsboard/client/model/ShortEntityView.java index 71ce6bed..7c1087a8 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ShortEntityView.java +++ b/paas/src/main/java/org/thingsboard/client/model/ShortEntityView.java @@ -54,14 +54,17 @@ public ShortEntityView() { @JsonCreator public ShortEntityView( - @JsonProperty(JSON_PROPERTY_ID) EntityId id, @JsonProperty(JSON_PROPERTY_NAME) String name ) { this(); - this.id = id; this.name = name; } + public ShortEntityView id(@javax.annotation.Nonnull EntityId id) { + this.id = id; + return this; + } + /** * Entity Id object * @return id @@ -74,6 +77,11 @@ public EntityId getId() { } + @JsonProperty(value = JSON_PROPERTY_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull EntityId id) { + this.id = id; + } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/SimpleCalculatedFieldConfiguration.java b/paas/src/main/java/org/thingsboard/client/model/SimpleCalculatedFieldConfiguration.java index 667dec2e..dc538c0e 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SimpleCalculatedFieldConfiguration.java +++ b/paas/src/main/java/org/thingsboard/client/model/SimpleCalculatedFieldConfiguration.java @@ -152,14 +152,14 @@ public void setUseLatestTs(@javax.annotation.Nullable Boolean useLatestTs) { @Override - public SimpleCalculatedFieldConfiguration aiGenerated(@javax.annotation.Nullable Boolean aiGenerated) { - this.setAiGenerated(aiGenerated); + public SimpleCalculatedFieldConfiguration output(@javax.annotation.Nullable Output output) { + this.setOutput(output); return this; } @Override - public SimpleCalculatedFieldConfiguration output(@javax.annotation.Nonnull Output output) { - this.setOutput(output); + public SimpleCalculatedFieldConfiguration aiGenerated(@javax.annotation.Nullable Boolean aiGenerated) { + this.setAiGenerated(aiGenerated); return this; } @@ -247,16 +247,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `aiGenerated` to the URL query string - if (getAiGenerated() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%saiGenerated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAiGenerated())))); - } - // add `output` to the URL query string if (getOutput() != null) { joiner.add(getOutput().toUrlQueryString(prefix + "output" + suffix)); } + // add `aiGenerated` to the URL query string + if (getAiGenerated() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%saiGenerated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAiGenerated())))); + } + // add `type` to the URL query string if (getType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); diff --git a/paas/src/main/java/org/thingsboard/client/model/Success.java b/paas/src/main/java/org/thingsboard/client/model/Success.java index 9dc09116..9a796e60 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Success.java +++ b/paas/src/main/java/org/thingsboard/client/model/Success.java @@ -40,8 +40,7 @@ * Success */ @JsonPropertyOrder({ - Success.JSON_PROPERTY_GENERATED_CONTENT, - Success.JSON_PROPERTY_STATUS + Success.JSON_PROPERTY_GENERATED_CONTENT }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -55,10 +54,6 @@ public class Success extends TbChatResponse { @javax.annotation.Nullable private String generatedContent; - public static final String JSON_PROPERTY_STATUS = "status"; - @javax.annotation.Nullable - private String status; - public Success() { } @@ -86,30 +81,12 @@ public void setGeneratedContent(@javax.annotation.Nullable String generatedConte } - public Success status(@javax.annotation.Nullable String status) { - this.status = status; + @Override + public Success status(@javax.annotation.Nonnull String status) { + this.setStatus(status); return this; } - /** - * Get status - * @return status - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_STATUS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } - - - @JsonProperty(value = JSON_PROPERTY_STATUS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatus(@javax.annotation.Nullable String status) { - this.status = status; - } - - /** * Return true if this Success object is equal to o. */ @@ -123,13 +100,12 @@ public boolean equals(Object o) { } Success success = (Success) o; return Objects.equals(this.generatedContent, success.generatedContent) && - Objects.equals(this.status, success.status) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(generatedContent, status, super.hashCode()); + return Objects.hash(generatedContent, super.hashCode()); } @Override @@ -138,7 +114,6 @@ public String toString() { sb.append("class Success {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" generatedContent: ").append(toIndentedString(generatedContent)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/paas/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java index b6f7856b..befe1f1e 100644 --- a/paas/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java @@ -94,7 +94,7 @@ public void setTargets(@javax.annotation.Nonnull List targets) { @Override - public TaskProcessingFailureRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + public TaskProcessingFailureRecipientsConfig triggerType(@javax.annotation.Nullable NotificationRuleTriggerType triggerType) { this.setTriggerType(triggerType); return this; } diff --git a/paas/src/main/java/org/thingsboard/client/model/TbResourceId.java b/paas/src/main/java/org/thingsboard/client/model/TbResourceId.java index 76518ea8..a7e675f0 100644 --- a/paas/src/main/java/org/thingsboard/client/model/TbResourceId.java +++ b/paas/src/main/java/org/thingsboard/client/model/TbResourceId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * TbResourceId */ @JsonPropertyOrder({ - TbResourceId.JSON_PROPERTY_ID, - TbResourceId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class TbResourceId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class TbResourceId extends EntityId { public TbResourceId() { } + @Override public TbResourceId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public TbResourceId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this TbResourceId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TbResourceId tbResourceId = (TbResourceId) o; - return Objects.equals(this.id, tbResourceId.id) && - Objects.equals(this.entityType, tbResourceId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TbResourceId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TbResourceId", TbResourceId.class); + JSON.registerDiscriminator(TbResourceId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/TenantId.java b/paas/src/main/java/org/thingsboard/client/model/TenantId.java index 70448feb..ef7de97d 100644 --- a/paas/src/main/java/org/thingsboard/client/model/TenantId.java +++ b/paas/src/main/java/org/thingsboard/client/model/TenantId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * TenantId */ @JsonPropertyOrder({ - TenantId.JSON_PROPERTY_ID, - TenantId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class TenantId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class TenantId extends EntityId { public TenantId() { } + @Override public TenantId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public TenantId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this TenantId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TenantId tenantId = (TenantId) o; - return Objects.equals(this.id, tenantId.id) && - Objects.equals(this.entityType, tenantId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TenantId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TenantId", TenantId.class); + JSON.registerDiscriminator(TenantId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/TenantProfileId.java b/paas/src/main/java/org/thingsboard/client/model/TenantProfileId.java index 0576c6ec..55e6ec28 100644 --- a/paas/src/main/java/org/thingsboard/client/model/TenantProfileId.java +++ b/paas/src/main/java/org/thingsboard/client/model/TenantProfileId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * TenantProfileId */ @JsonPropertyOrder({ - TenantProfileId.JSON_PROPERTY_ID, - TenantProfileId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class TenantProfileId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class TenantProfileId extends EntityId { public TenantProfileId() { } + @Override public TenantProfileId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public TenantProfileId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this TenantProfileId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TenantProfileId tenantProfileId = (TenantProfileId) o; - return Objects.equals(this.id, tenantProfileId.id) && - Objects.equals(this.entityType, tenantProfileId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TenantProfileId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TenantProfileId", TenantProfileId.class); + JSON.registerDiscriminator(TenantProfileId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/TimeSeriesOutput.java b/paas/src/main/java/org/thingsboard/client/model/TimeSeriesOutput.java index 38f4f0aa..2d6b122f 100644 --- a/paas/src/main/java/org/thingsboard/client/model/TimeSeriesOutput.java +++ b/paas/src/main/java/org/thingsboard/client/model/TimeSeriesOutput.java @@ -30,9 +30,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; import org.thingsboard.client.model.AttributeScope; import org.thingsboard.client.model.Output; -import org.thingsboard.client.model.TimeSeriesOutputStrategy; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -42,7 +42,6 @@ * TimeSeriesOutput */ @JsonPropertyOrder({ - TimeSeriesOutput.JSON_PROPERTY_STRATEGY }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -52,37 +51,9 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) public class TimeSeriesOutput extends Output { - public static final String JSON_PROPERTY_STRATEGY = "strategy"; - @javax.annotation.Nullable - private TimeSeriesOutputStrategy strategy; - public TimeSeriesOutput() { } - public TimeSeriesOutput strategy(@javax.annotation.Nullable TimeSeriesOutputStrategy strategy) { - this.strategy = strategy; - return this; - } - - /** - * Get strategy - * @return strategy - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_STRATEGY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TimeSeriesOutputStrategy getStrategy() { - return strategy; - } - - - @JsonProperty(value = JSON_PROPERTY_STRATEGY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStrategy(@javax.annotation.Nullable TimeSeriesOutputStrategy strategy) { - this.strategy = strategy; - } - - @Override public TimeSeriesOutput name(@javax.annotation.Nullable String name) { this.setName(name); @@ -101,6 +72,12 @@ public TimeSeriesOutput decimalsByDefault(@javax.annotation.Nullable Integer dec return this; } + @Override + public TimeSeriesOutput strategy(@javax.annotation.Nullable Object strategy) { + this.setStrategy(strategy); + return this; + } + @Override public TimeSeriesOutput type(@javax.annotation.Nonnull String type) { this.setType(type); @@ -118,14 +95,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TimeSeriesOutput timeSeriesOutput = (TimeSeriesOutput) o; - return Objects.equals(this.strategy, timeSeriesOutput.strategy) && - super.equals(o); + return super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { - return Objects.hash(strategy, super.hashCode()); + return Objects.hash(super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -133,7 +119,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TimeSeriesOutput {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" strategy: ").append(toIndentedString(strategy)).append("\n"); sb.append("}"); return sb.toString(); } @@ -198,7 +183,7 @@ public String toUrlQueryString(String prefix) { // add `strategy` to the URL query string if (getStrategy() != null) { - joiner.add(getStrategy().toUrlQueryString(prefix + "strategy" + suffix)); + joiner.add(String.format(java.util.Locale.ROOT, "%sstrategy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStrategy())))); } // add `type` to the URL query string diff --git a/paas/src/main/java/org/thingsboard/client/model/TsKvEntry.java b/paas/src/main/java/org/thingsboard/client/model/TsKvEntry.java index 21ce1513..3fefdd94 100644 --- a/paas/src/main/java/org/thingsboard/client/model/TsKvEntry.java +++ b/paas/src/main/java/org/thingsboard/client/model/TsKvEntry.java @@ -43,10 +43,10 @@ TsKvEntry.JSON_PROPERTY_TS, TsKvEntry.JSON_PROPERTY_VALUE, TsKvEntry.JSON_PROPERTY_KEY, + TsKvEntry.JSON_PROPERTY_DOUBLE_VALUE, + TsKvEntry.JSON_PROPERTY_LONG_VALUE, TsKvEntry.JSON_PROPERTY_BOOLEAN_VALUE, TsKvEntry.JSON_PROPERTY_VALUE_AS_STRING, - TsKvEntry.JSON_PROPERTY_LONG_VALUE, - TsKvEntry.JSON_PROPERTY_DOUBLE_VALUE, TsKvEntry.JSON_PROPERTY_DATA_TYPE, TsKvEntry.JSON_PROPERTY_JSON_VALUE, TsKvEntry.JSON_PROPERTY_STR_VALUE, @@ -65,21 +65,21 @@ public class TsKvEntry { @javax.annotation.Nullable private String key; - public static final String JSON_PROPERTY_BOOLEAN_VALUE = "booleanValue"; - @javax.annotation.Nullable - private Boolean booleanValue; - - public static final String JSON_PROPERTY_VALUE_AS_STRING = "valueAsString"; + public static final String JSON_PROPERTY_DOUBLE_VALUE = "doubleValue"; @javax.annotation.Nullable - private String valueAsString; + private Double doubleValue; public static final String JSON_PROPERTY_LONG_VALUE = "longValue"; @javax.annotation.Nullable private Long longValue; - public static final String JSON_PROPERTY_DOUBLE_VALUE = "doubleValue"; + public static final String JSON_PROPERTY_BOOLEAN_VALUE = "booleanValue"; @javax.annotation.Nullable - private Double doubleValue; + private Boolean booleanValue; + + public static final String JSON_PROPERTY_VALUE_AS_STRING = "valueAsString"; + @javax.annotation.Nullable + private String valueAsString; public static final String JSON_PROPERTY_DATA_TYPE = "dataType"; @javax.annotation.Nullable @@ -180,99 +180,99 @@ public void setKey(@javax.annotation.Nullable String key) { } - public TsKvEntry booleanValue(@javax.annotation.Nullable Boolean booleanValue) { - this.booleanValue = booleanValue; + public TsKvEntry doubleValue(@javax.annotation.Nullable Double doubleValue) { + this.doubleValue = doubleValue; return this; } /** - * Get booleanValue - * @return booleanValue + * Get doubleValue + * @return doubleValue */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_BOOLEAN_VALUE, required = false) + @JsonProperty(value = JSON_PROPERTY_DOUBLE_VALUE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getBooleanValue() { - return booleanValue; + public Double getDoubleValue() { + return doubleValue; } - @JsonProperty(value = JSON_PROPERTY_BOOLEAN_VALUE, required = false) + @JsonProperty(value = JSON_PROPERTY_DOUBLE_VALUE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBooleanValue(@javax.annotation.Nullable Boolean booleanValue) { - this.booleanValue = booleanValue; + public void setDoubleValue(@javax.annotation.Nullable Double doubleValue) { + this.doubleValue = doubleValue; } - public TsKvEntry valueAsString(@javax.annotation.Nullable String valueAsString) { - this.valueAsString = valueAsString; + public TsKvEntry longValue(@javax.annotation.Nullable Long longValue) { + this.longValue = longValue; return this; } /** - * Get valueAsString - * @return valueAsString + * Get longValue + * @return longValue */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VALUE_AS_STRING, required = false) + @JsonProperty(value = JSON_PROPERTY_LONG_VALUE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValueAsString() { - return valueAsString; + public Long getLongValue() { + return longValue; } - @JsonProperty(value = JSON_PROPERTY_VALUE_AS_STRING, required = false) + @JsonProperty(value = JSON_PROPERTY_LONG_VALUE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValueAsString(@javax.annotation.Nullable String valueAsString) { - this.valueAsString = valueAsString; + public void setLongValue(@javax.annotation.Nullable Long longValue) { + this.longValue = longValue; } - public TsKvEntry longValue(@javax.annotation.Nullable Long longValue) { - this.longValue = longValue; + public TsKvEntry booleanValue(@javax.annotation.Nullable Boolean booleanValue) { + this.booleanValue = booleanValue; return this; } /** - * Get longValue - * @return longValue + * Get booleanValue + * @return booleanValue */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LONG_VALUE, required = false) + @JsonProperty(value = JSON_PROPERTY_BOOLEAN_VALUE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLongValue() { - return longValue; + public Boolean getBooleanValue() { + return booleanValue; } - @JsonProperty(value = JSON_PROPERTY_LONG_VALUE, required = false) + @JsonProperty(value = JSON_PROPERTY_BOOLEAN_VALUE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLongValue(@javax.annotation.Nullable Long longValue) { - this.longValue = longValue; + public void setBooleanValue(@javax.annotation.Nullable Boolean booleanValue) { + this.booleanValue = booleanValue; } - public TsKvEntry doubleValue(@javax.annotation.Nullable Double doubleValue) { - this.doubleValue = doubleValue; + public TsKvEntry valueAsString(@javax.annotation.Nullable String valueAsString) { + this.valueAsString = valueAsString; return this; } /** - * Get doubleValue - * @return doubleValue + * Get valueAsString + * @return valueAsString */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DOUBLE_VALUE, required = false) + @JsonProperty(value = JSON_PROPERTY_VALUE_AS_STRING, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDoubleValue() { - return doubleValue; + public String getValueAsString() { + return valueAsString; } - @JsonProperty(value = JSON_PROPERTY_DOUBLE_VALUE, required = false) + @JsonProperty(value = JSON_PROPERTY_VALUE_AS_STRING, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDoubleValue(@javax.annotation.Nullable Double doubleValue) { - this.doubleValue = doubleValue; + public void setValueAsString(@javax.annotation.Nullable String valueAsString) { + this.valueAsString = valueAsString; } @@ -387,10 +387,10 @@ public boolean equals(Object o) { return Objects.equals(this.ts, tsKvEntry.ts) && equalsNullable(this.value, tsKvEntry.value) && Objects.equals(this.key, tsKvEntry.key) && + Objects.equals(this.doubleValue, tsKvEntry.doubleValue) && + Objects.equals(this.longValue, tsKvEntry.longValue) && Objects.equals(this.booleanValue, tsKvEntry.booleanValue) && Objects.equals(this.valueAsString, tsKvEntry.valueAsString) && - Objects.equals(this.longValue, tsKvEntry.longValue) && - Objects.equals(this.doubleValue, tsKvEntry.doubleValue) && Objects.equals(this.dataType, tsKvEntry.dataType) && Objects.equals(this.jsonValue, tsKvEntry.jsonValue) && Objects.equals(this.strValue, tsKvEntry.strValue) && @@ -403,7 +403,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(ts, hashCodeNullable(value), key, booleanValue, valueAsString, longValue, doubleValue, dataType, jsonValue, strValue, version); + return Objects.hash(ts, hashCodeNullable(value), key, doubleValue, longValue, booleanValue, valueAsString, dataType, jsonValue, strValue, version); } private static int hashCodeNullable(JsonNullable a) { @@ -420,10 +420,10 @@ public String toString() { sb.append(" ts: ").append(toIndentedString(ts)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" doubleValue: ").append(toIndentedString(doubleValue)).append("\n"); + sb.append(" longValue: ").append(toIndentedString(longValue)).append("\n"); sb.append(" booleanValue: ").append(toIndentedString(booleanValue)).append("\n"); sb.append(" valueAsString: ").append(toIndentedString(valueAsString)).append("\n"); - sb.append(" longValue: ").append(toIndentedString(longValue)).append("\n"); - sb.append(" doubleValue: ").append(toIndentedString(doubleValue)).append("\n"); sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); sb.append(" jsonValue: ").append(toIndentedString(jsonValue)).append("\n"); sb.append(" strValue: ").append(toIndentedString(strValue)).append("\n"); @@ -490,6 +490,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%skey%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKey())))); } + // add `doubleValue` to the URL query string + if (getDoubleValue() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sdoubleValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDoubleValue())))); + } + + // add `longValue` to the URL query string + if (getLongValue() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%slongValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLongValue())))); + } + // add `booleanValue` to the URL query string if (getBooleanValue() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sbooleanValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBooleanValue())))); @@ -500,16 +510,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%svalueAsString%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValueAsString())))); } - // add `longValue` to the URL query string - if (getLongValue() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%slongValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLongValue())))); - } - - // add `doubleValue` to the URL query string - if (getDoubleValue() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdoubleValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDoubleValue())))); - } - // add `dataType` to the URL query string if (getDataType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sdataType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDataType())))); diff --git a/paas/src/main/java/org/thingsboard/client/model/User.java b/paas/src/main/java/org/thingsboard/client/model/User.java index fa443977..01332cdd 100644 --- a/paas/src/main/java/org/thingsboard/client/model/User.java +++ b/paas/src/main/java/org/thingsboard/client/model/User.java @@ -120,13 +120,11 @@ public User() { @JsonCreator public User( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_NAME) String name ) { this(); this.createdTime = createdTime; this.name = name; - this.ownerId = ownerId; } public User id(@javax.annotation.Nullable UserId id) { @@ -397,6 +395,11 @@ public String getName() { + public User ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -409,6 +412,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public User additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/UserId.java b/paas/src/main/java/org/thingsboard/client/model/UserId.java index faa2d819..fc9a13b4 100644 --- a/paas/src/main/java/org/thingsboard/client/model/UserId.java +++ b/paas/src/main/java/org/thingsboard/client/model/UserId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * UserId */ @JsonPropertyOrder({ - UserId.JSON_PROPERTY_ID, - UserId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class UserId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class UserId extends EntityId { public UserId() { } + @Override public UserId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public UserId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this UserId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UserId userId = (UserId) o; - return Objects.equals(this.id, userId.id) && - Objects.equals(this.entityType, userId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UserId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("UserId", UserId.class); + JSON.registerDiscriminator(UserId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/UserInfo.java b/paas/src/main/java/org/thingsboard/client/model/UserInfo.java index 7e950212..5788f6dc 100644 --- a/paas/src/main/java/org/thingsboard/client/model/UserInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/UserInfo.java @@ -134,14 +134,12 @@ public UserInfo() { public UserInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, - @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId + @JsonProperty(JSON_PROPERTY_NAME) String name ) { this(); this.createdTime = createdTime; this.ownerName = ownerName; this.name = name; - this.ownerId = ownerId; } public UserInfo id(@javax.annotation.Nullable UserId id) { @@ -458,6 +456,11 @@ public String getName() { + public UserInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + return this; + } + /** * JSON object with Customer or Tenant Id * @return ownerId @@ -470,6 +473,11 @@ public EntityId getOwnerId() { } + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; + } public UserInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java b/paas/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java index 97ac72bb..e75d36cd 100644 --- a/paas/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java +++ b/paas/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java @@ -52,22 +52,9 @@ * WebSelfRegistrationParams */ @JsonPropertyOrder({ - WebSelfRegistrationParams.JSON_PROPERTY_ENABLED, - WebSelfRegistrationParams.JSON_PROPERTY_TITLE, - WebSelfRegistrationParams.JSON_PROPERTY_CAPTCHA, - WebSelfRegistrationParams.JSON_PROPERTY_SIGN_UP_FIELDS, - WebSelfRegistrationParams.JSON_PROPERTY_SHOW_PRIVACY_POLICY, - WebSelfRegistrationParams.JSON_PROPERTY_SHOW_TERMS_OF_USE, - WebSelfRegistrationParams.JSON_PROPERTY_NOTIFICATION_RECIPIENT, - WebSelfRegistrationParams.JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, - WebSelfRegistrationParams.JSON_PROPERTY_CUSTOMER_GROUP_ID, - WebSelfRegistrationParams.JSON_PROPERTY_PERMISSIONS, - WebSelfRegistrationParams.JSON_PROPERTY_DEFAULT_DASHBOARD, - WebSelfRegistrationParams.JSON_PROPERTY_HOME_DASHBOARD, - WebSelfRegistrationParams.JSON_PROPERTY_CUSTOM_MENU_ID, + WebSelfRegistrationParams.JSON_PROPERTY_DOMAIN_ID, WebSelfRegistrationParams.JSON_PROPERTY_PRIVACY_POLICY, - WebSelfRegistrationParams.JSON_PROPERTY_TERMS_OF_USE, - WebSelfRegistrationParams.JSON_PROPERTY_DOMAIN_ID + WebSelfRegistrationParams.JSON_PROPERTY_TERMS_OF_USE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -77,57 +64,9 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) public class WebSelfRegistrationParams extends SelfRegistrationParams { - public static final String JSON_PROPERTY_ENABLED = "enabled"; - @javax.annotation.Nullable - private Boolean enabled; - - public static final String JSON_PROPERTY_TITLE = "title"; - @javax.annotation.Nonnull - private String title; - - public static final String JSON_PROPERTY_CAPTCHA = "captcha"; - @javax.annotation.Nonnull - private CaptchaParams captcha; - - public static final String JSON_PROPERTY_SIGN_UP_FIELDS = "signUpFields"; - @javax.annotation.Nonnull - private List signUpFields = new ArrayList<>(); - - public static final String JSON_PROPERTY_SHOW_PRIVACY_POLICY = "showPrivacyPolicy"; - @javax.annotation.Nullable - private Boolean showPrivacyPolicy; - - public static final String JSON_PROPERTY_SHOW_TERMS_OF_USE = "showTermsOfUse"; - @javax.annotation.Nullable - private Boolean showTermsOfUse; - - public static final String JSON_PROPERTY_NOTIFICATION_RECIPIENT = "notificationRecipient"; - @javax.annotation.Nullable - private NotificationTargetId notificationRecipient; - - public static final String JSON_PROPERTY_CUSTOMER_TITLE_PREFIX = "customerTitlePrefix"; - @javax.annotation.Nullable - private String customerTitlePrefix; - - public static final String JSON_PROPERTY_CUSTOMER_GROUP_ID = "customerGroupId"; - @javax.annotation.Nullable - private EntityGroupId customerGroupId; - - public static final String JSON_PROPERTY_PERMISSIONS = "permissions"; + public static final String JSON_PROPERTY_DOMAIN_ID = "domainId"; @javax.annotation.Nonnull - private List permissions = new ArrayList<>(); - - public static final String JSON_PROPERTY_DEFAULT_DASHBOARD = "defaultDashboard"; - @javax.annotation.Nullable - private DefaultDashboardParams defaultDashboard; - - public static final String JSON_PROPERTY_HOME_DASHBOARD = "homeDashboard"; - @javax.annotation.Nullable - private HomeDashboardParams homeDashboard; - - public static final String JSON_PROPERTY_CUSTOM_MENU_ID = "customMenuId"; - @javax.annotation.Nullable - private CustomMenuId customMenuId; + private DomainId domainId; public static final String JSON_PROPERTY_PRIVACY_POLICY = "privacyPolicy"; @javax.annotation.Nullable @@ -137,416 +76,150 @@ public class WebSelfRegistrationParams extends SelfRegistrationParams { @javax.annotation.Nullable private String termsOfUse; - public static final String JSON_PROPERTY_DOMAIN_ID = "domainId"; - @javax.annotation.Nonnull - private DomainId domainId; - public WebSelfRegistrationParams() { } - public WebSelfRegistrationParams enabled(@javax.annotation.Nullable Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Indicates if self-registration is allowed via sign-up form - * @return enabled - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ENABLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEnabled() { - return enabled; - } - - - @JsonProperty(value = JSON_PROPERTY_ENABLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEnabled(@javax.annotation.Nullable Boolean enabled) { - this.enabled = enabled; - } - - - public WebSelfRegistrationParams title(@javax.annotation.Nonnull String title) { - this.title = title; - return this; - } - - /** - * The text message to appear on login form - * @return title - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_TITLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTitle() { - return title; - } - - - @JsonProperty(value = JSON_PROPERTY_TITLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTitle(@javax.annotation.Nonnull String title) { - this.title = title; - } - - - public WebSelfRegistrationParams captcha(@javax.annotation.Nonnull CaptchaParams captcha) { - this.captcha = captcha; - return this; - } - - /** - * Captcha site key for 'I'm not a robot' validation - * @return captcha - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CaptchaParams getCaptcha() { - return captcha; - } - - - @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCaptcha(@javax.annotation.Nonnull CaptchaParams captcha) { - this.captcha = captcha; - } - - - public WebSelfRegistrationParams signUpFields(@javax.annotation.Nonnull List signUpFields) { - this.signUpFields = signUpFields; - return this; - } - - public WebSelfRegistrationParams addSignUpFieldsItem(SignUpField signUpFieldsItem) { - if (this.signUpFields == null) { - this.signUpFields = new ArrayList<>(); - } - this.signUpFields.add(signUpFieldsItem); + public WebSelfRegistrationParams domainId(@javax.annotation.Nonnull DomainId domainId) { + this.domainId = domainId; return this; } /** - * List of sign-up form fields - * @return signUpFields + * Domain name for self registration URL. Typically this matches the domain name from the Login White Labeling page. + * @return domainId */ @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_SIGN_UP_FIELDS, required = true) + @JsonProperty(value = JSON_PROPERTY_DOMAIN_ID, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSignUpFields() { - return signUpFields; + public DomainId getDomainId() { + return domainId; } - @JsonProperty(value = JSON_PROPERTY_SIGN_UP_FIELDS, required = true) + @JsonProperty(value = JSON_PROPERTY_DOMAIN_ID, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignUpFields(@javax.annotation.Nonnull List signUpFields) { - this.signUpFields = signUpFields; + public void setDomainId(@javax.annotation.Nonnull DomainId domainId) { + this.domainId = domainId; } - public WebSelfRegistrationParams showPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { - this.showPrivacyPolicy = showPrivacyPolicy; + public WebSelfRegistrationParams privacyPolicy(@javax.annotation.Nullable String privacyPolicy) { + this.privacyPolicy = privacyPolicy; return this; } /** - * Show or hide 'Privacy Policy' - * @return showPrivacyPolicy + * Privacy policy text. Supports HTML. + * @return privacyPolicy */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SHOW_PRIVACY_POLICY, required = false) + @JsonProperty(value = JSON_PROPERTY_PRIVACY_POLICY, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowPrivacyPolicy() { - return showPrivacyPolicy; + public String getPrivacyPolicy() { + return privacyPolicy; } - @JsonProperty(value = JSON_PROPERTY_SHOW_PRIVACY_POLICY, required = false) + @JsonProperty(value = JSON_PROPERTY_PRIVACY_POLICY, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { - this.showPrivacyPolicy = showPrivacyPolicy; + public void setPrivacyPolicy(@javax.annotation.Nullable String privacyPolicy) { + this.privacyPolicy = privacyPolicy; } - public WebSelfRegistrationParams showTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { - this.showTermsOfUse = showTermsOfUse; + public WebSelfRegistrationParams termsOfUse(@javax.annotation.Nullable String termsOfUse) { + this.termsOfUse = termsOfUse; return this; } /** - * Show or hide 'Terms of Use' - * @return showTermsOfUse + * Terms of User text. Supports HTML. + * @return termsOfUse */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SHOW_TERMS_OF_USE, required = false) + @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowTermsOfUse() { - return showTermsOfUse; + public String getTermsOfUse() { + return termsOfUse; } - @JsonProperty(value = JSON_PROPERTY_SHOW_TERMS_OF_USE, required = false) + @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { - this.showTermsOfUse = showTermsOfUse; + public void setTermsOfUse(@javax.annotation.Nullable String termsOfUse) { + this.termsOfUse = termsOfUse; } - public WebSelfRegistrationParams notificationRecipient(@javax.annotation.Nullable NotificationTargetId notificationRecipient) { - this.notificationRecipient = notificationRecipient; + @Override + public WebSelfRegistrationParams type(@javax.annotation.Nonnull SelfRegistrationType type) { + this.setType(type); return this; } - /** - * Recipient to use for notifications when new user self-registered. - * @return notificationRecipient - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_RECIPIENT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotificationTargetId getNotificationRecipient() { - return notificationRecipient; - } - - - @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_RECIPIENT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNotificationRecipient(@javax.annotation.Nullable NotificationTargetId notificationRecipient) { - this.notificationRecipient = notificationRecipient; - } - - - public WebSelfRegistrationParams customerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { - this.customerTitlePrefix = customerTitlePrefix; + @Override + public WebSelfRegistrationParams enabled(@javax.annotation.Nullable Boolean enabled) { + this.setEnabled(enabled); return this; } - /** - * Prefix to add to created customer - * @return customerTitlePrefix - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCustomerTitlePrefix() { - return customerTitlePrefix; - } - - - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { - this.customerTitlePrefix = customerTitlePrefix; - } - - - public WebSelfRegistrationParams customerGroupId(@javax.annotation.Nullable EntityGroupId customerGroupId) { - this.customerGroupId = customerGroupId; + @Override + public WebSelfRegistrationParams captcha(@javax.annotation.Nullable CaptchaParams captcha) { + this.setCaptcha(captcha); return this; } - /** - * Id of the customer group customer wil be added to. - * @return customerGroupId - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_GROUP_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EntityGroupId getCustomerGroupId() { - return customerGroupId; - } - - - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_GROUP_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerGroupId(@javax.annotation.Nullable EntityGroupId customerGroupId) { - this.customerGroupId = customerGroupId; - } - - - public WebSelfRegistrationParams permissions(@javax.annotation.Nonnull List permissions) { - this.permissions = permissions; + @Override + public WebSelfRegistrationParams notificationRecipient(@javax.annotation.Nullable NotificationTargetId notificationRecipient) { + this.setNotificationRecipient(notificationRecipient); return this; } - public WebSelfRegistrationParams addPermissionsItem(GroupPermission permissionsItem) { - if (this.permissions == null) { - this.permissions = new ArrayList<>(); - } - this.permissions.add(permissionsItem); + @Override + public WebSelfRegistrationParams signUpFields(@javax.annotation.Nullable List signUpFields) { + this.setSignUpFields(signUpFields); return this; } - /** - * Group Permissions to assign for the new customer user. - * @return permissions - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_PERMISSIONS, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getPermissions() { - return permissions; - } - - - @JsonProperty(value = JSON_PROPERTY_PERMISSIONS, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setPermissions(@javax.annotation.Nonnull List permissions) { - this.permissions = permissions; - } - - - public WebSelfRegistrationParams defaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { - this.defaultDashboard = defaultDashboard; + @Override + public WebSelfRegistrationParams customerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { + this.setCustomerTitlePrefix(customerTitlePrefix); return this; } - /** - * Default dashboard params - * @return defaultDashboard - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DEFAULT_DASHBOARD, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DefaultDashboardParams getDefaultDashboard() { - return defaultDashboard; - } - - - @JsonProperty(value = JSON_PROPERTY_DEFAULT_DASHBOARD, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDefaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { - this.defaultDashboard = defaultDashboard; - } - - - public WebSelfRegistrationParams homeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { - this.homeDashboard = homeDashboard; + @Override + public WebSelfRegistrationParams showPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { + this.setShowPrivacyPolicy(showPrivacyPolicy); return this; } - /** - * Home dashboard params - * @return homeDashboard - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_HOME_DASHBOARD, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HomeDashboardParams getHomeDashboard() { - return homeDashboard; - } - - - @JsonProperty(value = JSON_PROPERTY_HOME_DASHBOARD, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHomeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { - this.homeDashboard = homeDashboard; - } - - - public WebSelfRegistrationParams customMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { - this.customMenuId = customMenuId; + @Override + public WebSelfRegistrationParams showTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { + this.setShowTermsOfUse(showTermsOfUse); return this; } - /** - * Custom menu id - * @return customMenuId - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOM_MENU_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CustomMenuId getCustomMenuId() { - return customMenuId; - } - - - @JsonProperty(value = JSON_PROPERTY_CUSTOM_MENU_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { - this.customMenuId = customMenuId; - } - - - public WebSelfRegistrationParams privacyPolicy(@javax.annotation.Nullable String privacyPolicy) { - this.privacyPolicy = privacyPolicy; + @Override + public WebSelfRegistrationParams defaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { + this.setDefaultDashboard(defaultDashboard); return this; } - /** - * Privacy policy text. Supports HTML. - * @return privacyPolicy - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PRIVACY_POLICY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrivacyPolicy() { - return privacyPolicy; - } - - - @JsonProperty(value = JSON_PROPERTY_PRIVACY_POLICY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrivacyPolicy(@javax.annotation.Nullable String privacyPolicy) { - this.privacyPolicy = privacyPolicy; - } - - - public WebSelfRegistrationParams termsOfUse(@javax.annotation.Nullable String termsOfUse) { - this.termsOfUse = termsOfUse; + @Override + public WebSelfRegistrationParams homeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { + this.setHomeDashboard(homeDashboard); return this; } - /** - * Terms of User text. Supports HTML. - * @return termsOfUse - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTermsOfUse() { - return termsOfUse; - } - - - @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTermsOfUse(@javax.annotation.Nullable String termsOfUse) { - this.termsOfUse = termsOfUse; - } - - - public WebSelfRegistrationParams domainId(@javax.annotation.Nonnull DomainId domainId) { - this.domainId = domainId; + @Override + public WebSelfRegistrationParams customerGroupId(@javax.annotation.Nullable EntityGroupId customerGroupId) { + this.setCustomerGroupId(customerGroupId); return this; } - /** - * Domain name for self registration URL. Typically this matches the domain name from the Login White Labeling page. - * @return domainId - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_DOMAIN_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public DomainId getDomainId() { - return domainId; - } - - - @JsonProperty(value = JSON_PROPERTY_DOMAIN_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDomainId(@javax.annotation.Nonnull DomainId domainId) { - this.domainId = domainId; - } - - @Override - public WebSelfRegistrationParams type(@javax.annotation.Nonnull SelfRegistrationType type) { - this.setType(type); + public WebSelfRegistrationParams customMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { + this.setCustomMenuId(customMenuId); return this; } @@ -562,28 +235,15 @@ public boolean equals(Object o) { return false; } WebSelfRegistrationParams webSelfRegistrationParams = (WebSelfRegistrationParams) o; - return Objects.equals(this.enabled, webSelfRegistrationParams.enabled) && - Objects.equals(this.title, webSelfRegistrationParams.title) && - Objects.equals(this.captcha, webSelfRegistrationParams.captcha) && - Objects.equals(this.signUpFields, webSelfRegistrationParams.signUpFields) && - Objects.equals(this.showPrivacyPolicy, webSelfRegistrationParams.showPrivacyPolicy) && - Objects.equals(this.showTermsOfUse, webSelfRegistrationParams.showTermsOfUse) && - Objects.equals(this.notificationRecipient, webSelfRegistrationParams.notificationRecipient) && - Objects.equals(this.customerTitlePrefix, webSelfRegistrationParams.customerTitlePrefix) && - Objects.equals(this.customerGroupId, webSelfRegistrationParams.customerGroupId) && - Objects.equals(this.permissions, webSelfRegistrationParams.permissions) && - Objects.equals(this.defaultDashboard, webSelfRegistrationParams.defaultDashboard) && - Objects.equals(this.homeDashboard, webSelfRegistrationParams.homeDashboard) && - Objects.equals(this.customMenuId, webSelfRegistrationParams.customMenuId) && + return Objects.equals(this.domainId, webSelfRegistrationParams.domainId) && Objects.equals(this.privacyPolicy, webSelfRegistrationParams.privacyPolicy) && Objects.equals(this.termsOfUse, webSelfRegistrationParams.termsOfUse) && - Objects.equals(this.domainId, webSelfRegistrationParams.domainId) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(enabled, title, captcha, signUpFields, showPrivacyPolicy, showTermsOfUse, notificationRecipient, customerTitlePrefix, customerGroupId, permissions, defaultDashboard, homeDashboard, customMenuId, privacyPolicy, termsOfUse, domainId, super.hashCode()); + return Objects.hash(domainId, privacyPolicy, termsOfUse, super.hashCode()); } @Override @@ -591,22 +251,9 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class WebSelfRegistrationParams {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" captcha: ").append(toIndentedString(captcha)).append("\n"); - sb.append(" signUpFields: ").append(toIndentedString(signUpFields)).append("\n"); - sb.append(" showPrivacyPolicy: ").append(toIndentedString(showPrivacyPolicy)).append("\n"); - sb.append(" showTermsOfUse: ").append(toIndentedString(showTermsOfUse)).append("\n"); - sb.append(" notificationRecipient: ").append(toIndentedString(notificationRecipient)).append("\n"); - sb.append(" customerTitlePrefix: ").append(toIndentedString(customerTitlePrefix)).append("\n"); - sb.append(" customerGroupId: ").append(toIndentedString(customerGroupId)).append("\n"); - sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); - sb.append(" defaultDashboard: ").append(toIndentedString(defaultDashboard)).append("\n"); - sb.append(" homeDashboard: ").append(toIndentedString(homeDashboard)).append("\n"); - sb.append(" customMenuId: ").append(toIndentedString(customMenuId)).append("\n"); + sb.append(" domainId: ").append(toIndentedString(domainId)).append("\n"); sb.append(" privacyPolicy: ").append(toIndentedString(privacyPolicy)).append("\n"); sb.append(" termsOfUse: ").append(toIndentedString(termsOfUse)).append("\n"); - sb.append(" domainId: ").append(toIndentedString(domainId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -654,29 +301,14 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `permissions` to the URL query string - if (getPermissions() != null) { - for (int i = 0; i < getPermissions().size(); i++) { - if (getPermissions().get(i) != null) { - joiner.add(getPermissions().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%spermissions%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - // add `type` to the URL query string if (getType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); } - // add `showPrivacyPolicy` to the URL query string - if (getShowPrivacyPolicy() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sshowPrivacyPolicy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowPrivacyPolicy())))); - } - - // add `showTermsOfUse` to the URL query string - if (getShowTermsOfUse() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sshowTermsOfUse%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowTermsOfUse())))); + // add `enabled` to the URL query string + if (getEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); } // add `title` to the URL query string @@ -684,14 +316,19 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); } - // add `enabled` to the URL query string - if (getEnabled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); + // add `captcha` to the URL query string + if (getCaptcha() != null) { + joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); } - // add `homeDashboard` to the URL query string - if (getHomeDashboard() != null) { - joiner.add(getHomeDashboard().toUrlQueryString(prefix + "homeDashboard" + suffix)); + // add `permissions` to the URL query string + if (getPermissions() != null) { + for (int i = 0; i < getPermissions().size(); i++) { + if (getPermissions().get(i) != null) { + joiner.add(getPermissions().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%spermissions%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } } // add `notificationRecipient` to the URL query string @@ -699,11 +336,6 @@ public String toUrlQueryString(String prefix) { joiner.add(getNotificationRecipient().toUrlQueryString(prefix + "notificationRecipient" + suffix)); } - // add `captcha` to the URL query string - if (getCaptcha() != null) { - joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); - } - // add `signUpFields` to the URL query string if (getSignUpFields() != null) { for (int i = 0; i < getSignUpFields().size(); i++) { @@ -714,14 +346,34 @@ public String toUrlQueryString(String prefix) { } } + // add `customerTitlePrefix` to the URL query string + if (getCustomerTitlePrefix() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%scustomerTitlePrefix%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCustomerTitlePrefix())))); + } + + // add `showPrivacyPolicy` to the URL query string + if (getShowPrivacyPolicy() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sshowPrivacyPolicy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowPrivacyPolicy())))); + } + + // add `showTermsOfUse` to the URL query string + if (getShowTermsOfUse() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sshowTermsOfUse%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowTermsOfUse())))); + } + // add `defaultDashboard` to the URL query string if (getDefaultDashboard() != null) { joiner.add(getDefaultDashboard().toUrlQueryString(prefix + "defaultDashboard" + suffix)); } - // add `customerTitlePrefix` to the URL query string - if (getCustomerTitlePrefix() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%scustomerTitlePrefix%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCustomerTitlePrefix())))); + // add `homeDashboard` to the URL query string + if (getHomeDashboard() != null) { + joiner.add(getHomeDashboard().toUrlQueryString(prefix + "homeDashboard" + suffix)); + } + + // add `customerGroupId` to the URL query string + if (getCustomerGroupId() != null) { + joiner.add(getCustomerGroupId().toUrlQueryString(prefix + "customerGroupId" + suffix)); } // add `customMenuId` to the URL query string @@ -729,9 +381,9 @@ public String toUrlQueryString(String prefix) { joiner.add(getCustomMenuId().toUrlQueryString(prefix + "customMenuId" + suffix)); } - // add `customerGroupId` to the URL query string - if (getCustomerGroupId() != null) { - joiner.add(getCustomerGroupId().toUrlQueryString(prefix + "customerGroupId" + suffix)); + // add `domainId` to the URL query string + if (getDomainId() != null) { + joiner.add(getDomainId().toUrlQueryString(prefix + "domainId" + suffix)); } // add `privacyPolicy` to the URL query string @@ -744,11 +396,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%stermsOfUse%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTermsOfUse())))); } - // add `domainId` to the URL query string - if (getDomainId() != null) { - joiner.add(getDomainId().toUrlQueryString(prefix + "domainId" + suffix)); - } - return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/WebViewPage.java b/paas/src/main/java/org/thingsboard/client/model/WebViewPage.java index d0d5588c..32edd6e3 100644 --- a/paas/src/main/java/org/thingsboard/client/model/WebViewPage.java +++ b/paas/src/main/java/org/thingsboard/client/model/WebViewPage.java @@ -42,7 +42,6 @@ */ @JsonPropertyOrder({ WebViewPage.JSON_PROPERTY_LABEL, - WebViewPage.JSON_PROPERTY_VISIBLE, WebViewPage.JSON_PROPERTY_ICON, WebViewPage.JSON_PROPERTY_URL }) @@ -58,10 +57,6 @@ public class WebViewPage extends MobilePage { @javax.annotation.Nullable private String label; - public static final String JSON_PROPERTY_VISIBLE = "visible"; - @javax.annotation.Nonnull - private Boolean visible; - public static final String JSON_PROPERTY_ICON = "icon"; @javax.annotation.Nullable private String icon; @@ -97,30 +92,6 @@ public void setLabel(@javax.annotation.Nullable String label) { } - public WebViewPage visible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - return this; - } - - /** - * Indicates if page is visible - * @return visible - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getVisible() { - return visible; - } - - - @JsonProperty(value = JSON_PROPERTY_VISIBLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVisible(@javax.annotation.Nonnull Boolean visible) { - this.visible = visible; - } - - public WebViewPage icon(@javax.annotation.Nullable String icon) { this.icon = icon; return this; @@ -175,6 +146,12 @@ public WebViewPage type(@javax.annotation.Nonnull MobilePageType type) { return this; } + @Override + public WebViewPage visible(@javax.annotation.Nullable Boolean visible) { + this.setVisible(visible); + return this; + } + /** * Return true if this WebViewPage object is equal to o. */ @@ -188,7 +165,6 @@ public boolean equals(Object o) { } WebViewPage webViewPage = (WebViewPage) o; return Objects.equals(this.label, webViewPage.label) && - Objects.equals(this.visible, webViewPage.visible) && Objects.equals(this.icon, webViewPage.icon) && Objects.equals(this.url, webViewPage.url) && super.equals(o); @@ -196,7 +172,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(label, visible, icon, url, super.hashCode()); + return Objects.hash(label, icon, url, super.hashCode()); } @Override @@ -205,7 +181,6 @@ public String toString() { sb.append("class WebViewPage {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append("}"); diff --git a/paas/src/main/java/org/thingsboard/client/model/WidgetTypeId.java b/paas/src/main/java/org/thingsboard/client/model/WidgetTypeId.java index ec1a73ad..5d027764 100644 --- a/paas/src/main/java/org/thingsboard/client/model/WidgetTypeId.java +++ b/paas/src/main/java/org/thingsboard/client/model/WidgetTypeId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * WidgetTypeId */ @JsonPropertyOrder({ - WidgetTypeId.JSON_PROPERTY_ID, - WidgetTypeId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class WidgetTypeId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class WidgetTypeId extends EntityId { public WidgetTypeId() { } + @Override public WidgetTypeId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public WidgetTypeId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this WidgetTypeId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - WidgetTypeId widgetTypeId = (WidgetTypeId) o; - return Objects.equals(this.id, widgetTypeId.id) && - Objects.equals(this.entityType, widgetTypeId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class WidgetTypeId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("WidgetTypeId", WidgetTypeId.class); + JSON.registerDiscriminator(WidgetTypeId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java b/paas/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java index 4661fdaa..88750984 100644 --- a/paas/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java +++ b/paas/src/main/java/org/thingsboard/client/model/WidgetsBundleId.java @@ -21,86 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * WidgetsBundleId */ @JsonPropertyOrder({ - WidgetsBundleId.JSON_PROPERTY_ID, - WidgetsBundleId.JSON_PROPERTY_ENTITY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class WidgetsBundleId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; - - public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; - @javax.annotation.Nonnull - private EntityType entityType; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class WidgetsBundleId extends EntityId { public WidgetsBundleId() { } + @Override public WidgetsBundleId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - + @Override public WidgetsBundleId entityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; + this.setEntityType(entityType); return this; } - /** - * string - * @return entityType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EntityType getEntityType() { - return entityType; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { - this.entityType = entityType; - } - - /** * Return true if this WidgetsBundleId object is equal to o. */ @@ -112,22 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - WidgetsBundleId widgetsBundleId = (WidgetsBundleId) o; - return Objects.equals(this.id, widgetsBundleId.id) && - Objects.equals(this.entityType, widgetsBundleId.entityType); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, entityType); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class WidgetsBundleId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,5 +149,11 @@ public String toUrlQueryString(String prefix) { return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("WidgetsBundleId", WidgetsBundleId.class); + JSON.registerDiscriminator(WidgetsBundleId.class, "entityType", mappings); +} } diff --git a/paas/src/test/java/org/thingsboard/client/api/AdminApiTest.java b/paas/src/test/java/org/thingsboard/client/api/AdminApiTest.java index bedcf0a8..5aeabd05 100644 --- a/paas/src/test/java/org/thingsboard/client/api/AdminApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/AdminApiTest.java @@ -88,7 +88,7 @@ void testAdminSettingsLifecycle() throws Exception { FeaturesInfo featuresInfo = client.getFeaturesInfo(); assertNotNull(featuresInfo); assertFalse(featuresInfo.getSmsEnabled()); - assertTrue(featuresInfo.getOauthEnabled()); + assertFalse(featuresInfo.getOauthEnabled()); // check updates UpdateMessage updateMessage = client.checkUpdates(); diff --git a/paas/src/test/java/org/thingsboard/client/api/AlarmApiTest.java b/paas/src/test/java/org/thingsboard/client/api/AlarmApiTest.java index bcc4041b..fc253a82 100644 --- a/paas/src/test/java/org/thingsboard/client/api/AlarmApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/AlarmApiTest.java @@ -62,10 +62,7 @@ void testAlarmLifecycle() throws ApiException { Alarm alarm = new Alarm(); alarm.setType(((i % 2 == 0) ? "Temperature Alarm" : "Connection Alarm")); alarm.setSeverity(((i % 2 == 0) ? AlarmSeverity.CRITICAL : AlarmSeverity.WARNING)); - EntityId originator = new EntityId(); - originator.setEntityType(EntityType.DEVICE); - originator.setId((i % 2 == 0) ? createdDevice1.getId().getId() : createdDevice2.getId().getId()); - alarm.setOriginator(originator); + alarm.setOriginator((i % 2 == 0) ? createdDevice1.getId() : createdDevice2.getId()); Alarm createdAlarm = client.saveAlarm(alarm); assertNotNull(createdAlarm); diff --git a/paas/src/test/java/org/thingsboard/client/api/AlarmCommentApiTest.java b/paas/src/test/java/org/thingsboard/client/api/AlarmCommentApiTest.java index 3f473712..e7fcd5a1 100644 --- a/paas/src/test/java/org/thingsboard/client/api/AlarmCommentApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/AlarmCommentApiTest.java @@ -52,10 +52,7 @@ void testAlarmComments() throws ApiException { Alarm alarm = new Alarm(); alarm.setType("Temperature Alarm"); alarm.setSeverity(AlarmSeverity.CRITICAL); - EntityId originator = new EntityId(); - originator.setEntityType(EntityType.DEVICE); - originator.setId(createdDevice.getId().getId()); - alarm.setOriginator(originator); + alarm.setOriginator(createdDevice.getId()); Alarm createdAlarm = client.saveAlarm(alarm); String alarmId = createdAlarm.getId().getId().toString(); diff --git a/paas/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java b/paas/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java index fc1149a1..1bc706e6 100644 --- a/paas/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java @@ -72,10 +72,7 @@ void testCalculatedFieldLifecycle() throws ApiException { cf.setName(TEST_PREFIX + "CalcField_" + timestamp + "_" + i); cf.setType(CalculatedFieldType.SIMPLE); - EntityId entityId = new EntityId(); - entityId.setEntityType(EntityType.DEVICE); - entityId.setId(createdDevice1.getId().getId()); - cf.setEntityId(entityId); + cf.setEntityId(createdDevice1.getId()); SimpleCalculatedFieldConfiguration config = new SimpleCalculatedFieldConfiguration(); @@ -108,11 +105,7 @@ void testCalculatedFieldLifecycle() throws ApiException { CalculatedField cf = new CalculatedField(); cf.setName(TEST_PREFIX + "CalcField2_" + timestamp + "_" + i); cf.setType(CalculatedFieldType.SIMPLE); - - EntityId entityId = new EntityId(); - entityId.setEntityType(EntityType.DEVICE); - entityId.setId(createdDevice2.getId().getId()); - cf.setEntityId(entityId); + cf.setEntityId(createdDevice2.getId()); SimpleCalculatedFieldConfiguration config = new SimpleCalculatedFieldConfiguration(); @@ -236,10 +229,7 @@ void testAlarmCalculatedFieldLifecycle() throws ApiException { cf.setName(TEST_PREFIX + "AlarmCalcField_" + timestamp); cf.setType(CalculatedFieldType.ALARM); - EntityId entityId = new EntityId(); - entityId.setEntityType(EntityType.DEVICE); - entityId.setId(createdDevice.getId().getId()); - cf.setEntityId(entityId); + cf.setEntityId(createdDevice.getId()); cf.setConfiguration(config); CalculatedField created = client.saveCalculatedField(cf); diff --git a/paas/src/test/java/org/thingsboard/client/api/DeviceApiTest.java b/paas/src/test/java/org/thingsboard/client/api/DeviceApiTest.java index 04057733..b72398b5 100644 --- a/paas/src/test/java/org/thingsboard/client/api/DeviceApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/DeviceApiTest.java @@ -190,8 +190,8 @@ void testFindByQuery() throws ApiException { device = client.saveDevice(device, null, null, null, null, null, null); EntityRelation buildingToDevice = new EntityRelation(); - buildingToDevice.setFrom(new EntityId().id(building.getId().getId()).entityType(EntityType.ASSET)); - buildingToDevice.setTo(new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE)); + buildingToDevice.setFrom(building.getId()); + buildingToDevice.setTo(device.getId()); buildingToDevice.setType("Contains"); buildingToDevice.setTypeGroup(RelationTypeGroup.COMMON); EntityRelation savedRelation = client.saveRelation(buildingToDevice); diff --git a/paas/src/test/java/org/thingsboard/client/api/EntityGroupApiTest.java b/paas/src/test/java/org/thingsboard/client/api/EntityGroupApiTest.java index e2c64e0d..94a669a8 100644 --- a/paas/src/test/java/org/thingsboard/client/api/EntityGroupApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/EntityGroupApiTest.java @@ -313,7 +313,7 @@ void testShareEntityGroup() throws ApiException { String broadGroupId = broadGroup.getId().getId().toString(); ShareGroupRequest shareRequest = new ShareGroupRequest(); shareRequest.setAllUserGroup(true); - shareRequest.setOwnerId(new EntityId().id(savedCustomer.getId().getId()).entityType(EntityType.CUSTOMER)); + shareRequest.setOwnerId(savedCustomer.getId()); client.shareEntityGroup(broadGroupId, shareRequest); // shareEntityGroupToChildOwnerUserGroup — share with the customer admin group via role diff --git a/paas/src/test/java/org/thingsboard/client/api/EntityQueryApiTest.java b/paas/src/test/java/org/thingsboard/client/api/EntityQueryApiTest.java index aa787e62..4ec97d67 100644 --- a/paas/src/test/java/org/thingsboard/client/api/EntityQueryApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/EntityQueryApiTest.java @@ -316,8 +316,8 @@ void testFindByAssetSearchQueryFilter() throws Exception { for (int i = 0; i < 3; i++) { Asset child = client.saveAsset(new Asset().name(QUERY_TEST_PREFIX + "asqChild_" + ts + "_" + i).type(childType), null, null, null, null, null); EntityRelation rel = new EntityRelation(); - rel.setFrom(new EntityId().id(root.getId().getId()).entityType(EntityType.ASSET)); - rel.setTo(new EntityId().id(child.getId().getId()).entityType(EntityType.ASSET)); + rel.setFrom(root.getId()); + rel.setTo(child.getId()); rel.setType("Contains"); rel.setTypeGroup(RelationTypeGroup.COMMON); client.saveRelation(rel); @@ -349,8 +349,8 @@ void testFindByDeviceSearchQueryFilter() throws Exception { for (int i = 0; i < 2; i++) { Device device = client.saveDevice(new Device().name(QUERY_TEST_PREFIX + "dsqDev_" + ts + "_" + i).type(deviceType), null, null, null, null, null, null); EntityRelation rel = new EntityRelation(); - rel.setFrom(new EntityId().id(root.getId().getId()).entityType(EntityType.ASSET)); - rel.setTo(new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE)); + rel.setFrom(root.getId()); + rel.setTo(device.getId()); rel.setType("Contains"); rel.setTypeGroup(RelationTypeGroup.COMMON); client.saveRelation(rel); @@ -419,8 +419,8 @@ void testFindByEdgeSearchQueryFilter() throws Exception { .edgeLicenseKey("licenseKey") .cloudEndpoint("http://localhost:8080"), null, null); EntityRelation rel = new EntityRelation(); - rel.setFrom(new EntityId().id(root.getId().getId()).entityType(EntityType.ASSET)); - rel.setTo(new EntityId().id(edge.getId().getId()).entityType(EntityType.EDGE)); + rel.setFrom(root.getId()); + rel.setTo(edge.getId()); rel.setType("Manages"); rel.setTypeGroup(RelationTypeGroup.COMMON); client.saveRelation(rel); @@ -453,7 +453,7 @@ void testFindByEntityViewTypeFilter() throws Exception { client.saveEntityView(new EntityView() .name(QUERY_TEST_PREFIX + "evt_" + ts + "_" + i) .type(viewType) - .entityId(new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE)), + .entityId(device.getId()), null, null, null, null, null); } @@ -479,11 +479,11 @@ void testFindByEntityViewSearchQueryFilter() throws Exception { EntityView ev = client.saveEntityView(new EntityView() .name(QUERY_TEST_PREFIX + "evsq_" + ts + "_" + i) .type(viewType) - .entityId(new EntityId().id(rootDevice.getId().getId()).entityType(EntityType.DEVICE)), + .entityId(rootDevice.getId()), null, null, null, null, null); EntityRelation rel = new EntityRelation(); - rel.setFrom(new EntityId().id(rootDevice.getId().getId()).entityType(EntityType.DEVICE)); - rel.setTo(new EntityId().id(ev.getId().getId()).entityType(EntityType.ENTITY_VIEW)); + rel.setFrom(rootDevice.getId()); + rel.setTo(ev.getId()); rel.setType("HasView"); rel.setTypeGroup(RelationTypeGroup.COMMON); client.saveRelation(rel); @@ -514,8 +514,8 @@ void testFindByRelationsQueryFilter() throws Exception { for (int i = 0; i < 2; i++) { Device device = client.saveDevice(new Device().name(QUERY_TEST_PREFIX + "rqfDev_" + ts + "_" + i).type("sensor"), null, null, null, null, null, null); EntityRelation rel = new EntityRelation(); - rel.setFrom(new EntityId().id(root.getId().getId()).entityType(EntityType.ASSET)); - rel.setTo(new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE)); + rel.setFrom(root.getId()); + rel.setTo(device.getId()); rel.setType("Contains"); rel.setTypeGroup(RelationTypeGroup.COMMON); client.saveRelation(rel); @@ -654,7 +654,7 @@ void testFindByEntitiesByGroupNameFilter() throws Exception { .entityFilter(new EntitiesByGroupNameFilter() .groupType(EntityType.DEVICE) .entityGroupNameFilter(groupName) - .ownerId(new EntityId().id(savedTenant.getId().getId()).entityType(EntityType.TENANT))) + .ownerId(savedTenant.getId())) .pageLink(pageLink(10)) .addEntityFieldsItem(new EntityKey().type(EntityKeyType.ENTITY_FIELD).key("name")); diff --git a/paas/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java b/paas/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java index 54d3b567..8d6892e8 100644 --- a/paas/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java @@ -38,14 +38,6 @@ public class EntityRelationApiTest extends AbstractApiTest { - private EntityId entityId(Device device) { - return new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE); - } - - private EntityId entityId(Asset asset) { - return new EntityId().id(asset.getId().getId()).entityType(EntityType.ASSET); - } - @Test void testEntityRelationLifecycle() throws ApiException { long timestamp = System.currentTimeMillis(); @@ -78,8 +70,8 @@ void testEntityRelationLifecycle() throws ApiException { // create relations: building -> Contains -> floor, floor -> Contains -> device1/device2/device3 EntityRelation buildingToFloor = new EntityRelation(); - buildingToFloor.setFrom(entityId(building)); - buildingToFloor.setTo(entityId(floor)); + buildingToFloor.setFrom(building.getId()); + buildingToFloor.setTo(floor.getId()); buildingToFloor.setType("Contains"); buildingToFloor.setTypeGroup(RelationTypeGroup.COMMON); EntityRelation savedRelation = client.saveRelation(buildingToFloor); @@ -87,17 +79,17 @@ void testEntityRelationLifecycle() throws ApiException { assertEquals("Contains", savedRelation.getType()); client.saveRelation(new EntityRelation() - .from(entityId(floor)) - .to(entityId(device1)) + .from(floor.getId()) + .to(device1.getId()) .type("Contains") .typeGroup(RelationTypeGroup.COMMON)); client.saveRelation(new EntityRelation() - .from(entityId(floor)) - .to(entityId(device2)) + .from(floor.getId()) + .to(device2.getId()) .type("Contains").typeGroup(RelationTypeGroup.COMMON)); client.saveRelation(new EntityRelation() - .from(entityId(floor)) - .to(entityId(device3)) + .from(floor.getId()) + .to(device3.getId()) .type("Manages") .typeGroup(RelationTypeGroup.COMMON)); diff --git a/paas/src/test/java/org/thingsboard/client/api/EntityViewApiTest.java b/paas/src/test/java/org/thingsboard/client/api/EntityViewApiTest.java index dad70060..3669108c 100644 --- a/paas/src/test/java/org/thingsboard/client/api/EntityViewApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/EntityViewApiTest.java @@ -48,9 +48,7 @@ void testSaveAndGetEntityView() throws Exception { EntityView ev = new EntityView(); ev.setName(EV_PREFIX + "save_" + ts); ev.setType("testType"); - ev.setEntityId(new EntityId() - .id(device.getId().getId()) - .entityType(EntityType.DEVICE)); + ev.setEntityId(device.getId()); ev.setKeys(new TelemetryEntityView() .timeseries(List.of("temperature", "humidity")) .attributes(new AttributesEntityView() @@ -209,9 +207,7 @@ private EntityView createEntityView(String name, String type, Device device) thr EntityView ev = new EntityView(); ev.setName(name); ev.setType(type); - ev.setEntityId(new EntityId() - .id(device.getId().getId()) - .entityType(EntityType.DEVICE)); + ev.setEntityId(device.getId()); ev.setKeys(new TelemetryEntityView() .timeseries(List.of("temperature")) .attributes(new AttributesEntityView() diff --git a/paas/src/test/java/org/thingsboard/client/api/UserApiTest.java b/paas/src/test/java/org/thingsboard/client/api/UserApiTest.java index d78fefb6..41099f7a 100644 --- a/paas/src/test/java/org/thingsboard/client/api/UserApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/UserApiTest.java @@ -230,7 +230,7 @@ void testGetUsersForAssign() throws Exception { Alarm alarm = client.saveAlarm(new Alarm() .type("TestAlarm") - .originator(new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE)) + .originator(device.getId()) .severity(AlarmSeverity.WARNING) .acknowledged(false) .cleared(false)); diff --git a/pe/docs/BaseReadTsKvQuery.md b/pe/docs/BaseReadTsKvQuery.md index a1ef1e93..37c29fde 100644 --- a/pe/docs/BaseReadTsKvQuery.md +++ b/pe/docs/BaseReadTsKvQuery.md @@ -14,8 +14,8 @@ | **aggParameters** | **AggregationParams** | | [optional] | | **limit** | **Integer** | | [optional] | | **order** | **String** | | [optional] | -| **interval** | **Long** | | [optional] | | **aggregation** | **Aggregation** | | [optional] | +| **interval** | **Long** | | [optional] | diff --git a/pe/docs/CalculatedFieldDebugEventFilter.md b/pe/docs/CalculatedFieldDebugEventFilter.md index e31ffb23..4654cee1 100644 --- a/pe/docs/CalculatedFieldDebugEventFilter.md +++ b/pe/docs/CalculatedFieldDebugEventFilter.md @@ -17,8 +17,8 @@ | **msgType** | **String** | String value representing the message type | [optional] | | **arguments** | **String** | String value representing the arguments that were used in the calculation performed | [optional] | | **result** | **String** | String value representing the result of a calculation | [optional] | -| **isError** | **Boolean** | | [optional] | | **error** | **Boolean** | | [optional] | +| **isError** | **Boolean** | | [optional] | ### Enum: EntityTypeEnum diff --git a/pe/docs/Dashboard.md b/pe/docs/Dashboard.md index 31c3d8d7..76572b33 100644 --- a/pe/docs/Dashboard.md +++ b/pe/docs/Dashboard.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **DashboardId** | JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. | [optional] | -| **createdTime** | **Long** | Timestamp of the dashboard creation, in milliseconds | [optional] [readonly] | -| **tenantId** | **TenantId** | JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id. | [optional] | | **title** | **String** | Title of the dashboard. | [optional] | | **image** | **String** | Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. | [optional] [readonly] | -| **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | | **mobileHide** | **Boolean** | Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. | [optional] [readonly] | | **mobileOrder** | **Integer** | Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications | [optional] [readonly] | -| **version** | **Long** | | [optional] | -| **resources** | **List\** | | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | | **name** | **String** | Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. | [optional] [readonly] | +| **resources** | **List\** | | [optional] | +| **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | +| **createdTime** | **Long** | Timestamp of the dashboard creation, in milliseconds | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. | [optional] | +| **id** | **DashboardId** | JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. | [optional] | | **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **tenantId** | **TenantId** | JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. | [optional] [readonly] | +| **version** | **Long** | | [optional] | diff --git a/pe/docs/DebugConverterEventFilter.md b/pe/docs/DebugConverterEventFilter.md index 7915aa69..abf7db4a 100644 --- a/pe/docs/DebugConverterEventFilter.md +++ b/pe/docs/DebugConverterEventFilter.md @@ -15,8 +15,8 @@ | **in** | **String** | | [optional] | | **out** | **String** | | [optional] | | **metadata** | **String** | | [optional] | -| **isError** | **Boolean** | | [optional] | | **error** | **Boolean** | | [optional] | +| **isError** | **Boolean** | | [optional] | diff --git a/pe/docs/DebugIntegrationEventFilter.md b/pe/docs/DebugIntegrationEventFilter.md index 3800a894..c9b6d8d6 100644 --- a/pe/docs/DebugIntegrationEventFilter.md +++ b/pe/docs/DebugIntegrationEventFilter.md @@ -14,8 +14,8 @@ | **type** | **String** | | [optional] | | **message** | **String** | | [optional] | | **statusIntegration** | **String** | | [optional] | -| **isError** | **Boolean** | | [optional] | | **error** | **Boolean** | | [optional] | +| **isError** | **Boolean** | | [optional] | diff --git a/pe/docs/Device.md b/pe/docs/Device.md index e0bc6354..a3dbab50 100644 --- a/pe/docs/Device.md +++ b/pe/docs/Device.md @@ -18,9 +18,9 @@ | **firmwareId** | **OtaPackageId** | JSON object with Ota Package Id. | [optional] | | **softwareId** | **OtaPackageId** | JSON object with Ota Package Id. | [optional] | | **version** | **Long** | | [optional] | +| **deviceData** | **DeviceData** | JSON object with content specific to type of transport in the device profile. | [optional] | | **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | 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] | -| **deviceData** | **DeviceData** | JSON object with content specific to type of transport in the device profile. | [optional] | diff --git a/pe/docs/DeviceInfo.md b/pe/docs/DeviceInfo.md index 7b3395c6..7f772f34 100644 --- a/pe/docs/DeviceInfo.md +++ b/pe/docs/DeviceInfo.md @@ -21,9 +21,9 @@ | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | | **active** | **Boolean** | Device active flag. | [optional] [readonly] | +| **deviceData** | **DeviceData** | JSON object with content specific to type of transport in the device profile. | [optional] | | **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | 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] | -| **deviceData** | **DeviceData** | JSON object with content specific to type of transport in the device profile. | [optional] | diff --git a/pe/docs/ErrorComponentAllOfException.md b/pe/docs/ErrorComponentAllOfException.md index b2bb494b..20724da9 100644 --- a/pe/docs/ErrorComponentAllOfException.md +++ b/pe/docs/ErrorComponentAllOfException.md @@ -9,9 +9,9 @@ |------------ | ------------- | ------------- | -------------| | **cause** | **ErrorComponentAllOfExceptionCause** | | [optional] | | **stackTrace** | **List\** | | [optional] | +| **localizedMessage** | **String** | | [optional] | | **message** | **String** | | [optional] | | **suppressed** | **List\** | | [optional] | -| **localizedMessage** | **String** | | [optional] | diff --git a/pe/docs/ErrorComponentAllOfExceptionCause.md b/pe/docs/ErrorComponentAllOfExceptionCause.md index fb802cb2..1fa1012e 100644 --- a/pe/docs/ErrorComponentAllOfExceptionCause.md +++ b/pe/docs/ErrorComponentAllOfExceptionCause.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **stackTrace** | **List\** | | [optional] | -| **message** | **String** | | [optional] | | **localizedMessage** | **String** | | [optional] | +| **message** | **String** | | [optional] | diff --git a/pe/docs/FeaturesInfo.md b/pe/docs/FeaturesInfo.md index 7c1a8aa5..861ec778 100644 --- a/pe/docs/FeaturesInfo.md +++ b/pe/docs/FeaturesInfo.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **smsEnabled** | **Boolean** | | [optional] | -| **oauthEnabled** | **Boolean** | | [optional] | | **whiteLabelingEnabled** | **Boolean** | | [optional] | +| **emailEnabled** | **Boolean** | | [optional] | +| **smsEnabled** | **Boolean** | | [optional] | | **notificationEnabled** | **Boolean** | | [optional] | +| **oauthEnabled** | **Boolean** | | [optional] | | **twoFaEnabled** | **Boolean** | | [optional] | -| **emailEnabled** | **Boolean** | | [optional] | diff --git a/pe/docs/MicrosoftTeamsNotificationTargetConfig.md b/pe/docs/MicrosoftTeamsNotificationTargetConfig.md index b39ff995..f6abb253 100644 --- a/pe/docs/MicrosoftTeamsNotificationTargetConfig.md +++ b/pe/docs/MicrosoftTeamsNotificationTargetConfig.md @@ -12,11 +12,11 @@ | **webhookUrl** | **String** | | | | **channelName** | **String** | | | | **useOldApi** | **Boolean** | | [optional] | -| **id** | **Object** | | [optional] | -| **title** | **String** | | [optional] | | **email** | **String** | | [optional] | | **firstName** | **String** | | [optional] | +| **id** | **Object** | | [optional] | | **lastName** | **String** | | [optional] | +| **title** | **String** | | [optional] | diff --git a/pe/docs/MobileSelfRegistrationParams.md b/pe/docs/MobileSelfRegistrationParams.md index 131b5c80..d3be9c67 100644 --- a/pe/docs/MobileSelfRegistrationParams.md +++ b/pe/docs/MobileSelfRegistrationParams.md @@ -10,8 +10,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **privacyPolicy** | **String** | Privacy policy text. Supports HTML. | [optional] | -| **termsOfUse** | **String** | Terms of User text. Supports HTML. | [optional] | | **redirect** | **MobileRedirectParams** | Mobile redirect params. | | +| **termsOfUse** | **String** | Terms of User text. Supports HTML. | [optional] | diff --git a/pe/docs/OtaPackageData.md b/pe/docs/OtaPackageData.md index ef21853b..1acf91c1 100644 --- a/pe/docs/OtaPackageData.md +++ b/pe/docs/OtaPackageData.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **_short** | **Integer** | | [optional] | | **_char** | **String** | | [optional] | +| **direct** | **Boolean** | | [optional] | +| **_double** | **Double** | | [optional] | +| **_float** | **Float** | | [optional] | | **_int** | **Integer** | | [optional] | | **_long** | **Long** | | [optional] | -| **_float** | **Float** | | [optional] | -| **_double** | **Double** | | [optional] | -| **direct** | **Boolean** | | [optional] | | **readOnly** | **Boolean** | | [optional] | +| **_short** | **Integer** | | [optional] | diff --git a/pe/docs/ReportTemplateConfig.md b/pe/docs/ReportTemplateConfig.md index 53571dfc..0c4cda14 100644 --- a/pe/docs/ReportTemplateConfig.md +++ b/pe/docs/ReportTemplateConfig.md @@ -8,11 +8,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **format** | **TbReportFormat** | Report format | | -| **entityAliases** | **List\** | | [optional] | | **filters** | **List\** | | [optional] | | **namePattern** | **String** | | [optional] | | **components** | **List\** | | [optional] | | **timeDataPattern** | **String** | | [optional] | +| **entityAliases** | **List\** | | [optional] | diff --git a/pe/docs/RuleChainDebugEventFilter.md b/pe/docs/RuleChainDebugEventFilter.md index 6f9e9e0e..9ace52e2 100644 --- a/pe/docs/RuleChainDebugEventFilter.md +++ b/pe/docs/RuleChainDebugEventFilter.md @@ -12,8 +12,8 @@ | **server** | **String** | String value representing the server name, identifier or ip address where the platform is running | [optional] | | **errorStr** | **String** | The case insensitive 'contains' filter based on error message | [optional] | | **message** | **String** | String value representing the message | [optional] | -| **isError** | **Boolean** | | [optional] | | **error** | **Boolean** | | [optional] | +| **isError** | **Boolean** | | [optional] | diff --git a/pe/docs/RuleNodeDebugEventFilter.md b/pe/docs/RuleNodeDebugEventFilter.md index 16baea68..6791375f 100644 --- a/pe/docs/RuleNodeDebugEventFilter.md +++ b/pe/docs/RuleNodeDebugEventFilter.md @@ -19,8 +19,8 @@ | **relationType** | **String** | String value representing the type of message routing | [optional] | | **dataSearch** | **String** | The case insensitive 'contains' filter based on data (key and value) for the message. | [optional] | | **metadataSearch** | **String** | The case insensitive 'contains' filter based on metadata (key and value) for the message. | [optional] | -| **isError** | **Boolean** | | [optional] | | **error** | **Boolean** | | [optional] | +| **isError** | **Boolean** | | [optional] | ### Enum: MsgDirectionTypeEnum diff --git a/pe/docs/SelfRegistrationParams.md b/pe/docs/SelfRegistrationParams.md index feb55b87..4ba790dc 100644 --- a/pe/docs/SelfRegistrationParams.md +++ b/pe/docs/SelfRegistrationParams.md @@ -7,20 +7,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **permissions** | **List\** | | [optional] | | **type** | **SelfRegistrationType** | | | -| **showPrivacyPolicy** | **Boolean** | | [optional] | -| **showTermsOfUse** | **Boolean** | | [optional] | -| **title** | **String** | | [optional] | | **enabled** | **Boolean** | | [optional] | -| **homeDashboard** | **HomeDashboardParams** | | [optional] | +| **title** | **String** | | [optional] | +| **captcha** | **CaptchaParams** | | [optional] | +| **permissions** | **List\** | | [optional] | | **notificationRecipient** | **NotificationTargetId** | | [optional] | | **signUpFields** | **List\** | | [optional] | -| **defaultDashboard** | **DefaultDashboardParams** | | [optional] | | **customerTitlePrefix** | **String** | | [optional] | -| **customMenuId** | **CustomMenuId** | | [optional] | +| **showPrivacyPolicy** | **Boolean** | | [optional] | +| **showTermsOfUse** | **Boolean** | | [optional] | +| **defaultDashboard** | **DefaultDashboardParams** | | [optional] | +| **homeDashboard** | **HomeDashboardParams** | | [optional] | | **customerGroupId** | **EntityGroupId** | | [optional] | -| **captcha** | **CaptchaParams** | | [optional] | +| **customMenuId** | **CustomMenuId** | | [optional] | diff --git a/pe/docs/TbResource.md b/pe/docs/TbResource.md index bfa63893..3b742711 100644 --- a/pe/docs/TbResource.md +++ b/pe/docs/TbResource.md @@ -25,8 +25,8 @@ A JSON value representing the Resource. | **preview** | **String** | | [optional] | | **name** | **String** | | [optional] [readonly] | | **_public** | **Boolean** | | [optional] | -| **publicLink** | **String** | | [optional] [readonly] | | **link** | **String** | | [optional] [readonly] | +| **publicLink** | **String** | | [optional] [readonly] | diff --git a/pe/docs/TbResourceInfo.md b/pe/docs/TbResourceInfo.md index 02741685..506b11ae 100644 --- a/pe/docs/TbResourceInfo.md +++ b/pe/docs/TbResourceInfo.md @@ -23,8 +23,8 @@ A JSON value representing the Resource Info. | **descriptor** | **com.fasterxml.jackson.databind.JsonNode** | Resource descriptor. | [optional] | | **name** | **String** | | [optional] [readonly] | | **_public** | **Boolean** | | [optional] | -| **publicLink** | **String** | | [optional] [readonly] | | **link** | **String** | | [optional] [readonly] | +| **publicLink** | **String** | | [optional] [readonly] | diff --git a/pe/docs/TsKvEntry.md b/pe/docs/TsKvEntry.md index bacf579d..89ae6c19 100644 --- a/pe/docs/TsKvEntry.md +++ b/pe/docs/TsKvEntry.md @@ -13,10 +13,10 @@ | **doubleValue** | **Double** | | [optional] | | **longValue** | **Long** | | [optional] | | **booleanValue** | **Boolean** | | [optional] | +| **valueAsString** | **String** | | [optional] | | **dataType** | **DataType** | | [optional] | | **jsonValue** | **String** | | [optional] | | **strValue** | **String** | | [optional] | -| **valueAsString** | **String** | | [optional] | | **version** | **Long** | | [optional] | diff --git a/pe/docs/WebSelfRegistrationParams.md b/pe/docs/WebSelfRegistrationParams.md index df79e057..54b71f2a 100644 --- a/pe/docs/WebSelfRegistrationParams.md +++ b/pe/docs/WebSelfRegistrationParams.md @@ -9,9 +9,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **domainId** | **DomainId** | Domain name for self registration URL. Typically this matches the domain name from the Login White Labeling page. | | | **privacyPolicy** | **String** | Privacy policy text. Supports HTML. | [optional] | | **termsOfUse** | **String** | Terms of User text. Supports HTML. | [optional] | -| **domainId** | **DomainId** | Domain name for self registration URL. Typically this matches the domain name from the Login White Labeling page. | | diff --git a/pe/spec/openapi.json b/pe/spec/openapi.json index ae8a55dc..d7865bf1 100644 --- a/pe/spec/openapi.json +++ b/pe/spec/openapi.json @@ -118921,12 +118921,12 @@ "order": { "type": "string" }, + "aggregation": { + "$ref": "#/components/schemas/Aggregation" + }, "interval": { "type": "integer", "format": "int64" - }, - "aggregation": { - "$ref": "#/components/schemas/Aggregation" } } }, @@ -119462,12 +119462,12 @@ "x + y": 32 } }, + "error": { + "type": "boolean" + }, "isError": { "type": "boolean", "writeOnly": true - }, - "error": { - "type": "boolean" } } } @@ -120889,26 +120889,6 @@ "Dashboard": { "type": "object", "properties": { - "id": { - "$ref": "#/components/schemas/DashboardId", - "description": "JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard." - }, - "createdTime": { - "type": "integer", - "format": "int64", - "description": "Timestamp of the dashboard creation, in milliseconds", - "example": 1609459200000, - "readOnly": true - }, - "tenantId": { - "$ref": "#/components/schemas/TenantId", - "description": "JSON object with Tenant Id. Tenant Id of the dashboard can't be changed.", - "readOnly": true - }, - "customerId": { - "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. " - }, "title": { "type": "string", "description": "Title of the dashboard." @@ -120918,15 +120898,6 @@ "description": "Thumbnail picture for rendering of the dashboards in a grid view on mobile devices.", "readOnly": true }, - "assignedCustomers": { - "type": "array", - "description": "List of assigned customers with their info.", - "items": { - "$ref": "#/components/schemas/ShortCustomerInfo" - }, - "readOnly": true, - "uniqueItems": true - }, "mobileHide": { "type": "boolean", "description": "Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens.", @@ -120938,9 +120909,13 @@ "description": "Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications", "readOnly": true }, - "version": { - "type": "integer", - "format": "int64" + "configuration": { + "$ref": "#/components/schemas/JsonNode" + }, + "name": { + "type": "string", + "description": "Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", + "readOnly": true }, "resources": { "type": "array", @@ -120948,17 +120923,42 @@ "$ref": "#/components/schemas/ResourceExportData" } }, - "configuration": { - "$ref": "#/components/schemas/JsonNode" + "assignedCustomers": { + "type": "array", + "description": "List of assigned customers with their info.", + "items": { + "$ref": "#/components/schemas/ShortCustomerInfo" + }, + "readOnly": true, + "uniqueItems": true }, - "name": { - "type": "string", - "description": "Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the dashboard creation, in milliseconds", + "example": 1609459200000, "readOnly": true }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id. " + }, + "id": { + "$ref": "#/components/schemas/DashboardId", + "description": "JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard." + }, "ownerId": { "$ref": "#/components/schemas/EntityId", "description": "JSON object with Customer or Tenant Id" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id. Tenant Id of the dashboard can't be changed.", + "readOnly": true + }, + "version": { + "type": "integer", + "format": "int64" } } }, @@ -121396,12 +121396,12 @@ "metadata": { "type": "string" }, + "error": { + "type": "boolean" + }, "isError": { "type": "boolean", "writeOnly": true - }, - "error": { - "type": "boolean" } } } @@ -121434,12 +121434,12 @@ "statusIntegration": { "type": "string" }, + "error": { + "type": "boolean" + }, "isError": { "type": "boolean", "writeOnly": true - }, - "error": { - "type": "boolean" } } } @@ -122080,6 +122080,10 @@ "type": "integer", "format": "int64" }, + "deviceData": { + "$ref": "#/components/schemas/DeviceData", + "description": "JSON object with content specific to type of transport in the device profile." + }, "ownerId": { "$ref": "#/components/schemas/EntityId", "description": "JSON object with Customer or Tenant Id" @@ -122092,10 +122096,6 @@ "description": "Temperature sensor", "lastConnectedGateway": "784f394c-42b6-435a-983c-b7beff2784f9" } - }, - "deviceData": { - "$ref": "#/components/schemas/DeviceData", - "description": "JSON object with content specific to type of transport in the device profile." } }, "required": [ @@ -122398,6 +122398,10 @@ "description": "Device active flag.", "readOnly": true }, + "deviceData": { + "$ref": "#/components/schemas/DeviceData", + "description": "JSON object with content specific to type of transport in the device profile." + }, "ownerId": { "$ref": "#/components/schemas/EntityId", "description": "JSON object with Customer or Tenant Id" @@ -122410,10 +122414,6 @@ "description": "Temperature sensor", "lastConnectedGateway": "784f394c-42b6-435a-983c-b7beff2784f9" } - }, - "deviceData": { - "$ref": "#/components/schemas/DeviceData", - "description": "JSON object with content specific to type of transport in the device profile." } }, "required": [ @@ -125609,10 +125609,10 @@ } } }, - "message": { + "localizedMessage": { "type": "string" }, - "localizedMessage": { + "message": { "type": "string" } } @@ -125650,6 +125650,9 @@ } } }, + "localizedMessage": { + "type": "string" + }, "message": { "type": "string" }, @@ -125691,17 +125694,14 @@ } } }, - "message": { + "localizedMessage": { "type": "string" }, - "localizedMessage": { + "message": { "type": "string" } } } - }, - "localizedMessage": { - "type": "string" } } } @@ -125897,22 +125897,22 @@ "FeaturesInfo": { "type": "object", "properties": { - "smsEnabled": { + "whiteLabelingEnabled": { "type": "boolean" }, - "oauthEnabled": { + "emailEnabled": { "type": "boolean" }, - "whiteLabelingEnabled": { + "smsEnabled": { "type": "boolean" }, "notificationEnabled": { "type": "boolean" }, - "twoFaEnabled": { + "oauthEnabled": { "type": "boolean" }, - "emailEnabled": { + "twoFaEnabled": { "type": "boolean" } } @@ -128444,20 +128444,20 @@ "useOldApi": { "type": "boolean" }, - "id": { - - }, - "title": { - "type": "string" - }, "email": { "type": "string" }, "firstName": { "type": "string" + }, + "id": { + }, "lastName": { "type": "string" + }, + "title": { + "type": "string" } } } @@ -128937,13 +128937,13 @@ "type": "string", "description": "Privacy policy text. Supports HTML." }, - "termsOfUse": { - "type": "string", - "description": "Terms of User text. Supports HTML." - }, "redirect": { "$ref": "#/components/schemas/MobileRedirectParams", "description": "Mobile redirect params." + }, + "termsOfUse": { + "type": "string", + "description": "Terms of User text. Supports HTML." } } } @@ -130800,34 +130800,34 @@ "data": { "type": "object", "properties": { - "short": { - "type": "integer", - "format": "int32" - }, "char": { "type": "string" }, - "int": { - "type": "integer", - "format": "int32" + "direct": { + "type": "boolean" }, - "long": { - "type": "integer", - "format": "int64" + "double": { + "type": "number", + "format": "double" }, "float": { "type": "number", "format": "float" }, - "double": { - "type": "number", - "format": "double" + "int": { + "type": "integer", + "format": "int32" }, - "direct": { - "type": "boolean" + "long": { + "type": "integer", + "format": "int64" }, "readOnly": { "type": "boolean" + }, + "short": { + "type": "integer", + "format": "int32" } } }, @@ -134825,12 +134825,6 @@ "$ref": "#/components/schemas/TbReportFormat", "description": "Report format" }, - "entityAliases": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityAlias" - } - }, "filters": { "type": "array", "items": { @@ -134848,6 +134842,12 @@ }, "timeDataPattern": { "type": "string" + }, + "entityAliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityAlias" + } } }, "required": [ @@ -135640,12 +135640,12 @@ "type": "string", "description": "String value representing the message" }, + "error": { + "type": "boolean" + }, "isError": { "type": "boolean", "writeOnly": true - }, - "error": { - "type": "boolean" } } } @@ -135992,12 +135992,12 @@ "description": "The case insensitive 'contains' filter based on metadata (key and value) for the message.", "example": "deviceName" }, + "error": { + "type": "boolean" + }, "isError": { "type": "boolean", "writeOnly": true - }, - "error": { - "type": "boolean" } } } @@ -136649,29 +136649,23 @@ } }, "properties": { - "permissions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GroupPermission" - } - }, "type": { "$ref": "#/components/schemas/SelfRegistrationType" }, - "showPrivacyPolicy": { - "type": "boolean" - }, - "showTermsOfUse": { + "enabled": { "type": "boolean" }, "title": { "type": "string" }, - "enabled": { - "type": "boolean" + "captcha": { + "$ref": "#/components/schemas/CaptchaParams" }, - "homeDashboard": { - "$ref": "#/components/schemas/HomeDashboardParams" + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupPermission" + } }, "notificationRecipient": { "$ref": "#/components/schemas/NotificationTargetId" @@ -136682,20 +136676,26 @@ "$ref": "#/components/schemas/SignUpField" } }, - "defaultDashboard": { - "$ref": "#/components/schemas/DefaultDashboardParams" - }, "customerTitlePrefix": { "type": "string" }, - "customMenuId": { - "$ref": "#/components/schemas/CustomMenuId" + "showPrivacyPolicy": { + "type": "boolean" + }, + "showTermsOfUse": { + "type": "boolean" + }, + "defaultDashboard": { + "$ref": "#/components/schemas/DefaultDashboardParams" + }, + "homeDashboard": { + "$ref": "#/components/schemas/HomeDashboardParams" }, "customerGroupId": { "$ref": "#/components/schemas/EntityGroupId" }, - "captcha": { - "$ref": "#/components/schemas/CaptchaParams" + "customMenuId": { + "$ref": "#/components/schemas/CustomMenuId" } }, "required": [ @@ -138040,11 +138040,11 @@ "public": { "type": "boolean" }, - "publicLink": { + "link": { "type": "string", "readOnly": true }, - "link": { + "publicLink": { "type": "string", "readOnly": true } @@ -138156,11 +138156,11 @@ "public": { "type": "boolean" }, - "publicLink": { + "link": { "type": "string", "readOnly": true }, - "link": { + "publicLink": { "type": "string", "readOnly": true } @@ -139856,6 +139856,9 @@ "booleanValue": { "type": "boolean" }, + "valueAsString": { + "type": "string" + }, "dataType": { "$ref": "#/components/schemas/DataType" }, @@ -139865,9 +139868,6 @@ "strValue": { "type": "string" }, - "valueAsString": { - "type": "string" - }, "version": { "type": "integer", "format": "int64" @@ -140857,6 +140857,10 @@ { "type": "object", "properties": { + "domainId": { + "$ref": "#/components/schemas/DomainId", + "description": "Domain name for self registration URL. Typically this matches the domain name from the Login White Labeling page." + }, "privacyPolicy": { "type": "string", "description": "Privacy policy text. Supports HTML." @@ -140864,10 +140868,6 @@ "termsOfUse": { "type": "string", "description": "Terms of User text. Supports HTML." - }, - "domainId": { - "$ref": "#/components/schemas/DomainId", - "description": "Domain name for self registration URL. Typically this matches the domain name from the Login White Labeling page." } } } diff --git a/pe/src/main/java/org/thingsboard/client/model/BaseReadTsKvQuery.java b/pe/src/main/java/org/thingsboard/client/model/BaseReadTsKvQuery.java index 25b330f3..94006085 100644 --- a/pe/src/main/java/org/thingsboard/client/model/BaseReadTsKvQuery.java +++ b/pe/src/main/java/org/thingsboard/client/model/BaseReadTsKvQuery.java @@ -44,8 +44,8 @@ BaseReadTsKvQuery.JSON_PROPERTY_AGG_PARAMETERS, BaseReadTsKvQuery.JSON_PROPERTY_LIMIT, BaseReadTsKvQuery.JSON_PROPERTY_ORDER, - BaseReadTsKvQuery.JSON_PROPERTY_INTERVAL, - BaseReadTsKvQuery.JSON_PROPERTY_AGGREGATION + BaseReadTsKvQuery.JSON_PROPERTY_AGGREGATION, + BaseReadTsKvQuery.JSON_PROPERTY_INTERVAL }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class BaseReadTsKvQuery { @@ -77,14 +77,14 @@ public class BaseReadTsKvQuery { @javax.annotation.Nullable private String order; - public static final String JSON_PROPERTY_INTERVAL = "interval"; - @javax.annotation.Nullable - private Long interval; - public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; @javax.annotation.Nullable private Aggregation aggregation; + public static final String JSON_PROPERTY_INTERVAL = "interval"; + @javax.annotation.Nullable + private Long interval; + public BaseReadTsKvQuery() { } @@ -256,51 +256,51 @@ public void setOrder(@javax.annotation.Nullable String order) { } - public BaseReadTsKvQuery interval(@javax.annotation.Nullable Long interval) { - this.interval = interval; + public BaseReadTsKvQuery aggregation(@javax.annotation.Nullable Aggregation aggregation) { + this.aggregation = aggregation; return this; } /** - * Get interval - * @return interval + * Get aggregation + * @return aggregation */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_INTERVAL, required = false) + @JsonProperty(value = JSON_PROPERTY_AGGREGATION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInterval() { - return interval; + public Aggregation getAggregation() { + return aggregation; } - @JsonProperty(value = JSON_PROPERTY_INTERVAL, required = false) + @JsonProperty(value = JSON_PROPERTY_AGGREGATION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInterval(@javax.annotation.Nullable Long interval) { - this.interval = interval; + public void setAggregation(@javax.annotation.Nullable Aggregation aggregation) { + this.aggregation = aggregation; } - public BaseReadTsKvQuery aggregation(@javax.annotation.Nullable Aggregation aggregation) { - this.aggregation = aggregation; + public BaseReadTsKvQuery interval(@javax.annotation.Nullable Long interval) { + this.interval = interval; return this; } /** - * Get aggregation - * @return aggregation + * Get interval + * @return interval */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_AGGREGATION, required = false) + @JsonProperty(value = JSON_PROPERTY_INTERVAL, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Aggregation getAggregation() { - return aggregation; + public Long getInterval() { + return interval; } - @JsonProperty(value = JSON_PROPERTY_AGGREGATION, required = false) + @JsonProperty(value = JSON_PROPERTY_INTERVAL, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAggregation(@javax.annotation.Nullable Aggregation aggregation) { - this.aggregation = aggregation; + public void setInterval(@javax.annotation.Nullable Long interval) { + this.interval = interval; } @@ -323,13 +323,13 @@ public boolean equals(Object o) { Objects.equals(this.aggParameters, baseReadTsKvQuery.aggParameters) && Objects.equals(this.limit, baseReadTsKvQuery.limit) && Objects.equals(this.order, baseReadTsKvQuery.order) && - Objects.equals(this.interval, baseReadTsKvQuery.interval) && - Objects.equals(this.aggregation, baseReadTsKvQuery.aggregation); + Objects.equals(this.aggregation, baseReadTsKvQuery.aggregation) && + Objects.equals(this.interval, baseReadTsKvQuery.interval); } @Override public int hashCode() { - return Objects.hash(id, key, startTs, endTs, aggParameters, limit, order, interval, aggregation); + return Objects.hash(id, key, startTs, endTs, aggParameters, limit, order, aggregation, interval); } @Override @@ -343,8 +343,8 @@ public String toString() { sb.append(" aggParameters: ").append(toIndentedString(aggParameters)).append("\n"); sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); sb.append(" order: ").append(toIndentedString(order)).append("\n"); - sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); sb.append(" aggregation: ").append(toIndentedString(aggregation)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); sb.append("}"); return sb.toString(); } @@ -427,16 +427,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sorder%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrder())))); } - // add `interval` to the URL query string - if (getInterval() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sinterval%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInterval())))); - } - // add `aggregation` to the URL query string if (getAggregation() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%saggregation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregation())))); } + // add `interval` to the URL query string + if (getInterval() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sinterval%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInterval())))); + } + return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java b/pe/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java index d24b4447..8891973e 100644 --- a/pe/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java +++ b/pe/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java @@ -49,8 +49,8 @@ CalculatedFieldDebugEventFilter.JSON_PROPERTY_MSG_TYPE, CalculatedFieldDebugEventFilter.JSON_PROPERTY_ARGUMENTS, CalculatedFieldDebugEventFilter.JSON_PROPERTY_RESULT, - CalculatedFieldDebugEventFilter.JSON_PROPERTY_IS_ERROR, - CalculatedFieldDebugEventFilter.JSON_PROPERTY_ERROR + CalculatedFieldDebugEventFilter.JSON_PROPERTY_ERROR, + CalculatedFieldDebugEventFilter.JSON_PROPERTY_IS_ERROR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -125,14 +125,14 @@ public static EntityTypeEnum fromValue(String value) { @javax.annotation.Nullable private String result; - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public static final String JSON_PROPERTY_ERROR = "error"; @javax.annotation.Nullable private Boolean error; + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private Boolean isError; + public CalculatedFieldDebugEventFilter() { } @@ -328,51 +328,51 @@ public void setResult(@javax.annotation.Nullable String result) { } - public CalculatedFieldDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public CalculatedFieldDebugEventFilter error(@javax.annotation.Nullable Boolean error) { + this.error = error; return this; } /** - * Get isError - * @return isError + * Get error + * @return error */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; + public Boolean getError() { + return error; } - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public void setError(@javax.annotation.Nullable Boolean error) { + this.error = error; } - public CalculatedFieldDebugEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; + public CalculatedFieldDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; return this; } /** - * Get error - * @return error + * Get isError + * @return isError */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; + public Boolean getIsError() { + return isError; } - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; + public void setIsError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; } @@ -408,14 +408,14 @@ public boolean equals(Object o) { Objects.equals(this.msgType, calculatedFieldDebugEventFilter.msgType) && Objects.equals(this.arguments, calculatedFieldDebugEventFilter.arguments) && Objects.equals(this.result, calculatedFieldDebugEventFilter.result) && - Objects.equals(this.isError, calculatedFieldDebugEventFilter.isError) && Objects.equals(this.error, calculatedFieldDebugEventFilter.error) && + Objects.equals(this.isError, calculatedFieldDebugEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, entityId, entityType, msgId, msgType, arguments, result, isError, error, super.hashCode()); + return Objects.hash(server, errorStr, entityId, entityType, msgId, msgType, arguments, result, error, isError, super.hashCode()); } @Override @@ -431,8 +431,8 @@ public String toString() { sb.append(" msgType: ").append(toIndentedString(msgType)).append("\n"); sb.append(" arguments: ").append(toIndentedString(arguments)).append("\n"); sb.append(" result: ").append(toIndentedString(result)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -530,16 +530,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); } - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - // add `error` to the URL query string if (getError() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java b/pe/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java index 024b6056..a4477fc6 100644 --- a/pe/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java @@ -64,12 +64,6 @@ public CsvReportTemplateConfig format(@javax.annotation.Nonnull TbReportFormat f return this; } - @Override - public CsvReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { - this.setEntityAliases(entityAliases); - return this; - } - @Override public CsvReportTemplateConfig filters(@javax.annotation.Nullable List filters) { this.setFilters(filters); @@ -94,6 +88,12 @@ public CsvReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String return this; } + @Override + public CsvReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { + this.setEntityAliases(entityAliases); + return this; + } + /** * Return true if this CsvReportTemplateConfig object is equal to o. */ @@ -170,16 +170,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sformat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFormat())))); } - // add `entityAliases` to the URL query string - if (getEntityAliases() != null) { - for (int i = 0; i < getEntityAliases().size(); i++) { - if (getEntityAliases().get(i) != null) { - joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - // add `filters` to the URL query string if (getFilters() != null) { for (int i = 0; i < getFilters().size(); i++) { @@ -210,6 +200,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); } + // add `entityAliases` to the URL query string + if (getEntityAliases() != null) { + for (int i = 0; i < getEntityAliases().size(); i++) { + if (getEntityAliases().get(i) != null) { + joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/Dashboard.java b/pe/src/main/java/org/thingsboard/client/model/Dashboard.java index 9e00843d..d996aa87 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Dashboard.java +++ b/pe/src/main/java/org/thingsboard/client/model/Dashboard.java @@ -46,39 +46,23 @@ * Dashboard */ @JsonPropertyOrder({ - Dashboard.JSON_PROPERTY_ID, - Dashboard.JSON_PROPERTY_CREATED_TIME, - Dashboard.JSON_PROPERTY_TENANT_ID, - Dashboard.JSON_PROPERTY_CUSTOMER_ID, Dashboard.JSON_PROPERTY_TITLE, Dashboard.JSON_PROPERTY_IMAGE, - Dashboard.JSON_PROPERTY_ASSIGNED_CUSTOMERS, Dashboard.JSON_PROPERTY_MOBILE_HIDE, Dashboard.JSON_PROPERTY_MOBILE_ORDER, - Dashboard.JSON_PROPERTY_VERSION, - Dashboard.JSON_PROPERTY_RESOURCES, Dashboard.JSON_PROPERTY_CONFIGURATION, Dashboard.JSON_PROPERTY_NAME, - Dashboard.JSON_PROPERTY_OWNER_ID + Dashboard.JSON_PROPERTY_RESOURCES, + Dashboard.JSON_PROPERTY_ASSIGNED_CUSTOMERS, + Dashboard.JSON_PROPERTY_CREATED_TIME, + Dashboard.JSON_PROPERTY_CUSTOMER_ID, + Dashboard.JSON_PROPERTY_ID, + Dashboard.JSON_PROPERTY_OWNER_ID, + Dashboard.JSON_PROPERTY_TENANT_ID, + Dashboard.JSON_PROPERTY_VERSION }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class Dashboard { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nullable - private DashboardId id; - - public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; - @javax.annotation.Nullable - private Long createdTime; - - public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; - @javax.annotation.Nullable - private TenantId tenantId; - - public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; - @javax.annotation.Nullable - private CustomerId customerId; - public static final String JSON_PROPERTY_TITLE = "title"; @javax.annotation.Nullable private String title; @@ -87,10 +71,6 @@ public class Dashboard { @javax.annotation.Nullable private String image; - public static final String JSON_PROPERTY_ASSIGNED_CUSTOMERS = "assignedCustomers"; - @javax.annotation.Nullable - private Set assignedCustomers = new LinkedHashSet<>(); - public static final String JSON_PROPERTY_MOBILE_HIDE = "mobileHide"; @javax.annotation.Nullable private Boolean mobileHide; @@ -99,159 +79,201 @@ public class Dashboard { @javax.annotation.Nullable private Integer mobileOrder; - public static final String JSON_PROPERTY_VERSION = "version"; + public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; @javax.annotation.Nullable - private Long version; + private com.fasterxml.jackson.databind.JsonNode _configuration = null; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; public static final String JSON_PROPERTY_RESOURCES = "resources"; @javax.annotation.Nullable private List resources = new ArrayList<>(); - public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; + public static final String JSON_PROPERTY_ASSIGNED_CUSTOMERS = "assignedCustomers"; @javax.annotation.Nullable - private com.fasterxml.jackson.databind.JsonNode _configuration = null; + private Set assignedCustomers = new LinkedHashSet<>(); - public static final String JSON_PROPERTY_NAME = "name"; + public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; @javax.annotation.Nullable - private String name; + private Long createdTime; + + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + @javax.annotation.Nullable + private CustomerId customerId; + + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private DashboardId id; public static final String JSON_PROPERTY_OWNER_ID = "ownerId"; @javax.annotation.Nullable private EntityId ownerId; + public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; + @javax.annotation.Nullable + private TenantId tenantId; + + public static final String JSON_PROPERTY_VERSION = "version"; + @javax.annotation.Nullable + private Long version; + public Dashboard() { } @JsonCreator public Dashboard( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_IMAGE) String image, @JsonProperty(JSON_PROPERTY_MOBILE_HIDE) Boolean mobileHide, @JsonProperty(JSON_PROPERTY_MOBILE_ORDER) Integer mobileOrder, - @JsonProperty(JSON_PROPERTY_NAME) String name + @JsonProperty(JSON_PROPERTY_NAME) String name, + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId ) { this(); - this.createdTime = createdTime; - this.tenantId = tenantId; this.image = image; this.mobileHide = mobileHide; this.mobileOrder = mobileOrder; this.name = name; + this.createdTime = createdTime; + this.tenantId = tenantId; } - public Dashboard id(@javax.annotation.Nullable DashboardId id) { - this.id = id; + public Dashboard title(@javax.annotation.Nullable String title) { + this.title = title; return this; } /** - * JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. - * @return id + * Title of the dashboard. + * @return title */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DashboardId getId() { - return id; + public String getTitle() { + return title; } - @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(@javax.annotation.Nullable DashboardId id) { - this.id = id; + public void setTitle(@javax.annotation.Nullable String title) { + this.title = title; } /** - * Timestamp of the dashboard creation, in milliseconds - * @return createdTime + * Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. + * @return image */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CREATED_TIME, required = false) + @JsonProperty(value = JSON_PROPERTY_IMAGE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCreatedTime() { - return createdTime; + public String getImage() { + return image; } /** - * JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. - * @return tenantId + * Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. + * @return mobileHide */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_MOBILE_HIDE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TenantId getTenantId() { - return tenantId; + public Boolean getMobileHide() { + return mobileHide; } - public Dashboard customerId(@javax.annotation.Nullable CustomerId customerId) { - this.customerId = customerId; + /** + * Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications + * @return mobileOrder + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_MOBILE_ORDER, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getMobileOrder() { + return mobileOrder; + } + + + + + public Dashboard _configuration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { + this._configuration = _configuration; return this; } /** - * JSON object with Customer Id. - * @return customerId + * Get _configuration + * @return _configuration */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CustomerId getCustomerId() { - return customerId; + public com.fasterxml.jackson.databind.JsonNode getConfiguration() { + return _configuration; } - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerId(@javax.annotation.Nullable CustomerId customerId) { - this.customerId = customerId; + public void setConfiguration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { + this._configuration = _configuration; } - public Dashboard title(@javax.annotation.Nullable String title) { - this.title = title; - return this; - } - /** - * Title of the dashboard. - * @return title + * Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. + * @return name */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) + @JsonProperty(value = JSON_PROPERTY_NAME, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; + public String getName() { + return name; } - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(@javax.annotation.Nullable String title) { - this.title = title; + + + public Dashboard resources(@javax.annotation.Nullable List resources) { + this.resources = resources; + return this; } + public Dashboard addResourcesItem(ResourceExportData resourcesItem) { + if (this.resources == null) { + this.resources = new ArrayList<>(); + } + this.resources.add(resourcesItem); + return this; + } /** - * Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. - * @return image + * Get resources + * @return resources */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IMAGE, required = false) + @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getImage() { - return image; + public List getResources() { + return resources; } + @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResources(@javax.annotation.Nullable List resources) { + this.resources = resources; + } public Dashboard assignedCustomers(@javax.annotation.Nullable Set assignedCustomers) { @@ -288,148 +310,126 @@ public void setAssignedCustomers(@javax.annotation.Nullable Set resources) { - this.resources = resources; - return this; - } - - public Dashboard addResourcesItem(ResourceExportData resourcesItem) { - if (this.resources == null) { - this.resources = new ArrayList<>(); - } - this.resources.add(resourcesItem); + public Dashboard id(@javax.annotation.Nullable DashboardId id) { + this.id = id; return this; } /** - * Get resources - * @return resources + * JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. + * @return id */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) + @JsonProperty(value = JSON_PROPERTY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getResources() { - return resources; + public DashboardId getId() { + return id; } - @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) + @JsonProperty(value = JSON_PROPERTY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResources(@javax.annotation.Nullable List resources) { - this.resources = resources; + public void setId(@javax.annotation.Nullable DashboardId id) { + this.id = id; } - public Dashboard _configuration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { - this._configuration = _configuration; + public Dashboard ownerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; return this; } /** - * Get _configuration - * @return _configuration + * JSON object with Customer or Tenant Id + * @return ownerId */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public com.fasterxml.jackson.databind.JsonNode getConfiguration() { - return _configuration; + public EntityId getOwnerId() { + return ownerId; } - @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setConfiguration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { - this._configuration = _configuration; + public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { + this.ownerId = ownerId; } /** - * Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. - * @return name + * JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. + * @return tenantId */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_NAME, required = false) + @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; + public TenantId getTenantId() { + return tenantId; } - public Dashboard ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; + public Dashboard version(@javax.annotation.Nullable Long version) { + this.version = version; return this; } /** - * JSON object with Customer or Tenant Id - * @return ownerId + * Get version + * @return version */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_VERSION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EntityId getOwnerId() { - return ownerId; + public Long getVersion() { + return version; } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_VERSION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; + public void setVersion(@javax.annotation.Nullable Long version) { + this.version = version; } @@ -445,45 +445,45 @@ public boolean equals(Object o) { return false; } Dashboard dashboard = (Dashboard) o; - return Objects.equals(this.id, dashboard.id) && - Objects.equals(this.createdTime, dashboard.createdTime) && - Objects.equals(this.tenantId, dashboard.tenantId) && - Objects.equals(this.customerId, dashboard.customerId) && - Objects.equals(this.title, dashboard.title) && + return Objects.equals(this.title, dashboard.title) && Objects.equals(this.image, dashboard.image) && - Objects.equals(this.assignedCustomers, dashboard.assignedCustomers) && Objects.equals(this.mobileHide, dashboard.mobileHide) && Objects.equals(this.mobileOrder, dashboard.mobileOrder) && - Objects.equals(this.version, dashboard.version) && - Objects.equals(this.resources, dashboard.resources) && Objects.equals(this._configuration, dashboard._configuration) && Objects.equals(this.name, dashboard.name) && - Objects.equals(this.ownerId, dashboard.ownerId); + Objects.equals(this.resources, dashboard.resources) && + Objects.equals(this.assignedCustomers, dashboard.assignedCustomers) && + Objects.equals(this.createdTime, dashboard.createdTime) && + Objects.equals(this.customerId, dashboard.customerId) && + Objects.equals(this.id, dashboard.id) && + Objects.equals(this.ownerId, dashboard.ownerId) && + Objects.equals(this.tenantId, dashboard.tenantId) && + Objects.equals(this.version, dashboard.version); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, customerId, title, image, assignedCustomers, mobileHide, mobileOrder, version, resources, _configuration, name, ownerId); + return Objects.hash(title, image, mobileHide, mobileOrder, _configuration, name, resources, assignedCustomers, createdTime, customerId, id, ownerId, tenantId, version); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Dashboard {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); - sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" image: ").append(toIndentedString(image)).append("\n"); - sb.append(" assignedCustomers: ").append(toIndentedString(assignedCustomers)).append("\n"); sb.append(" mobileHide: ").append(toIndentedString(mobileHide)).append("\n"); sb.append(" mobileOrder: ").append(toIndentedString(mobileOrder)).append("\n"); - sb.append(" version: ").append(toIndentedString(version)).append("\n"); - sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); + sb.append(" assignedCustomers: ").append(toIndentedString(assignedCustomers)).append("\n"); + sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append("}"); return sb.toString(); } @@ -531,26 +531,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `id` to the URL query string - if (getId() != null) { - joiner.add(getId().toUrlQueryString(prefix + "id" + suffix)); - } - - // add `createdTime` to the URL query string - if (getCreatedTime() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%screatedTime%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedTime())))); - } - - // add `tenantId` to the URL query string - if (getTenantId() != null) { - joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix)); - } - - // add `customerId` to the URL query string - if (getCustomerId() != null) { - joiner.add(getCustomerId().toUrlQueryString(prefix + "customerId" + suffix)); - } - // add `title` to the URL query string if (getTitle() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); @@ -561,18 +541,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%simage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getImage())))); } - // add `assignedCustomers` to the URL query string - if (getAssignedCustomers() != null) { - int i = 0; - for (ShortCustomerInfo _item : getAssignedCustomers()) { - if (_item != null) { - joiner.add(_item.toUrlQueryString(String.format(java.util.Locale.ROOT, "%sassignedCustomers%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - i++; - } - // add `mobileHide` to the URL query string if (getMobileHide() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%smobileHide%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMobileHide())))); @@ -583,9 +551,14 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smobileOrder%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMobileOrder())))); } - // add `version` to the URL query string - if (getVersion() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); + // add `configuration` to the URL query string + if (getConfiguration() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sconfiguration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfiguration())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); } // add `resources` to the URL query string @@ -598,14 +571,31 @@ public String toUrlQueryString(String prefix) { } } - // add `configuration` to the URL query string - if (getConfiguration() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sconfiguration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfiguration())))); + // add `assignedCustomers` to the URL query string + if (getAssignedCustomers() != null) { + int i = 0; + for (ShortCustomerInfo _item : getAssignedCustomers()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format(java.util.Locale.ROOT, "%sassignedCustomers%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; } - // add `name` to the URL query string - if (getName() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + // add `createdTime` to the URL query string + if (getCreatedTime() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%screatedTime%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedTime())))); + } + + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(getCustomerId().toUrlQueryString(prefix + "customerId" + suffix)); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(getId().toUrlQueryString(prefix + "id" + suffix)); } // add `ownerId` to the URL query string @@ -613,6 +603,16 @@ public String toUrlQueryString(String prefix) { joiner.add(getOwnerId().toUrlQueryString(prefix + "ownerId" + suffix)); } + // add `tenantId` to the URL query string + if (getTenantId() != null) { + joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix)); + } + + // add `version` to the URL query string + if (getVersion() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); + } + return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/DebugConverterEventFilter.java b/pe/src/main/java/org/thingsboard/client/model/DebugConverterEventFilter.java index c4c9d492..215d08da 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DebugConverterEventFilter.java +++ b/pe/src/main/java/org/thingsboard/client/model/DebugConverterEventFilter.java @@ -47,8 +47,8 @@ DebugConverterEventFilter.JSON_PROPERTY_IN, DebugConverterEventFilter.JSON_PROPERTY_OUT, DebugConverterEventFilter.JSON_PROPERTY_METADATA, - DebugConverterEventFilter.JSON_PROPERTY_IS_ERROR, - DebugConverterEventFilter.JSON_PROPERTY_ERROR + DebugConverterEventFilter.JSON_PROPERTY_ERROR, + DebugConverterEventFilter.JSON_PROPERTY_IS_ERROR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -82,14 +82,14 @@ public class DebugConverterEventFilter extends EventFilter { @javax.annotation.Nullable private String metadata; - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public static final String JSON_PROPERTY_ERROR = "error"; @javax.annotation.Nullable private Boolean error; + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private Boolean isError; + public DebugConverterEventFilter() { } @@ -237,51 +237,51 @@ public void setMetadata(@javax.annotation.Nullable String metadata) { } - public DebugConverterEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public DebugConverterEventFilter error(@javax.annotation.Nullable Boolean error) { + this.error = error; return this; } /** - * Get isError - * @return isError + * Get error + * @return error */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; + public Boolean getError() { + return error; } - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public void setError(@javax.annotation.Nullable Boolean error) { + this.error = error; } - public DebugConverterEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; + public DebugConverterEventFilter isError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; return this; } /** - * Get error - * @return error + * Get isError + * @return isError */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; + public Boolean getIsError() { + return isError; } - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; + public void setIsError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; } @@ -315,14 +315,14 @@ public boolean equals(Object o) { Objects.equals(this.in, debugConverterEventFilter.in) && Objects.equals(this.out, debugConverterEventFilter.out) && Objects.equals(this.metadata, debugConverterEventFilter.metadata) && - Objects.equals(this.isError, debugConverterEventFilter.isError) && Objects.equals(this.error, debugConverterEventFilter.error) && + Objects.equals(this.isError, debugConverterEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, type, in, out, metadata, isError, error, super.hashCode()); + return Objects.hash(server, errorStr, type, in, out, metadata, error, isError, super.hashCode()); } @Override @@ -336,8 +336,8 @@ public String toString() { sb.append(" in: ").append(toIndentedString(in)).append("\n"); sb.append(" out: ").append(toIndentedString(out)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -425,16 +425,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smetadata%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMetadata())))); } - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - // add `error` to the URL query string if (getError() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/DebugIntegrationEventFilter.java b/pe/src/main/java/org/thingsboard/client/model/DebugIntegrationEventFilter.java index ea6e38e1..fd8c55ec 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DebugIntegrationEventFilter.java +++ b/pe/src/main/java/org/thingsboard/client/model/DebugIntegrationEventFilter.java @@ -46,8 +46,8 @@ DebugIntegrationEventFilter.JSON_PROPERTY_TYPE, DebugIntegrationEventFilter.JSON_PROPERTY_MESSAGE, DebugIntegrationEventFilter.JSON_PROPERTY_STATUS_INTEGRATION, - DebugIntegrationEventFilter.JSON_PROPERTY_IS_ERROR, - DebugIntegrationEventFilter.JSON_PROPERTY_ERROR + DebugIntegrationEventFilter.JSON_PROPERTY_ERROR, + DebugIntegrationEventFilter.JSON_PROPERTY_IS_ERROR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -77,14 +77,14 @@ public class DebugIntegrationEventFilter extends EventFilter { @javax.annotation.Nullable private String statusIntegration; - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public static final String JSON_PROPERTY_ERROR = "error"; @javax.annotation.Nullable private Boolean error; + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private Boolean isError; + public DebugIntegrationEventFilter() { } @@ -208,51 +208,51 @@ public void setStatusIntegration(@javax.annotation.Nullable String statusIntegra } - public DebugIntegrationEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public DebugIntegrationEventFilter error(@javax.annotation.Nullable Boolean error) { + this.error = error; return this; } /** - * Get isError - * @return isError + * Get error + * @return error */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; + public Boolean getError() { + return error; } - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public void setError(@javax.annotation.Nullable Boolean error) { + this.error = error; } - public DebugIntegrationEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; + public DebugIntegrationEventFilter isError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; return this; } /** - * Get error - * @return error + * Get isError + * @return isError */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; + public Boolean getIsError() { + return isError; } - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; + public void setIsError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; } @@ -285,14 +285,14 @@ public boolean equals(Object o) { Objects.equals(this.type, debugIntegrationEventFilter.type) && Objects.equals(this.message, debugIntegrationEventFilter.message) && Objects.equals(this.statusIntegration, debugIntegrationEventFilter.statusIntegration) && - Objects.equals(this.isError, debugIntegrationEventFilter.isError) && Objects.equals(this.error, debugIntegrationEventFilter.error) && + Objects.equals(this.isError, debugIntegrationEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, type, message, statusIntegration, isError, error, super.hashCode()); + return Objects.hash(server, errorStr, type, message, statusIntegration, error, isError, super.hashCode()); } @Override @@ -305,8 +305,8 @@ public String toString() { sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" statusIntegration: ").append(toIndentedString(statusIntegration)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -389,16 +389,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstatusIntegration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatusIntegration())))); } - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - // add `error` to the URL query string if (getError() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/Device.java b/pe/src/main/java/org/thingsboard/client/model/Device.java index 26fe6d69..f0caea76 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Device.java +++ b/pe/src/main/java/org/thingsboard/client/model/Device.java @@ -53,9 +53,9 @@ Device.JSON_PROPERTY_FIRMWARE_ID, Device.JSON_PROPERTY_SOFTWARE_ID, Device.JSON_PROPERTY_VERSION, + Device.JSON_PROPERTY_DEVICE_DATA, Device.JSON_PROPERTY_OWNER_ID, - Device.JSON_PROPERTY_ADDITIONAL_INFO, - Device.JSON_PROPERTY_DEVICE_DATA + Device.JSON_PROPERTY_ADDITIONAL_INFO }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class Device { @@ -103,6 +103,10 @@ public class Device { @javax.annotation.Nullable private Long version; + public static final String JSON_PROPERTY_DEVICE_DATA = "deviceData"; + @javax.annotation.Nullable + private DeviceData deviceData; + public static final String JSON_PROPERTY_OWNER_ID = "ownerId"; @javax.annotation.Nullable private EntityId ownerId; @@ -111,10 +115,6 @@ public class Device { @javax.annotation.Nullable private com.fasterxml.jackson.databind.JsonNode additionalInfo; - public static final String JSON_PROPERTY_DEVICE_DATA = "deviceData"; - @javax.annotation.Nullable - private DeviceData deviceData; - public Device() { } @@ -364,6 +364,30 @@ public void setVersion(@javax.annotation.Nullable Long version) { } + public Device deviceData(@javax.annotation.Nullable DeviceData deviceData) { + this.deviceData = deviceData; + return this; + } + + /** + * JSON object with content specific to type of transport in the device profile. + * @return deviceData + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_DEVICE_DATA, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DeviceData getDeviceData() { + return deviceData; + } + + + @JsonProperty(value = JSON_PROPERTY_DEVICE_DATA, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeviceData(@javax.annotation.Nullable DeviceData deviceData) { + this.deviceData = deviceData; + } + + public Device ownerId(@javax.annotation.Nullable EntityId ownerId) { this.ownerId = ownerId; return this; @@ -412,30 +436,6 @@ public void setAdditionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.d } - public Device deviceData(@javax.annotation.Nullable DeviceData deviceData) { - this.deviceData = deviceData; - return this; - } - - /** - * JSON object with content specific to type of transport in the device profile. - * @return deviceData - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DEVICE_DATA, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DeviceData getDeviceData() { - return deviceData; - } - - - @JsonProperty(value = JSON_PROPERTY_DEVICE_DATA, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeviceData(@javax.annotation.Nullable DeviceData deviceData) { - this.deviceData = deviceData; - } - - /** * Return true if this Device object is equal to o. */ @@ -459,14 +459,14 @@ public boolean equals(Object o) { Objects.equals(this.firmwareId, device.firmwareId) && Objects.equals(this.softwareId, device.softwareId) && Objects.equals(this.version, device.version) && + Objects.equals(this.deviceData, device.deviceData) && Objects.equals(this.ownerId, device.ownerId) && - Objects.equals(this.additionalInfo, device.additionalInfo) && - Objects.equals(this.deviceData, device.deviceData); + Objects.equals(this.additionalInfo, device.additionalInfo); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, customerId, name, type, label, deviceProfileId, firmwareId, softwareId, version, ownerId, additionalInfo, deviceData); + return Objects.hash(id, createdTime, tenantId, customerId, name, type, label, deviceProfileId, firmwareId, softwareId, version, deviceData, ownerId, additionalInfo); } @Override @@ -484,9 +484,9 @@ public String toString() { sb.append(" firmwareId: ").append(toIndentedString(firmwareId)).append("\n"); sb.append(" softwareId: ").append(toIndentedString(softwareId)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" deviceData: ").append(toIndentedString(deviceData)).append("\n"); sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); - sb.append(" deviceData: ").append(toIndentedString(deviceData)).append("\n"); sb.append("}"); return sb.toString(); } @@ -589,6 +589,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); } + // add `deviceData` to the URL query string + if (getDeviceData() != null) { + joiner.add(getDeviceData().toUrlQueryString(prefix + "deviceData" + suffix)); + } + // add `ownerId` to the URL query string if (getOwnerId() != null) { joiner.add(getOwnerId().toUrlQueryString(prefix + "ownerId" + suffix)); @@ -599,11 +604,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sadditionalInfo%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInfo())))); } - // add `deviceData` to the URL query string - if (getDeviceData() != null) { - joiner.add(getDeviceData().toUrlQueryString(prefix + "deviceData" + suffix)); - } - return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/DeviceInfo.java b/pe/src/main/java/org/thingsboard/client/model/DeviceInfo.java index eb5f05c6..396c94f8 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DeviceInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/DeviceInfo.java @@ -59,9 +59,9 @@ DeviceInfo.JSON_PROPERTY_OWNER_NAME, DeviceInfo.JSON_PROPERTY_GROUPS, DeviceInfo.JSON_PROPERTY_ACTIVE, + DeviceInfo.JSON_PROPERTY_DEVICE_DATA, DeviceInfo.JSON_PROPERTY_OWNER_ID, - DeviceInfo.JSON_PROPERTY_ADDITIONAL_INFO, - DeviceInfo.JSON_PROPERTY_DEVICE_DATA + DeviceInfo.JSON_PROPERTY_ADDITIONAL_INFO }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class DeviceInfo { @@ -121,6 +121,10 @@ public class DeviceInfo { @javax.annotation.Nullable private Boolean active; + public static final String JSON_PROPERTY_DEVICE_DATA = "deviceData"; + @javax.annotation.Nullable + private DeviceData deviceData; + public static final String JSON_PROPERTY_OWNER_ID = "ownerId"; @javax.annotation.Nullable private EntityId ownerId; @@ -129,10 +133,6 @@ public class DeviceInfo { @javax.annotation.Nullable private com.fasterxml.jackson.databind.JsonNode additionalInfo; - public static final String JSON_PROPERTY_DEVICE_DATA = "deviceData"; - @javax.annotation.Nullable - private DeviceData deviceData; - public DeviceInfo() { } @@ -446,6 +446,30 @@ public Boolean getActive() { + public DeviceInfo deviceData(@javax.annotation.Nullable DeviceData deviceData) { + this.deviceData = deviceData; + return this; + } + + /** + * JSON object with content specific to type of transport in the device profile. + * @return deviceData + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_DEVICE_DATA, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DeviceData getDeviceData() { + return deviceData; + } + + + @JsonProperty(value = JSON_PROPERTY_DEVICE_DATA, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeviceData(@javax.annotation.Nullable DeviceData deviceData) { + this.deviceData = deviceData; + } + + public DeviceInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { this.ownerId = ownerId; return this; @@ -494,30 +518,6 @@ public void setAdditionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.d } - public DeviceInfo deviceData(@javax.annotation.Nullable DeviceData deviceData) { - this.deviceData = deviceData; - return this; - } - - /** - * JSON object with content specific to type of transport in the device profile. - * @return deviceData - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DEVICE_DATA, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DeviceData getDeviceData() { - return deviceData; - } - - - @JsonProperty(value = JSON_PROPERTY_DEVICE_DATA, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeviceData(@javax.annotation.Nullable DeviceData deviceData) { - this.deviceData = deviceData; - } - - /** * Return true if this DeviceInfo object is equal to o. */ @@ -544,14 +544,14 @@ public boolean equals(Object o) { Objects.equals(this.ownerName, deviceInfo.ownerName) && Objects.equals(this.groups, deviceInfo.groups) && Objects.equals(this.active, deviceInfo.active) && + Objects.equals(this.deviceData, deviceInfo.deviceData) && Objects.equals(this.ownerId, deviceInfo.ownerId) && - Objects.equals(this.additionalInfo, deviceInfo.additionalInfo) && - Objects.equals(this.deviceData, deviceInfo.deviceData); + Objects.equals(this.additionalInfo, deviceInfo.additionalInfo); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, customerId, name, type, label, deviceProfileId, firmwareId, softwareId, version, ownerName, groups, active, ownerId, additionalInfo, deviceData); + return Objects.hash(id, createdTime, tenantId, customerId, name, type, label, deviceProfileId, firmwareId, softwareId, version, ownerName, groups, active, deviceData, ownerId, additionalInfo); } @Override @@ -572,9 +572,9 @@ public String toString() { sb.append(" ownerName: ").append(toIndentedString(ownerName)).append("\n"); sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" deviceData: ").append(toIndentedString(deviceData)).append("\n"); sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); - sb.append(" deviceData: ").append(toIndentedString(deviceData)).append("\n"); sb.append("}"); return sb.toString(); } @@ -697,6 +697,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sactive%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getActive())))); } + // add `deviceData` to the URL query string + if (getDeviceData() != null) { + joiner.add(getDeviceData().toUrlQueryString(prefix + "deviceData" + suffix)); + } + // add `ownerId` to the URL query string if (getOwnerId() != null) { joiner.add(getOwnerId().toUrlQueryString(prefix + "ownerId" + suffix)); @@ -707,11 +712,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sadditionalInfo%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInfo())))); } - // add `deviceData` to the URL query string - if (getDeviceData() != null) { - joiner.add(getDeviceData().toUrlQueryString(prefix + "deviceData" + suffix)); - } - return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/ErrorComponentAllOfException.java b/pe/src/main/java/org/thingsboard/client/model/ErrorComponentAllOfException.java index 4e4fbc22..e9b38739 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ErrorComponentAllOfException.java +++ b/pe/src/main/java/org/thingsboard/client/model/ErrorComponentAllOfException.java @@ -41,9 +41,9 @@ @JsonPropertyOrder({ ErrorComponentAllOfException.JSON_PROPERTY_CAUSE, ErrorComponentAllOfException.JSON_PROPERTY_STACK_TRACE, + ErrorComponentAllOfException.JSON_PROPERTY_LOCALIZED_MESSAGE, ErrorComponentAllOfException.JSON_PROPERTY_MESSAGE, - ErrorComponentAllOfException.JSON_PROPERTY_SUPPRESSED, - ErrorComponentAllOfException.JSON_PROPERTY_LOCALIZED_MESSAGE + ErrorComponentAllOfException.JSON_PROPERTY_SUPPRESSED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class ErrorComponentAllOfException { @@ -55,6 +55,10 @@ public class ErrorComponentAllOfException { @javax.annotation.Nullable private List stackTrace = new ArrayList<>(); + public static final String JSON_PROPERTY_LOCALIZED_MESSAGE = "localizedMessage"; + @javax.annotation.Nullable + private String localizedMessage; + public static final String JSON_PROPERTY_MESSAGE = "message"; @javax.annotation.Nullable private String message; @@ -63,10 +67,6 @@ public class ErrorComponentAllOfException { @javax.annotation.Nullable private List suppressed = new ArrayList<>(); - public static final String JSON_PROPERTY_LOCALIZED_MESSAGE = "localizedMessage"; - @javax.annotation.Nullable - private String localizedMessage; - public ErrorComponentAllOfException() { } @@ -126,6 +126,30 @@ public void setStackTrace(@javax.annotation.Nullable List stackTrace = new ArrayList<>(); - public static final String JSON_PROPERTY_MESSAGE = "message"; - @javax.annotation.Nullable - private String message; - public static final String JSON_PROPERTY_LOCALIZED_MESSAGE = "localizedMessage"; @javax.annotation.Nullable private String localizedMessage; + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + public ErrorComponentAllOfExceptionCause() { } @@ -91,51 +91,51 @@ public void setStackTrace(@javax.annotation.Nullable List id = JsonNullable.of(null); - - public static final String JSON_PROPERTY_TITLE = "title"; - @javax.annotation.Nullable - private String title; - public static final String JSON_PROPERTY_EMAIL = "email"; @javax.annotation.Nullable private String email; @@ -88,10 +81,17 @@ public class MicrosoftTeamsNotificationTargetConfig extends NotificationTargetCo @javax.annotation.Nullable private String firstName; + public static final String JSON_PROPERTY_ID = "id"; + private JsonNullable id = JsonNullable.of(null); + public static final String JSON_PROPERTY_LAST_NAME = "lastName"; @javax.annotation.Nullable private String lastName; + public static final String JSON_PROPERTY_TITLE = "title"; + @javax.annotation.Nullable + private String title; + public MicrosoftTeamsNotificationTargetConfig() { } @@ -167,62 +167,6 @@ public void setUseOldApi(@javax.annotation.Nullable Boolean useOldApi) { } - public MicrosoftTeamsNotificationTargetConfig id(@javax.annotation.Nullable Object id) { - this.id = JsonNullable.of(id); - return this; - } - - /** - * Get id - * @return id - */ - @javax.annotation.Nullable - @JsonIgnore - public Object getId() { - return id.orElse(null); - } - - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getId_JsonNullable() { - return id; - } - - @JsonProperty(JSON_PROPERTY_ID) - public void setId_JsonNullable(JsonNullable id) { - this.id = id; - } - - public void setId(@javax.annotation.Nullable Object id) { - this.id = JsonNullable.of(id); - } - - - public MicrosoftTeamsNotificationTargetConfig title(@javax.annotation.Nullable String title) { - this.title = title; - return this; - } - - /** - * Get title - * @return title - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(@javax.annotation.Nullable String title) { - this.title = title; - } - - public MicrosoftTeamsNotificationTargetConfig email(@javax.annotation.Nullable String email) { this.email = email; return this; @@ -271,6 +215,38 @@ public void setFirstName(@javax.annotation.Nullable String firstName) { } + public MicrosoftTeamsNotificationTargetConfig id(@javax.annotation.Nullable Object id) { + this.id = JsonNullable.of(id); + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonIgnore + public Object getId() { + return id.orElse(null); + } + + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getId_JsonNullable() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + public void setId_JsonNullable(JsonNullable id) { + this.id = id; + } + + public void setId(@javax.annotation.Nullable Object id) { + this.id = JsonNullable.of(id); + } + + public MicrosoftTeamsNotificationTargetConfig lastName(@javax.annotation.Nullable String lastName) { this.lastName = lastName; return this; @@ -295,6 +271,30 @@ public void setLastName(@javax.annotation.Nullable String lastName) { } + public MicrosoftTeamsNotificationTargetConfig title(@javax.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * Get title + * @return title + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } + + + @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTitle(@javax.annotation.Nullable String title) { + this.title = title; + } + + @Override public MicrosoftTeamsNotificationTargetConfig description(@javax.annotation.Nullable String description) { this.setDescription(description); @@ -322,11 +322,11 @@ public boolean equals(Object o) { return Objects.equals(this.webhookUrl, microsoftTeamsNotificationTargetConfig.webhookUrl) && Objects.equals(this.channelName, microsoftTeamsNotificationTargetConfig.channelName) && Objects.equals(this.useOldApi, microsoftTeamsNotificationTargetConfig.useOldApi) && - equalsNullable(this.id, microsoftTeamsNotificationTargetConfig.id) && - Objects.equals(this.title, microsoftTeamsNotificationTargetConfig.title) && Objects.equals(this.email, microsoftTeamsNotificationTargetConfig.email) && Objects.equals(this.firstName, microsoftTeamsNotificationTargetConfig.firstName) && + equalsNullable(this.id, microsoftTeamsNotificationTargetConfig.id) && Objects.equals(this.lastName, microsoftTeamsNotificationTargetConfig.lastName) && + Objects.equals(this.title, microsoftTeamsNotificationTargetConfig.title) && super.equals(o); } @@ -336,7 +336,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(webhookUrl, channelName, useOldApi, hashCodeNullable(id), title, email, firstName, lastName, super.hashCode()); + return Objects.hash(webhookUrl, channelName, useOldApi, email, firstName, hashCodeNullable(id), lastName, title, super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -354,11 +354,11 @@ public String toString() { sb.append(" webhookUrl: ").append(toIndentedString(webhookUrl)).append("\n"); sb.append(" channelName: ").append(toIndentedString(channelName)).append("\n"); sb.append(" useOldApi: ").append(toIndentedString(useOldApi)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append("}"); return sb.toString(); } @@ -431,16 +431,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%suseOldApi%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUseOldApi())))); } - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - - // add `title` to the URL query string - if (getTitle() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); - } - // add `email` to the URL query string if (getEmail() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%semail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmail())))); @@ -451,11 +441,21 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sfirstName%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFirstName())))); } + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + // add `lastName` to the URL query string if (getLastName() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%slastName%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLastName())))); } + // add `title` to the URL query string + if (getTitle() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java b/pe/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java index 88532726..bdfe791f 100644 --- a/pe/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java +++ b/pe/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java @@ -53,8 +53,8 @@ */ @JsonPropertyOrder({ MobileSelfRegistrationParams.JSON_PROPERTY_PRIVACY_POLICY, - MobileSelfRegistrationParams.JSON_PROPERTY_TERMS_OF_USE, - MobileSelfRegistrationParams.JSON_PROPERTY_REDIRECT + MobileSelfRegistrationParams.JSON_PROPERTY_REDIRECT, + MobileSelfRegistrationParams.JSON_PROPERTY_TERMS_OF_USE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -68,14 +68,14 @@ public class MobileSelfRegistrationParams extends SelfRegistrationParams { @javax.annotation.Nullable private String privacyPolicy; - public static final String JSON_PROPERTY_TERMS_OF_USE = "termsOfUse"; - @javax.annotation.Nullable - private String termsOfUse; - public static final String JSON_PROPERTY_REDIRECT = "redirect"; @javax.annotation.Nonnull private MobileRedirectParams redirect; + public static final String JSON_PROPERTY_TERMS_OF_USE = "termsOfUse"; + @javax.annotation.Nullable + private String termsOfUse; + public MobileSelfRegistrationParams() { } @@ -103,30 +103,6 @@ public void setPrivacyPolicy(@javax.annotation.Nullable String privacyPolicy) { } - public MobileSelfRegistrationParams termsOfUse(@javax.annotation.Nullable String termsOfUse) { - this.termsOfUse = termsOfUse; - return this; - } - - /** - * Terms of User text. Supports HTML. - * @return termsOfUse - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTermsOfUse() { - return termsOfUse; - } - - - @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTermsOfUse(@javax.annotation.Nullable String termsOfUse) { - this.termsOfUse = termsOfUse; - } - - public MobileSelfRegistrationParams redirect(@javax.annotation.Nonnull MobileRedirectParams redirect) { this.redirect = redirect; return this; @@ -151,21 +127,33 @@ public void setRedirect(@javax.annotation.Nonnull MobileRedirectParams redirect) } - @Override - public MobileSelfRegistrationParams type(@javax.annotation.Nonnull SelfRegistrationType type) { - this.setType(type); + public MobileSelfRegistrationParams termsOfUse(@javax.annotation.Nullable String termsOfUse) { + this.termsOfUse = termsOfUse; return this; } - @Override - public MobileSelfRegistrationParams showPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { - this.setShowPrivacyPolicy(showPrivacyPolicy); - return this; + /** + * Terms of User text. Supports HTML. + * @return termsOfUse + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTermsOfUse() { + return termsOfUse; + } + + + @JsonProperty(value = JSON_PROPERTY_TERMS_OF_USE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTermsOfUse(@javax.annotation.Nullable String termsOfUse) { + this.termsOfUse = termsOfUse; } + @Override - public MobileSelfRegistrationParams showTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { - this.setShowTermsOfUse(showTermsOfUse); + public MobileSelfRegistrationParams type(@javax.annotation.Nonnull SelfRegistrationType type) { + this.setType(type); return this; } @@ -176,8 +164,8 @@ public MobileSelfRegistrationParams enabled(@javax.annotation.Nullable Boolean e } @Override - public MobileSelfRegistrationParams homeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { - this.setHomeDashboard(homeDashboard); + public MobileSelfRegistrationParams captcha(@javax.annotation.Nullable CaptchaParams captcha) { + this.setCaptcha(captcha); return this; } @@ -194,20 +182,32 @@ public MobileSelfRegistrationParams signUpFields(@javax.annotation.Nullable List } @Override - public MobileSelfRegistrationParams defaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { - this.setDefaultDashboard(defaultDashboard); + public MobileSelfRegistrationParams customerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { + this.setCustomerTitlePrefix(customerTitlePrefix); return this; } @Override - public MobileSelfRegistrationParams customerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { - this.setCustomerTitlePrefix(customerTitlePrefix); + public MobileSelfRegistrationParams showPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { + this.setShowPrivacyPolicy(showPrivacyPolicy); return this; } @Override - public MobileSelfRegistrationParams customMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { - this.setCustomMenuId(customMenuId); + public MobileSelfRegistrationParams showTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { + this.setShowTermsOfUse(showTermsOfUse); + return this; + } + + @Override + public MobileSelfRegistrationParams defaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { + this.setDefaultDashboard(defaultDashboard); + return this; + } + + @Override + public MobileSelfRegistrationParams homeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { + this.setHomeDashboard(homeDashboard); return this; } @@ -218,8 +218,8 @@ public MobileSelfRegistrationParams customerGroupId(@javax.annotation.Nullable E } @Override - public MobileSelfRegistrationParams captcha(@javax.annotation.Nullable CaptchaParams captcha) { - this.setCaptcha(captcha); + public MobileSelfRegistrationParams customMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { + this.setCustomMenuId(customMenuId); return this; } @@ -236,14 +236,14 @@ public boolean equals(Object o) { } MobileSelfRegistrationParams mobileSelfRegistrationParams = (MobileSelfRegistrationParams) o; return Objects.equals(this.privacyPolicy, mobileSelfRegistrationParams.privacyPolicy) && - Objects.equals(this.termsOfUse, mobileSelfRegistrationParams.termsOfUse) && Objects.equals(this.redirect, mobileSelfRegistrationParams.redirect) && + Objects.equals(this.termsOfUse, mobileSelfRegistrationParams.termsOfUse) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(privacyPolicy, termsOfUse, redirect, super.hashCode()); + return Objects.hash(privacyPolicy, redirect, termsOfUse, super.hashCode()); } @Override @@ -252,8 +252,8 @@ public String toString() { sb.append("class MobileSelfRegistrationParams {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" privacyPolicy: ").append(toIndentedString(privacyPolicy)).append("\n"); - sb.append(" termsOfUse: ").append(toIndentedString(termsOfUse)).append("\n"); sb.append(" redirect: ").append(toIndentedString(redirect)).append("\n"); + sb.append(" termsOfUse: ").append(toIndentedString(termsOfUse)).append("\n"); sb.append("}"); return sb.toString(); } @@ -301,29 +301,14 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `permissions` to the URL query string - if (getPermissions() != null) { - for (int i = 0; i < getPermissions().size(); i++) { - if (getPermissions().get(i) != null) { - joiner.add(getPermissions().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%spermissions%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - // add `type` to the URL query string if (getType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); } - // add `showPrivacyPolicy` to the URL query string - if (getShowPrivacyPolicy() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sshowPrivacyPolicy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowPrivacyPolicy())))); - } - - // add `showTermsOfUse` to the URL query string - if (getShowTermsOfUse() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sshowTermsOfUse%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowTermsOfUse())))); + // add `enabled` to the URL query string + if (getEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); } // add `title` to the URL query string @@ -331,14 +316,19 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); } - // add `enabled` to the URL query string - if (getEnabled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); + // add `captcha` to the URL query string + if (getCaptcha() != null) { + joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); } - // add `homeDashboard` to the URL query string - if (getHomeDashboard() != null) { - joiner.add(getHomeDashboard().toUrlQueryString(prefix + "homeDashboard" + suffix)); + // add `permissions` to the URL query string + if (getPermissions() != null) { + for (int i = 0; i < getPermissions().size(); i++) { + if (getPermissions().get(i) != null) { + joiner.add(getPermissions().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%spermissions%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } } // add `notificationRecipient` to the URL query string @@ -356,19 +346,29 @@ public String toUrlQueryString(String prefix) { } } - // add `defaultDashboard` to the URL query string - if (getDefaultDashboard() != null) { - joiner.add(getDefaultDashboard().toUrlQueryString(prefix + "defaultDashboard" + suffix)); - } - // add `customerTitlePrefix` to the URL query string if (getCustomerTitlePrefix() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%scustomerTitlePrefix%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCustomerTitlePrefix())))); } - // add `customMenuId` to the URL query string - if (getCustomMenuId() != null) { - joiner.add(getCustomMenuId().toUrlQueryString(prefix + "customMenuId" + suffix)); + // add `showPrivacyPolicy` to the URL query string + if (getShowPrivacyPolicy() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sshowPrivacyPolicy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowPrivacyPolicy())))); + } + + // add `showTermsOfUse` to the URL query string + if (getShowTermsOfUse() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sshowTermsOfUse%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowTermsOfUse())))); + } + + // add `defaultDashboard` to the URL query string + if (getDefaultDashboard() != null) { + joiner.add(getDefaultDashboard().toUrlQueryString(prefix + "defaultDashboard" + suffix)); + } + + // add `homeDashboard` to the URL query string + if (getHomeDashboard() != null) { + joiner.add(getHomeDashboard().toUrlQueryString(prefix + "homeDashboard" + suffix)); } // add `customerGroupId` to the URL query string @@ -376,9 +376,9 @@ public String toUrlQueryString(String prefix) { joiner.add(getCustomerGroupId().toUrlQueryString(prefix + "customerGroupId" + suffix)); } - // add `captcha` to the URL query string - if (getCaptcha() != null) { - joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); + // add `customMenuId` to the URL query string + if (getCustomMenuId() != null) { + joiner.add(getCustomMenuId().toUrlQueryString(prefix + "customMenuId" + suffix)); } // add `privacyPolicy` to the URL query string @@ -386,16 +386,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sprivacyPolicy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrivacyPolicy())))); } - // add `termsOfUse` to the URL query string - if (getTermsOfUse() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stermsOfUse%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTermsOfUse())))); - } - // add `redirect` to the URL query string if (getRedirect() != null) { joiner.add(getRedirect().toUrlQueryString(prefix + "redirect" + suffix)); } + // add `termsOfUse` to the URL query string + if (getTermsOfUse() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stermsOfUse%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTermsOfUse())))); + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/OtaPackageData.java b/pe/src/main/java/org/thingsboard/client/model/OtaPackageData.java index 8cfce7f9..8cb07905 100644 --- a/pe/src/main/java/org/thingsboard/client/model/OtaPackageData.java +++ b/pe/src/main/java/org/thingsboard/client/model/OtaPackageData.java @@ -35,76 +35,52 @@ * OtaPackageData */ @JsonPropertyOrder({ - OtaPackageData.JSON_PROPERTY_SHORT, OtaPackageData.JSON_PROPERTY_CHAR, + OtaPackageData.JSON_PROPERTY_DIRECT, + OtaPackageData.JSON_PROPERTY_DOUBLE, + OtaPackageData.JSON_PROPERTY_FLOAT, OtaPackageData.JSON_PROPERTY_INT, OtaPackageData.JSON_PROPERTY_LONG, - OtaPackageData.JSON_PROPERTY_FLOAT, - OtaPackageData.JSON_PROPERTY_DOUBLE, - OtaPackageData.JSON_PROPERTY_DIRECT, - OtaPackageData.JSON_PROPERTY_READ_ONLY + OtaPackageData.JSON_PROPERTY_READ_ONLY, + OtaPackageData.JSON_PROPERTY_SHORT }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class OtaPackageData { - public static final String JSON_PROPERTY_SHORT = "short"; - @javax.annotation.Nullable - private Integer _short; - public static final String JSON_PROPERTY_CHAR = "char"; @javax.annotation.Nullable private String _char; - public static final String JSON_PROPERTY_INT = "int"; + public static final String JSON_PROPERTY_DIRECT = "direct"; @javax.annotation.Nullable - private Integer _int; + private Boolean direct; - public static final String JSON_PROPERTY_LONG = "long"; + public static final String JSON_PROPERTY_DOUBLE = "double"; @javax.annotation.Nullable - private Long _long; + private Double _double; public static final String JSON_PROPERTY_FLOAT = "float"; @javax.annotation.Nullable private Float _float; - public static final String JSON_PROPERTY_DOUBLE = "double"; + public static final String JSON_PROPERTY_INT = "int"; @javax.annotation.Nullable - private Double _double; + private Integer _int; - public static final String JSON_PROPERTY_DIRECT = "direct"; + public static final String JSON_PROPERTY_LONG = "long"; @javax.annotation.Nullable - private Boolean direct; + private Long _long; public static final String JSON_PROPERTY_READ_ONLY = "readOnly"; @javax.annotation.Nullable private Boolean readOnly; - public OtaPackageData() { - } - - public OtaPackageData _short(@javax.annotation.Nullable Integer _short) { - this._short = _short; - return this; - } - - /** - * Get _short - * @return _short - */ + public static final String JSON_PROPERTY_SHORT = "short"; @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SHORT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getShort() { - return _short; - } - + private Integer _short; - @JsonProperty(value = JSON_PROPERTY_SHORT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShort(@javax.annotation.Nullable Integer _short) { - this._short = _short; + public OtaPackageData() { } - public OtaPackageData _char(@javax.annotation.Nullable String _char) { this._char = _char; return this; @@ -129,51 +105,51 @@ public void setChar(@javax.annotation.Nullable String _char) { } - public OtaPackageData _int(@javax.annotation.Nullable Integer _int) { - this._int = _int; + public OtaPackageData direct(@javax.annotation.Nullable Boolean direct) { + this.direct = direct; return this; } /** - * Get _int - * @return _int + * Get direct + * @return direct */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_INT, required = false) + @JsonProperty(value = JSON_PROPERTY_DIRECT, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getInt() { - return _int; + public Boolean getDirect() { + return direct; } - @JsonProperty(value = JSON_PROPERTY_INT, required = false) + @JsonProperty(value = JSON_PROPERTY_DIRECT, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInt(@javax.annotation.Nullable Integer _int) { - this._int = _int; + public void setDirect(@javax.annotation.Nullable Boolean direct) { + this.direct = direct; } - public OtaPackageData _long(@javax.annotation.Nullable Long _long) { - this._long = _long; + public OtaPackageData _double(@javax.annotation.Nullable Double _double) { + this._double = _double; return this; } /** - * Get _long - * @return _long + * Get _double + * @return _double */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LONG, required = false) + @JsonProperty(value = JSON_PROPERTY_DOUBLE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLong() { - return _long; + public Double getDouble() { + return _double; } - @JsonProperty(value = JSON_PROPERTY_LONG, required = false) + @JsonProperty(value = JSON_PROPERTY_DOUBLE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLong(@javax.annotation.Nullable Long _long) { - this._long = _long; + public void setDouble(@javax.annotation.Nullable Double _double) { + this._double = _double; } @@ -201,51 +177,51 @@ public void setFloat(@javax.annotation.Nullable Float _float) { } - public OtaPackageData _double(@javax.annotation.Nullable Double _double) { - this._double = _double; + public OtaPackageData _int(@javax.annotation.Nullable Integer _int) { + this._int = _int; return this; } /** - * Get _double - * @return _double + * Get _int + * @return _int */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DOUBLE, required = false) + @JsonProperty(value = JSON_PROPERTY_INT, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDouble() { - return _double; + public Integer getInt() { + return _int; } - @JsonProperty(value = JSON_PROPERTY_DOUBLE, required = false) + @JsonProperty(value = JSON_PROPERTY_INT, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDouble(@javax.annotation.Nullable Double _double) { - this._double = _double; + public void setInt(@javax.annotation.Nullable Integer _int) { + this._int = _int; } - public OtaPackageData direct(@javax.annotation.Nullable Boolean direct) { - this.direct = direct; + public OtaPackageData _long(@javax.annotation.Nullable Long _long) { + this._long = _long; return this; } /** - * Get direct - * @return direct + * Get _long + * @return _long */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DIRECT, required = false) + @JsonProperty(value = JSON_PROPERTY_LONG, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDirect() { - return direct; + public Long getLong() { + return _long; } - @JsonProperty(value = JSON_PROPERTY_DIRECT, required = false) + @JsonProperty(value = JSON_PROPERTY_LONG, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDirect(@javax.annotation.Nullable Boolean direct) { - this.direct = direct; + public void setLong(@javax.annotation.Nullable Long _long) { + this._long = _long; } @@ -273,6 +249,30 @@ public void setReadOnly(@javax.annotation.Nullable Boolean readOnly) { } + public OtaPackageData _short(@javax.annotation.Nullable Integer _short) { + this._short = _short; + return this; + } + + /** + * Get _short + * @return _short + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_SHORT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getShort() { + return _short; + } + + + @JsonProperty(value = JSON_PROPERTY_SHORT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShort(@javax.annotation.Nullable Integer _short) { + this._short = _short; + } + + /** * Return true if this OtaPackage_data object is equal to o. */ @@ -285,33 +285,33 @@ public boolean equals(Object o) { return false; } OtaPackageData otaPackageData = (OtaPackageData) o; - return Objects.equals(this._short, otaPackageData._short) && - Objects.equals(this._char, otaPackageData._char) && + return Objects.equals(this._char, otaPackageData._char) && + Objects.equals(this.direct, otaPackageData.direct) && + Objects.equals(this._double, otaPackageData._double) && + Objects.equals(this._float, otaPackageData._float) && Objects.equals(this._int, otaPackageData._int) && Objects.equals(this._long, otaPackageData._long) && - Objects.equals(this._float, otaPackageData._float) && - Objects.equals(this._double, otaPackageData._double) && - Objects.equals(this.direct, otaPackageData.direct) && - Objects.equals(this.readOnly, otaPackageData.readOnly); + Objects.equals(this.readOnly, otaPackageData.readOnly) && + Objects.equals(this._short, otaPackageData._short); } @Override public int hashCode() { - return Objects.hash(_short, _char, _int, _long, _float, _double, direct, readOnly); + return Objects.hash(_char, direct, _double, _float, _int, _long, readOnly, _short); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OtaPackageData {\n"); - sb.append(" _short: ").append(toIndentedString(_short)).append("\n"); sb.append(" _char: ").append(toIndentedString(_char)).append("\n"); + sb.append(" direct: ").append(toIndentedString(direct)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); sb.append(" _int: ").append(toIndentedString(_int)).append("\n"); sb.append(" _long: ").append(toIndentedString(_long)).append("\n"); - sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); - sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); - sb.append(" direct: ").append(toIndentedString(direct)).append("\n"); sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" _short: ").append(toIndentedString(_short)).append("\n"); sb.append("}"); return sb.toString(); } @@ -359,24 +359,19 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `short` to the URL query string - if (getShort() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sshort%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShort())))); - } - // add `char` to the URL query string if (getChar() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%schar%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getChar())))); } - // add `int` to the URL query string - if (getInt() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sint%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInt())))); + // add `direct` to the URL query string + if (getDirect() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sdirect%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDirect())))); } - // add `long` to the URL query string - if (getLong() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%slong%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLong())))); + // add `double` to the URL query string + if (getDouble() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sdouble%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDouble())))); } // add `float` to the URL query string @@ -384,14 +379,14 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sfloat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFloat())))); } - // add `double` to the URL query string - if (getDouble() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdouble%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDouble())))); + // add `int` to the URL query string + if (getInt() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sint%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInt())))); } - // add `direct` to the URL query string - if (getDirect() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdirect%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDirect())))); + // add `long` to the URL query string + if (getLong() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%slong%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLong())))); } // add `readOnly` to the URL query string @@ -399,6 +394,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sreadOnly%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReadOnly())))); } + // add `short` to the URL query string + if (getShort() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sshort%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShort())))); + } + return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java b/pe/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java index a3898973..11df6388 100644 --- a/pe/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java @@ -242,12 +242,6 @@ public PdfReportTemplateConfig format(@javax.annotation.Nonnull TbReportFormat f return this; } - @Override - public PdfReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { - this.setEntityAliases(entityAliases); - return this; - } - @Override public PdfReportTemplateConfig filters(@javax.annotation.Nullable List filters) { this.setFilters(filters); @@ -272,6 +266,12 @@ public PdfReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String return this; } + @Override + public PdfReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { + this.setEntityAliases(entityAliases); + return this; + } + /** * Return true if this PdfReportTemplateConfig object is equal to o. */ @@ -361,16 +361,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sformat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFormat())))); } - // add `entityAliases` to the URL query string - if (getEntityAliases() != null) { - for (int i = 0; i < getEntityAliases().size(); i++) { - if (getEntityAliases().get(i) != null) { - joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - // add `filters` to the URL query string if (getFilters() != null) { for (int i = 0; i < getFilters().size(); i++) { @@ -401,6 +391,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); } + // add `entityAliases` to the URL query string + if (getEntityAliases() != null) { + for (int i = 0; i < getEntityAliases().size(); i++) { + if (getEntityAliases().get(i) != null) { + joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + // add `pageSize` to the URL query string if (getPageSize() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%spageSize%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageSize())))); diff --git a/pe/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java b/pe/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java index fe29bd9e..4a60a202 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java @@ -46,11 +46,11 @@ */ @JsonPropertyOrder({ ReportTemplateConfig.JSON_PROPERTY_FORMAT, - ReportTemplateConfig.JSON_PROPERTY_ENTITY_ALIASES, ReportTemplateConfig.JSON_PROPERTY_FILTERS, ReportTemplateConfig.JSON_PROPERTY_NAME_PATTERN, ReportTemplateConfig.JSON_PROPERTY_COMPONENTS, - ReportTemplateConfig.JSON_PROPERTY_TIME_DATA_PATTERN + ReportTemplateConfig.JSON_PROPERTY_TIME_DATA_PATTERN, + ReportTemplateConfig.JSON_PROPERTY_ENTITY_ALIASES }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -68,10 +68,6 @@ public class ReportTemplateConfig { @javax.annotation.Nonnull private TbReportFormat format; - public static final String JSON_PROPERTY_ENTITY_ALIASES = "entityAliases"; - @javax.annotation.Nullable - private List entityAliases = new ArrayList<>(); - public static final String JSON_PROPERTY_FILTERS = "filters"; @javax.annotation.Nullable private List filters = new ArrayList<>(); @@ -88,6 +84,10 @@ public class ReportTemplateConfig { @javax.annotation.Nullable private String timeDataPattern; + public static final String JSON_PROPERTY_ENTITY_ALIASES = "entityAliases"; + @javax.annotation.Nullable + private List entityAliases = new ArrayList<>(); + public ReportTemplateConfig() { } @@ -115,38 +115,6 @@ public void setFormat(@javax.annotation.Nonnull TbReportFormat format) { } - public ReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { - this.entityAliases = entityAliases; - return this; - } - - public ReportTemplateConfig addEntityAliasesItem(EntityAlias entityAliasesItem) { - if (this.entityAliases == null) { - this.entityAliases = new ArrayList<>(); - } - this.entityAliases.add(entityAliasesItem); - return this; - } - - /** - * Get entityAliases - * @return entityAliases - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ENTITY_ALIASES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getEntityAliases() { - return entityAliases; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_ALIASES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEntityAliases(@javax.annotation.Nullable List entityAliases) { - this.entityAliases = entityAliases; - } - - public ReportTemplateConfig filters(@javax.annotation.Nullable List filters) { this.filters = filters; return this; @@ -259,6 +227,38 @@ public void setTimeDataPattern(@javax.annotation.Nullable String timeDataPattern } + public ReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { + this.entityAliases = entityAliases; + return this; + } + + public ReportTemplateConfig addEntityAliasesItem(EntityAlias entityAliasesItem) { + if (this.entityAliases == null) { + this.entityAliases = new ArrayList<>(); + } + this.entityAliases.add(entityAliasesItem); + return this; + } + + /** + * Get entityAliases + * @return entityAliases + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ENTITY_ALIASES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEntityAliases() { + return entityAliases; + } + + + @JsonProperty(value = JSON_PROPERTY_ENTITY_ALIASES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityAliases(@javax.annotation.Nullable List entityAliases) { + this.entityAliases = entityAliases; + } + + /** * Return true if this ReportTemplateConfig object is equal to o. */ @@ -272,16 +272,16 @@ public boolean equals(Object o) { } ReportTemplateConfig reportTemplateConfig = (ReportTemplateConfig) o; return Objects.equals(this.format, reportTemplateConfig.format) && - Objects.equals(this.entityAliases, reportTemplateConfig.entityAliases) && Objects.equals(this.filters, reportTemplateConfig.filters) && Objects.equals(this.namePattern, reportTemplateConfig.namePattern) && Objects.equals(this.components, reportTemplateConfig.components) && - Objects.equals(this.timeDataPattern, reportTemplateConfig.timeDataPattern); + Objects.equals(this.timeDataPattern, reportTemplateConfig.timeDataPattern) && + Objects.equals(this.entityAliases, reportTemplateConfig.entityAliases); } @Override public int hashCode() { - return Objects.hash(format, entityAliases, filters, namePattern, components, timeDataPattern); + return Objects.hash(format, filters, namePattern, components, timeDataPattern, entityAliases); } @Override @@ -289,11 +289,11 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReportTemplateConfig {\n"); sb.append(" format: ").append(toIndentedString(format)).append("\n"); - sb.append(" entityAliases: ").append(toIndentedString(entityAliases)).append("\n"); sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); sb.append(" components: ").append(toIndentedString(components)).append("\n"); sb.append(" timeDataPattern: ").append(toIndentedString(timeDataPattern)).append("\n"); + sb.append(" entityAliases: ").append(toIndentedString(entityAliases)).append("\n"); sb.append("}"); return sb.toString(); } @@ -346,16 +346,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sformat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFormat())))); } - // add `entityAliases` to the URL query string - if (getEntityAliases() != null) { - for (int i = 0; i < getEntityAliases().size(); i++) { - if (getEntityAliases().get(i) != null) { - joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - // add `filters` to the URL query string if (getFilters() != null) { for (int i = 0; i < getFilters().size(); i++) { @@ -386,6 +376,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); } + // add `entityAliases` to the URL query string + if (getEntityAliases() != null) { + for (int i = 0; i < getEntityAliases().size(); i++) { + if (getEntityAliases().get(i) != null) { + joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java b/pe/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java index 833de14b..fb6e8069 100644 --- a/pe/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java +++ b/pe/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java @@ -44,8 +44,8 @@ RuleChainDebugEventFilter.JSON_PROPERTY_SERVER, RuleChainDebugEventFilter.JSON_PROPERTY_ERROR_STR, RuleChainDebugEventFilter.JSON_PROPERTY_MESSAGE, - RuleChainDebugEventFilter.JSON_PROPERTY_IS_ERROR, - RuleChainDebugEventFilter.JSON_PROPERTY_ERROR + RuleChainDebugEventFilter.JSON_PROPERTY_ERROR, + RuleChainDebugEventFilter.JSON_PROPERTY_IS_ERROR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -67,14 +67,14 @@ public class RuleChainDebugEventFilter extends EventFilter { @javax.annotation.Nullable private String message; - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public static final String JSON_PROPERTY_ERROR = "error"; @javax.annotation.Nullable private Boolean error; + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private Boolean isError; + public RuleChainDebugEventFilter() { } @@ -150,51 +150,51 @@ public void setMessage(@javax.annotation.Nullable String message) { } - public RuleChainDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public RuleChainDebugEventFilter error(@javax.annotation.Nullable Boolean error) { + this.error = error; return this; } /** - * Get isError - * @return isError + * Get error + * @return error */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; + public Boolean getError() { + return error; } - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public void setError(@javax.annotation.Nullable Boolean error) { + this.error = error; } - public RuleChainDebugEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; + public RuleChainDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; return this; } /** - * Get error - * @return error + * Get isError + * @return isError */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; + public Boolean getIsError() { + return isError; } - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; + public void setIsError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; } @@ -225,14 +225,14 @@ public boolean equals(Object o) { return Objects.equals(this.server, ruleChainDebugEventFilter.server) && Objects.equals(this.errorStr, ruleChainDebugEventFilter.errorStr) && Objects.equals(this.message, ruleChainDebugEventFilter.message) && - Objects.equals(this.isError, ruleChainDebugEventFilter.isError) && Objects.equals(this.error, ruleChainDebugEventFilter.error) && + Objects.equals(this.isError, ruleChainDebugEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, message, isError, error, super.hashCode()); + return Objects.hash(server, errorStr, message, error, isError, super.hashCode()); } @Override @@ -243,8 +243,8 @@ public String toString() { sb.append(" server: ").append(toIndentedString(server)).append("\n"); sb.append(" errorStr: ").append(toIndentedString(errorStr)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -317,16 +317,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); } - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - // add `error` to the URL query string if (getError() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java b/pe/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java index 2bb03d17..3ce2fe1f 100644 --- a/pe/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java +++ b/pe/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java @@ -51,8 +51,8 @@ RuleNodeDebugEventFilter.JSON_PROPERTY_RELATION_TYPE, RuleNodeDebugEventFilter.JSON_PROPERTY_DATA_SEARCH, RuleNodeDebugEventFilter.JSON_PROPERTY_METADATA_SEARCH, - RuleNodeDebugEventFilter.JSON_PROPERTY_IS_ERROR, - RuleNodeDebugEventFilter.JSON_PROPERTY_ERROR + RuleNodeDebugEventFilter.JSON_PROPERTY_ERROR, + RuleNodeDebugEventFilter.JSON_PROPERTY_IS_ERROR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -170,14 +170,14 @@ public static EntityTypeEnum fromValue(String value) { @javax.annotation.Nullable private String metadataSearch; - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public static final String JSON_PROPERTY_ERROR = "error"; @javax.annotation.Nullable private Boolean error; + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private Boolean isError; + public RuleNodeDebugEventFilter() { } @@ -421,51 +421,51 @@ public void setMetadataSearch(@javax.annotation.Nullable String metadataSearch) } - public RuleNodeDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public RuleNodeDebugEventFilter error(@javax.annotation.Nullable Boolean error) { + this.error = error; return this; } /** - * Get isError - * @return isError + * Get error + * @return error */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; + public Boolean getError() { + return error; } - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; + public void setError(@javax.annotation.Nullable Boolean error) { + this.error = error; } - public RuleNodeDebugEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; + public RuleNodeDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; return this; } /** - * Get error - * @return error + * Get isError + * @return isError */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; + public Boolean getIsError() { + return isError; } - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; + public void setIsError(@javax.annotation.Nullable Boolean isError) { + this.isError = isError; } @@ -503,14 +503,14 @@ public boolean equals(Object o) { Objects.equals(this.relationType, ruleNodeDebugEventFilter.relationType) && Objects.equals(this.dataSearch, ruleNodeDebugEventFilter.dataSearch) && Objects.equals(this.metadataSearch, ruleNodeDebugEventFilter.metadataSearch) && - Objects.equals(this.isError, ruleNodeDebugEventFilter.isError) && Objects.equals(this.error, ruleNodeDebugEventFilter.error) && + Objects.equals(this.isError, ruleNodeDebugEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, msgDirectionType, entityId, entityType, msgId, msgType, relationType, dataSearch, metadataSearch, isError, error, super.hashCode()); + return Objects.hash(server, errorStr, msgDirectionType, entityId, entityType, msgId, msgType, relationType, dataSearch, metadataSearch, error, isError, super.hashCode()); } @Override @@ -528,8 +528,8 @@ public String toString() { sb.append(" relationType: ").append(toIndentedString(relationType)).append("\n"); sb.append(" dataSearch: ").append(toIndentedString(dataSearch)).append("\n"); sb.append(" metadataSearch: ").append(toIndentedString(metadataSearch)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -637,16 +637,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smetadataSearch%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMetadataSearch())))); } - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - // add `error` to the URL query string if (getError() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/SelfRegistrationParams.java b/pe/src/main/java/org/thingsboard/client/model/SelfRegistrationParams.java index 1fdbb427..54b3295c 100644 --- a/pe/src/main/java/org/thingsboard/client/model/SelfRegistrationParams.java +++ b/pe/src/main/java/org/thingsboard/client/model/SelfRegistrationParams.java @@ -50,20 +50,20 @@ * SelfRegistrationParams */ @JsonPropertyOrder({ - SelfRegistrationParams.JSON_PROPERTY_PERMISSIONS, SelfRegistrationParams.JSON_PROPERTY_TYPE, - SelfRegistrationParams.JSON_PROPERTY_SHOW_PRIVACY_POLICY, - SelfRegistrationParams.JSON_PROPERTY_SHOW_TERMS_OF_USE, - SelfRegistrationParams.JSON_PROPERTY_TITLE, SelfRegistrationParams.JSON_PROPERTY_ENABLED, - SelfRegistrationParams.JSON_PROPERTY_HOME_DASHBOARD, + SelfRegistrationParams.JSON_PROPERTY_TITLE, + SelfRegistrationParams.JSON_PROPERTY_CAPTCHA, + SelfRegistrationParams.JSON_PROPERTY_PERMISSIONS, SelfRegistrationParams.JSON_PROPERTY_NOTIFICATION_RECIPIENT, SelfRegistrationParams.JSON_PROPERTY_SIGN_UP_FIELDS, - SelfRegistrationParams.JSON_PROPERTY_DEFAULT_DASHBOARD, SelfRegistrationParams.JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, - SelfRegistrationParams.JSON_PROPERTY_CUSTOM_MENU_ID, + SelfRegistrationParams.JSON_PROPERTY_SHOW_PRIVACY_POLICY, + SelfRegistrationParams.JSON_PROPERTY_SHOW_TERMS_OF_USE, + SelfRegistrationParams.JSON_PROPERTY_DEFAULT_DASHBOARD, + SelfRegistrationParams.JSON_PROPERTY_HOME_DASHBOARD, SelfRegistrationParams.JSON_PROPERTY_CUSTOMER_GROUP_ID, - SelfRegistrationParams.JSON_PROPERTY_CAPTCHA + SelfRegistrationParams.JSON_PROPERTY_CUSTOM_MENU_ID }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -77,33 +77,25 @@ }) public class SelfRegistrationParams { - public static final String JSON_PROPERTY_PERMISSIONS = "permissions"; - @javax.annotation.Nullable - private List permissions = new ArrayList<>(); - public static final String JSON_PROPERTY_TYPE = "type"; @javax.annotation.Nonnull private SelfRegistrationType type; - public static final String JSON_PROPERTY_SHOW_PRIVACY_POLICY = "showPrivacyPolicy"; - @javax.annotation.Nullable - private Boolean showPrivacyPolicy; - - public static final String JSON_PROPERTY_SHOW_TERMS_OF_USE = "showTermsOfUse"; + public static final String JSON_PROPERTY_ENABLED = "enabled"; @javax.annotation.Nullable - private Boolean showTermsOfUse; + private Boolean enabled; public static final String JSON_PROPERTY_TITLE = "title"; @javax.annotation.Nullable private String title; - public static final String JSON_PROPERTY_ENABLED = "enabled"; + public static final String JSON_PROPERTY_CAPTCHA = "captcha"; @javax.annotation.Nullable - private Boolean enabled; + private CaptchaParams captcha; - public static final String JSON_PROPERTY_HOME_DASHBOARD = "homeDashboard"; + public static final String JSON_PROPERTY_PERMISSIONS = "permissions"; @javax.annotation.Nullable - private HomeDashboardParams homeDashboard; + private List permissions = new ArrayList<>(); public static final String JSON_PROPERTY_NOTIFICATION_RECIPIENT = "notificationRecipient"; @javax.annotation.Nullable @@ -113,61 +105,37 @@ public class SelfRegistrationParams { @javax.annotation.Nullable private List signUpFields = new ArrayList<>(); - public static final String JSON_PROPERTY_DEFAULT_DASHBOARD = "defaultDashboard"; - @javax.annotation.Nullable - private DefaultDashboardParams defaultDashboard; - public static final String JSON_PROPERTY_CUSTOMER_TITLE_PREFIX = "customerTitlePrefix"; @javax.annotation.Nullable private String customerTitlePrefix; - public static final String JSON_PROPERTY_CUSTOM_MENU_ID = "customMenuId"; + public static final String JSON_PROPERTY_SHOW_PRIVACY_POLICY = "showPrivacyPolicy"; @javax.annotation.Nullable - private CustomMenuId customMenuId; + private Boolean showPrivacyPolicy; - public static final String JSON_PROPERTY_CUSTOMER_GROUP_ID = "customerGroupId"; + public static final String JSON_PROPERTY_SHOW_TERMS_OF_USE = "showTermsOfUse"; @javax.annotation.Nullable - private EntityGroupId customerGroupId; + private Boolean showTermsOfUse; - public static final String JSON_PROPERTY_CAPTCHA = "captcha"; + public static final String JSON_PROPERTY_DEFAULT_DASHBOARD = "defaultDashboard"; @javax.annotation.Nullable - private CaptchaParams captcha; - - public SelfRegistrationParams() { - } - - public SelfRegistrationParams permissions(@javax.annotation.Nullable List permissions) { - this.permissions = permissions; - return this; - } + private DefaultDashboardParams defaultDashboard; - public SelfRegistrationParams addPermissionsItem(GroupPermission permissionsItem) { - if (this.permissions == null) { - this.permissions = new ArrayList<>(); - } - this.permissions.add(permissionsItem); - return this; - } + public static final String JSON_PROPERTY_HOME_DASHBOARD = "homeDashboard"; + @javax.annotation.Nullable + private HomeDashboardParams homeDashboard; - /** - * Get permissions - * @return permissions - */ + public static final String JSON_PROPERTY_CUSTOMER_GROUP_ID = "customerGroupId"; @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PERMISSIONS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPermissions() { - return permissions; - } + private EntityGroupId customerGroupId; + public static final String JSON_PROPERTY_CUSTOM_MENU_ID = "customMenuId"; + @javax.annotation.Nullable + private CustomMenuId customMenuId; - @JsonProperty(value = JSON_PROPERTY_PERMISSIONS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPermissions(@javax.annotation.Nullable List permissions) { - this.permissions = permissions; + public SelfRegistrationParams() { } - public SelfRegistrationParams type(@javax.annotation.Nonnull SelfRegistrationType type) { this.type = type; return this; @@ -192,51 +160,27 @@ public void setType(@javax.annotation.Nonnull SelfRegistrationType type) { } - public SelfRegistrationParams showPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { - this.showPrivacyPolicy = showPrivacyPolicy; - return this; - } - - /** - * Get showPrivacyPolicy - * @return showPrivacyPolicy - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SHOW_PRIVACY_POLICY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowPrivacyPolicy() { - return showPrivacyPolicy; - } - - - @JsonProperty(value = JSON_PROPERTY_SHOW_PRIVACY_POLICY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { - this.showPrivacyPolicy = showPrivacyPolicy; - } - - - public SelfRegistrationParams showTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { - this.showTermsOfUse = showTermsOfUse; + public SelfRegistrationParams enabled(@javax.annotation.Nullable Boolean enabled) { + this.enabled = enabled; return this; } /** - * Get showTermsOfUse - * @return showTermsOfUse + * Get enabled + * @return enabled */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SHOW_TERMS_OF_USE, required = false) + @JsonProperty(value = JSON_PROPERTY_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowTermsOfUse() { - return showTermsOfUse; + public Boolean getEnabled() { + return enabled; } - @JsonProperty(value = JSON_PROPERTY_SHOW_TERMS_OF_USE, required = false) + @JsonProperty(value = JSON_PROPERTY_ENABLED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { - this.showTermsOfUse = showTermsOfUse; + public void setEnabled(@javax.annotation.Nullable Boolean enabled) { + this.enabled = enabled; } @@ -264,51 +208,59 @@ public void setTitle(@javax.annotation.Nullable String title) { } - public SelfRegistrationParams enabled(@javax.annotation.Nullable Boolean enabled) { - this.enabled = enabled; + public SelfRegistrationParams captcha(@javax.annotation.Nullable CaptchaParams captcha) { + this.captcha = captcha; return this; } /** - * Get enabled - * @return enabled + * Get captcha + * @return captcha */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEnabled() { - return enabled; + public CaptchaParams getCaptcha() { + return captcha; } - @JsonProperty(value = JSON_PROPERTY_ENABLED, required = false) + @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEnabled(@javax.annotation.Nullable Boolean enabled) { - this.enabled = enabled; + public void setCaptcha(@javax.annotation.Nullable CaptchaParams captcha) { + this.captcha = captcha; } - public SelfRegistrationParams homeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { - this.homeDashboard = homeDashboard; + public SelfRegistrationParams permissions(@javax.annotation.Nullable List permissions) { + this.permissions = permissions; + return this; + } + + public SelfRegistrationParams addPermissionsItem(GroupPermission permissionsItem) { + if (this.permissions == null) { + this.permissions = new ArrayList<>(); + } + this.permissions.add(permissionsItem); return this; } /** - * Get homeDashboard - * @return homeDashboard + * Get permissions + * @return permissions */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_HOME_DASHBOARD, required = false) + @JsonProperty(value = JSON_PROPERTY_PERMISSIONS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HomeDashboardParams getHomeDashboard() { - return homeDashboard; + public List getPermissions() { + return permissions; } - @JsonProperty(value = JSON_PROPERTY_HOME_DASHBOARD, required = false) + @JsonProperty(value = JSON_PROPERTY_PERMISSIONS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHomeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { - this.homeDashboard = homeDashboard; + public void setPermissions(@javax.annotation.Nullable List permissions) { + this.permissions = permissions; } @@ -368,75 +320,123 @@ public void setSignUpFields(@javax.annotation.Nullable List signUpF } - public SelfRegistrationParams defaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { - this.defaultDashboard = defaultDashboard; + public SelfRegistrationParams customerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { + this.customerTitlePrefix = customerTitlePrefix; return this; } /** - * Get defaultDashboard - * @return defaultDashboard + * Get customerTitlePrefix + * @return customerTitlePrefix */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DEFAULT_DASHBOARD, required = false) + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DefaultDashboardParams getDefaultDashboard() { - return defaultDashboard; + public String getCustomerTitlePrefix() { + return customerTitlePrefix; } - @JsonProperty(value = JSON_PROPERTY_DEFAULT_DASHBOARD, required = false) + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDefaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { - this.defaultDashboard = defaultDashboard; + public void setCustomerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { + this.customerTitlePrefix = customerTitlePrefix; } - public SelfRegistrationParams customerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { - this.customerTitlePrefix = customerTitlePrefix; + public SelfRegistrationParams showPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { + this.showPrivacyPolicy = showPrivacyPolicy; return this; } /** - * Get customerTitlePrefix - * @return customerTitlePrefix + * Get showPrivacyPolicy + * @return showPrivacyPolicy */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, required = false) + @JsonProperty(value = JSON_PROPERTY_SHOW_PRIVACY_POLICY, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCustomerTitlePrefix() { - return customerTitlePrefix; + public Boolean getShowPrivacyPolicy() { + return showPrivacyPolicy; } - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, required = false) + @JsonProperty(value = JSON_PROPERTY_SHOW_PRIVACY_POLICY, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { - this.customerTitlePrefix = customerTitlePrefix; + public void setShowPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { + this.showPrivacyPolicy = showPrivacyPolicy; } - public SelfRegistrationParams customMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { - this.customMenuId = customMenuId; + public SelfRegistrationParams showTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { + this.showTermsOfUse = showTermsOfUse; return this; } /** - * Get customMenuId - * @return customMenuId + * Get showTermsOfUse + * @return showTermsOfUse */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOM_MENU_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_SHOW_TERMS_OF_USE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CustomMenuId getCustomMenuId() { - return customMenuId; + public Boolean getShowTermsOfUse() { + return showTermsOfUse; } - @JsonProperty(value = JSON_PROPERTY_CUSTOM_MENU_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_SHOW_TERMS_OF_USE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { - this.customMenuId = customMenuId; + public void setShowTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { + this.showTermsOfUse = showTermsOfUse; + } + + + public SelfRegistrationParams defaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { + this.defaultDashboard = defaultDashboard; + return this; + } + + /** + * Get defaultDashboard + * @return defaultDashboard + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_DEFAULT_DASHBOARD, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DefaultDashboardParams getDefaultDashboard() { + return defaultDashboard; + } + + + @JsonProperty(value = JSON_PROPERTY_DEFAULT_DASHBOARD, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { + this.defaultDashboard = defaultDashboard; + } + + + public SelfRegistrationParams homeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { + this.homeDashboard = homeDashboard; + return this; + } + + /** + * Get homeDashboard + * @return homeDashboard + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_HOME_DASHBOARD, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public HomeDashboardParams getHomeDashboard() { + return homeDashboard; + } + + + @JsonProperty(value = JSON_PROPERTY_HOME_DASHBOARD, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHomeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { + this.homeDashboard = homeDashboard; } @@ -464,27 +464,27 @@ public void setCustomerGroupId(@javax.annotation.Nullable EntityGroupId customer } - public SelfRegistrationParams captcha(@javax.annotation.Nullable CaptchaParams captcha) { - this.captcha = captcha; + public SelfRegistrationParams customMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { + this.customMenuId = customMenuId; return this; } /** - * Get captcha - * @return captcha + * Get customMenuId + * @return customMenuId */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = false) + @JsonProperty(value = JSON_PROPERTY_CUSTOM_MENU_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CaptchaParams getCaptcha() { - return captcha; + public CustomMenuId getCustomMenuId() { + return customMenuId; } - @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = false) + @JsonProperty(value = JSON_PROPERTY_CUSTOM_MENU_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCaptcha(@javax.annotation.Nullable CaptchaParams captcha) { - this.captcha = captcha; + public void setCustomMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { + this.customMenuId = customMenuId; } @@ -500,45 +500,45 @@ public boolean equals(Object o) { return false; } SelfRegistrationParams selfRegistrationParams = (SelfRegistrationParams) o; - return Objects.equals(this.permissions, selfRegistrationParams.permissions) && - Objects.equals(this.type, selfRegistrationParams.type) && - Objects.equals(this.showPrivacyPolicy, selfRegistrationParams.showPrivacyPolicy) && - Objects.equals(this.showTermsOfUse, selfRegistrationParams.showTermsOfUse) && - Objects.equals(this.title, selfRegistrationParams.title) && + return Objects.equals(this.type, selfRegistrationParams.type) && Objects.equals(this.enabled, selfRegistrationParams.enabled) && - Objects.equals(this.homeDashboard, selfRegistrationParams.homeDashboard) && + Objects.equals(this.title, selfRegistrationParams.title) && + Objects.equals(this.captcha, selfRegistrationParams.captcha) && + Objects.equals(this.permissions, selfRegistrationParams.permissions) && Objects.equals(this.notificationRecipient, selfRegistrationParams.notificationRecipient) && Objects.equals(this.signUpFields, selfRegistrationParams.signUpFields) && - Objects.equals(this.defaultDashboard, selfRegistrationParams.defaultDashboard) && Objects.equals(this.customerTitlePrefix, selfRegistrationParams.customerTitlePrefix) && - Objects.equals(this.customMenuId, selfRegistrationParams.customMenuId) && + Objects.equals(this.showPrivacyPolicy, selfRegistrationParams.showPrivacyPolicy) && + Objects.equals(this.showTermsOfUse, selfRegistrationParams.showTermsOfUse) && + Objects.equals(this.defaultDashboard, selfRegistrationParams.defaultDashboard) && + Objects.equals(this.homeDashboard, selfRegistrationParams.homeDashboard) && Objects.equals(this.customerGroupId, selfRegistrationParams.customerGroupId) && - Objects.equals(this.captcha, selfRegistrationParams.captcha); + Objects.equals(this.customMenuId, selfRegistrationParams.customMenuId); } @Override public int hashCode() { - return Objects.hash(permissions, type, showPrivacyPolicy, showTermsOfUse, title, enabled, homeDashboard, notificationRecipient, signUpFields, defaultDashboard, customerTitlePrefix, customMenuId, customerGroupId, captcha); + return Objects.hash(type, enabled, title, captcha, permissions, notificationRecipient, signUpFields, customerTitlePrefix, showPrivacyPolicy, showTermsOfUse, defaultDashboard, homeDashboard, customerGroupId, customMenuId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SelfRegistrationParams {\n"); - sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" showPrivacyPolicy: ").append(toIndentedString(showPrivacyPolicy)).append("\n"); - sb.append(" showTermsOfUse: ").append(toIndentedString(showTermsOfUse)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" homeDashboard: ").append(toIndentedString(homeDashboard)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" captcha: ").append(toIndentedString(captcha)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); sb.append(" notificationRecipient: ").append(toIndentedString(notificationRecipient)).append("\n"); sb.append(" signUpFields: ").append(toIndentedString(signUpFields)).append("\n"); - sb.append(" defaultDashboard: ").append(toIndentedString(defaultDashboard)).append("\n"); sb.append(" customerTitlePrefix: ").append(toIndentedString(customerTitlePrefix)).append("\n"); - sb.append(" customMenuId: ").append(toIndentedString(customMenuId)).append("\n"); + sb.append(" showPrivacyPolicy: ").append(toIndentedString(showPrivacyPolicy)).append("\n"); + sb.append(" showTermsOfUse: ").append(toIndentedString(showTermsOfUse)).append("\n"); + sb.append(" defaultDashboard: ").append(toIndentedString(defaultDashboard)).append("\n"); + sb.append(" homeDashboard: ").append(toIndentedString(homeDashboard)).append("\n"); sb.append(" customerGroupId: ").append(toIndentedString(customerGroupId)).append("\n"); - sb.append(" captcha: ").append(toIndentedString(captcha)).append("\n"); + sb.append(" customMenuId: ").append(toIndentedString(customMenuId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -586,29 +586,14 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `permissions` to the URL query string - if (getPermissions() != null) { - for (int i = 0; i < getPermissions().size(); i++) { - if (getPermissions().get(i) != null) { - joiner.add(getPermissions().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%spermissions%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - // add `type` to the URL query string if (getType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); } - // add `showPrivacyPolicy` to the URL query string - if (getShowPrivacyPolicy() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sshowPrivacyPolicy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowPrivacyPolicy())))); - } - - // add `showTermsOfUse` to the URL query string - if (getShowTermsOfUse() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sshowTermsOfUse%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowTermsOfUse())))); + // add `enabled` to the URL query string + if (getEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); } // add `title` to the URL query string @@ -616,14 +601,19 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); } - // add `enabled` to the URL query string - if (getEnabled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); + // add `captcha` to the URL query string + if (getCaptcha() != null) { + joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); } - // add `homeDashboard` to the URL query string - if (getHomeDashboard() != null) { - joiner.add(getHomeDashboard().toUrlQueryString(prefix + "homeDashboard" + suffix)); + // add `permissions` to the URL query string + if (getPermissions() != null) { + for (int i = 0; i < getPermissions().size(); i++) { + if (getPermissions().get(i) != null) { + joiner.add(getPermissions().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%spermissions%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } } // add `notificationRecipient` to the URL query string @@ -641,19 +631,29 @@ public String toUrlQueryString(String prefix) { } } - // add `defaultDashboard` to the URL query string - if (getDefaultDashboard() != null) { - joiner.add(getDefaultDashboard().toUrlQueryString(prefix + "defaultDashboard" + suffix)); - } - // add `customerTitlePrefix` to the URL query string if (getCustomerTitlePrefix() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%scustomerTitlePrefix%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCustomerTitlePrefix())))); } - // add `customMenuId` to the URL query string - if (getCustomMenuId() != null) { - joiner.add(getCustomMenuId().toUrlQueryString(prefix + "customMenuId" + suffix)); + // add `showPrivacyPolicy` to the URL query string + if (getShowPrivacyPolicy() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sshowPrivacyPolicy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowPrivacyPolicy())))); + } + + // add `showTermsOfUse` to the URL query string + if (getShowTermsOfUse() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sshowTermsOfUse%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowTermsOfUse())))); + } + + // add `defaultDashboard` to the URL query string + if (getDefaultDashboard() != null) { + joiner.add(getDefaultDashboard().toUrlQueryString(prefix + "defaultDashboard" + suffix)); + } + + // add `homeDashboard` to the URL query string + if (getHomeDashboard() != null) { + joiner.add(getHomeDashboard().toUrlQueryString(prefix + "homeDashboard" + suffix)); } // add `customerGroupId` to the URL query string @@ -661,9 +661,9 @@ public String toUrlQueryString(String prefix) { joiner.add(getCustomerGroupId().toUrlQueryString(prefix + "customerGroupId" + suffix)); } - // add `captcha` to the URL query string - if (getCaptcha() != null) { - joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); + // add `customMenuId` to the URL query string + if (getCustomMenuId() != null) { + joiner.add(getCustomMenuId().toUrlQueryString(prefix + "customMenuId" + suffix)); } return joiner.toString(); diff --git a/pe/src/main/java/org/thingsboard/client/model/TbResource.java b/pe/src/main/java/org/thingsboard/client/model/TbResource.java index d7a71331..9ee6146d 100644 --- a/pe/src/main/java/org/thingsboard/client/model/TbResource.java +++ b/pe/src/main/java/org/thingsboard/client/model/TbResource.java @@ -56,8 +56,8 @@ TbResource.JSON_PROPERTY_PREVIEW, TbResource.JSON_PROPERTY_NAME, TbResource.JSON_PROPERTY_PUBLIC, - TbResource.JSON_PROPERTY_PUBLIC_LINK, - TbResource.JSON_PROPERTY_LINK + TbResource.JSON_PROPERTY_LINK, + TbResource.JSON_PROPERTY_PUBLIC_LINK }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class TbResource { @@ -125,14 +125,14 @@ public class TbResource { @javax.annotation.Nullable private Boolean _public; - public static final String JSON_PROPERTY_PUBLIC_LINK = "publicLink"; - @javax.annotation.Nullable - private String publicLink; - public static final String JSON_PROPERTY_LINK = "link"; @javax.annotation.Nullable private String link; + public static final String JSON_PROPERTY_PUBLIC_LINK = "publicLink"; + @javax.annotation.Nullable + private String publicLink; + public TbResource() { } @@ -143,8 +143,8 @@ public TbResource( @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_ETAG) String etag, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink, - @JsonProperty(JSON_PROPERTY_LINK) String link + @JsonProperty(JSON_PROPERTY_LINK) String link, + @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink ) { this(); this.createdTime = createdTime; @@ -152,8 +152,8 @@ public TbResource( this.customerId = customerId; this.etag = etag; this.name = name; - this.publicLink = publicLink; this.link = link; + this.publicLink = publicLink; } public TbResource id(@javax.annotation.Nullable TbResourceId id) { @@ -491,28 +491,28 @@ public void setPublic(@javax.annotation.Nullable Boolean _public) { /** - * Get publicLink - * @return publicLink + * Get link + * @return link */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicLink() { - return publicLink; + public String getLink() { + return link; } /** - * Get link - * @return link + * Get publicLink + * @return publicLink */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLink() { - return link; + public String getPublicLink() { + return publicLink; } @@ -546,13 +546,13 @@ public boolean equals(Object o) { Objects.equals(this.preview, tbResource.preview) && Objects.equals(this.name, tbResource.name) && Objects.equals(this._public, tbResource._public) && - Objects.equals(this.publicLink, tbResource.publicLink) && - Objects.equals(this.link, tbResource.link); + Objects.equals(this.link, tbResource.link) && + Objects.equals(this.publicLink, tbResource.publicLink); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, customerId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, data, preview, name, _public, publicLink, link); + return Objects.hash(id, createdTime, tenantId, customerId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, data, preview, name, _public, link, publicLink); } @Override @@ -575,8 +575,8 @@ public String toString() { sb.append(" preview: ").append(toIndentedString(preview)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); - sb.append(" publicLink: ").append(toIndentedString(publicLink)).append("\n"); sb.append(" link: ").append(toIndentedString(link)).append("\n"); + sb.append(" publicLink: ").append(toIndentedString(publicLink)).append("\n"); sb.append("}"); return sb.toString(); } @@ -704,16 +704,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%spublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublic())))); } - // add `publicLink` to the URL query string - if (getPublicLink() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%spublicLink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublicLink())))); - } - // add `link` to the URL query string if (getLink() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%slink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLink())))); } + // add `publicLink` to the URL query string + if (getPublicLink() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%spublicLink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublicLink())))); + } + return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/TbResourceInfo.java b/pe/src/main/java/org/thingsboard/client/model/TbResourceInfo.java index 52a73373..23929092 100644 --- a/pe/src/main/java/org/thingsboard/client/model/TbResourceInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/TbResourceInfo.java @@ -54,8 +54,8 @@ TbResourceInfo.JSON_PROPERTY_DESCRIPTOR, TbResourceInfo.JSON_PROPERTY_NAME, TbResourceInfo.JSON_PROPERTY_PUBLIC, - TbResourceInfo.JSON_PROPERTY_PUBLIC_LINK, - TbResourceInfo.JSON_PROPERTY_LINK + TbResourceInfo.JSON_PROPERTY_LINK, + TbResourceInfo.JSON_PROPERTY_PUBLIC_LINK }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class TbResourceInfo { @@ -115,14 +115,14 @@ public class TbResourceInfo { @javax.annotation.Nullable private Boolean _public; - public static final String JSON_PROPERTY_PUBLIC_LINK = "publicLink"; - @javax.annotation.Nullable - private String publicLink; - public static final String JSON_PROPERTY_LINK = "link"; @javax.annotation.Nullable private String link; + public static final String JSON_PROPERTY_PUBLIC_LINK = "publicLink"; + @javax.annotation.Nullable + private String publicLink; + public TbResourceInfo() { } @@ -133,8 +133,8 @@ public TbResourceInfo( @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_ETAG) String etag, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink, - @JsonProperty(JSON_PROPERTY_LINK) String link + @JsonProperty(JSON_PROPERTY_LINK) String link, + @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink ) { this(); this.createdTime = createdTime; @@ -142,8 +142,8 @@ public TbResourceInfo( this.customerId = customerId; this.etag = etag; this.name = name; - this.publicLink = publicLink; this.link = link; + this.publicLink = publicLink; } public TbResourceInfo id(@javax.annotation.Nullable TbResourceId id) { @@ -433,28 +433,28 @@ public void setPublic(@javax.annotation.Nullable Boolean _public) { /** - * Get publicLink - * @return publicLink + * Get link + * @return link */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicLink() { - return publicLink; + public String getLink() { + return link; } /** - * Get link - * @return link + * Get publicLink + * @return publicLink */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLink() { - return link; + public String getPublicLink() { + return publicLink; } @@ -486,13 +486,13 @@ public boolean equals(Object o) { Objects.equals(this.descriptor, tbResourceInfo.descriptor) && Objects.equals(this.name, tbResourceInfo.name) && Objects.equals(this._public, tbResourceInfo._public) && - Objects.equals(this.publicLink, tbResourceInfo.publicLink) && - Objects.equals(this.link, tbResourceInfo.link); + Objects.equals(this.link, tbResourceInfo.link) && + Objects.equals(this.publicLink, tbResourceInfo.publicLink); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, customerId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, name, _public, publicLink, link); + return Objects.hash(id, createdTime, tenantId, customerId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, name, _public, link, publicLink); } @Override @@ -513,8 +513,8 @@ public String toString() { sb.append(" descriptor: ").append(toIndentedString(descriptor)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); - sb.append(" publicLink: ").append(toIndentedString(publicLink)).append("\n"); sb.append(" link: ").append(toIndentedString(link)).append("\n"); + sb.append(" publicLink: ").append(toIndentedString(publicLink)).append("\n"); sb.append("}"); return sb.toString(); } @@ -632,16 +632,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%spublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublic())))); } - // add `publicLink` to the URL query string - if (getPublicLink() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%spublicLink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublicLink())))); - } - // add `link` to the URL query string if (getLink() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%slink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLink())))); } + // add `publicLink` to the URL query string + if (getPublicLink() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%spublicLink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublicLink())))); + } + return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/TsKvEntry.java b/pe/src/main/java/org/thingsboard/client/model/TsKvEntry.java index 033de962..3fefdd94 100644 --- a/pe/src/main/java/org/thingsboard/client/model/TsKvEntry.java +++ b/pe/src/main/java/org/thingsboard/client/model/TsKvEntry.java @@ -46,10 +46,10 @@ TsKvEntry.JSON_PROPERTY_DOUBLE_VALUE, TsKvEntry.JSON_PROPERTY_LONG_VALUE, TsKvEntry.JSON_PROPERTY_BOOLEAN_VALUE, + TsKvEntry.JSON_PROPERTY_VALUE_AS_STRING, TsKvEntry.JSON_PROPERTY_DATA_TYPE, TsKvEntry.JSON_PROPERTY_JSON_VALUE, TsKvEntry.JSON_PROPERTY_STR_VALUE, - TsKvEntry.JSON_PROPERTY_VALUE_AS_STRING, TsKvEntry.JSON_PROPERTY_VERSION }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @@ -77,6 +77,10 @@ public class TsKvEntry { @javax.annotation.Nullable private Boolean booleanValue; + public static final String JSON_PROPERTY_VALUE_AS_STRING = "valueAsString"; + @javax.annotation.Nullable + private String valueAsString; + public static final String JSON_PROPERTY_DATA_TYPE = "dataType"; @javax.annotation.Nullable private DataType dataType; @@ -89,10 +93,6 @@ public class TsKvEntry { @javax.annotation.Nullable private String strValue; - public static final String JSON_PROPERTY_VALUE_AS_STRING = "valueAsString"; - @javax.annotation.Nullable - private String valueAsString; - public static final String JSON_PROPERTY_VERSION = "version"; @javax.annotation.Nullable private Long version; @@ -252,6 +252,30 @@ public void setBooleanValue(@javax.annotation.Nullable Boolean booleanValue) { } + public TsKvEntry valueAsString(@javax.annotation.Nullable String valueAsString) { + this.valueAsString = valueAsString; + return this; + } + + /** + * Get valueAsString + * @return valueAsString + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_VALUE_AS_STRING, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValueAsString() { + return valueAsString; + } + + + @JsonProperty(value = JSON_PROPERTY_VALUE_AS_STRING, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValueAsString(@javax.annotation.Nullable String valueAsString) { + this.valueAsString = valueAsString; + } + + public TsKvEntry dataType(@javax.annotation.Nullable DataType dataType) { this.dataType = dataType; return this; @@ -324,30 +348,6 @@ public void setStrValue(@javax.annotation.Nullable String strValue) { } - public TsKvEntry valueAsString(@javax.annotation.Nullable String valueAsString) { - this.valueAsString = valueAsString; - return this; - } - - /** - * Get valueAsString - * @return valueAsString - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VALUE_AS_STRING, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValueAsString() { - return valueAsString; - } - - - @JsonProperty(value = JSON_PROPERTY_VALUE_AS_STRING, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValueAsString(@javax.annotation.Nullable String valueAsString) { - this.valueAsString = valueAsString; - } - - public TsKvEntry version(@javax.annotation.Nullable Long version) { this.version = version; return this; @@ -390,10 +390,10 @@ public boolean equals(Object o) { Objects.equals(this.doubleValue, tsKvEntry.doubleValue) && Objects.equals(this.longValue, tsKvEntry.longValue) && Objects.equals(this.booleanValue, tsKvEntry.booleanValue) && + Objects.equals(this.valueAsString, tsKvEntry.valueAsString) && Objects.equals(this.dataType, tsKvEntry.dataType) && Objects.equals(this.jsonValue, tsKvEntry.jsonValue) && Objects.equals(this.strValue, tsKvEntry.strValue) && - Objects.equals(this.valueAsString, tsKvEntry.valueAsString) && Objects.equals(this.version, tsKvEntry.version); } @@ -403,7 +403,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(ts, hashCodeNullable(value), key, doubleValue, longValue, booleanValue, dataType, jsonValue, strValue, valueAsString, version); + return Objects.hash(ts, hashCodeNullable(value), key, doubleValue, longValue, booleanValue, valueAsString, dataType, jsonValue, strValue, version); } private static int hashCodeNullable(JsonNullable a) { @@ -423,10 +423,10 @@ public String toString() { sb.append(" doubleValue: ").append(toIndentedString(doubleValue)).append("\n"); sb.append(" longValue: ").append(toIndentedString(longValue)).append("\n"); sb.append(" booleanValue: ").append(toIndentedString(booleanValue)).append("\n"); + sb.append(" valueAsString: ").append(toIndentedString(valueAsString)).append("\n"); sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); sb.append(" jsonValue: ").append(toIndentedString(jsonValue)).append("\n"); sb.append(" strValue: ").append(toIndentedString(strValue)).append("\n"); - sb.append(" valueAsString: ").append(toIndentedString(valueAsString)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append("}"); return sb.toString(); @@ -505,6 +505,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sbooleanValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBooleanValue())))); } + // add `valueAsString` to the URL query string + if (getValueAsString() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%svalueAsString%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValueAsString())))); + } + // add `dataType` to the URL query string if (getDataType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sdataType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDataType())))); @@ -520,11 +525,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstrValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStrValue())))); } - // add `valueAsString` to the URL query string - if (getValueAsString() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%svalueAsString%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValueAsString())))); - } - // add `version` to the URL query string if (getVersion() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); diff --git a/pe/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java b/pe/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java index 3cf75ddd..e75d36cd 100644 --- a/pe/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java +++ b/pe/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java @@ -52,9 +52,9 @@ * WebSelfRegistrationParams */ @JsonPropertyOrder({ + WebSelfRegistrationParams.JSON_PROPERTY_DOMAIN_ID, WebSelfRegistrationParams.JSON_PROPERTY_PRIVACY_POLICY, - WebSelfRegistrationParams.JSON_PROPERTY_TERMS_OF_USE, - WebSelfRegistrationParams.JSON_PROPERTY_DOMAIN_ID + WebSelfRegistrationParams.JSON_PROPERTY_TERMS_OF_USE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -64,6 +64,10 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) public class WebSelfRegistrationParams extends SelfRegistrationParams { + public static final String JSON_PROPERTY_DOMAIN_ID = "domainId"; + @javax.annotation.Nonnull + private DomainId domainId; + public static final String JSON_PROPERTY_PRIVACY_POLICY = "privacyPolicy"; @javax.annotation.Nullable private String privacyPolicy; @@ -72,13 +76,33 @@ public class WebSelfRegistrationParams extends SelfRegistrationParams { @javax.annotation.Nullable private String termsOfUse; - public static final String JSON_PROPERTY_DOMAIN_ID = "domainId"; + public WebSelfRegistrationParams() { + } + + public WebSelfRegistrationParams domainId(@javax.annotation.Nonnull DomainId domainId) { + this.domainId = domainId; + return this; + } + + /** + * Domain name for self registration URL. Typically this matches the domain name from the Login White Labeling page. + * @return domainId + */ @javax.annotation.Nonnull - private DomainId domainId; + @JsonProperty(value = JSON_PROPERTY_DOMAIN_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DomainId getDomainId() { + return domainId; + } - public WebSelfRegistrationParams() { + + @JsonProperty(value = JSON_PROPERTY_DOMAIN_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDomainId(@javax.annotation.Nonnull DomainId domainId) { + this.domainId = domainId; } + public WebSelfRegistrationParams privacyPolicy(@javax.annotation.Nullable String privacyPolicy) { this.privacyPolicy = privacyPolicy; return this; @@ -127,30 +151,6 @@ public void setTermsOfUse(@javax.annotation.Nullable String termsOfUse) { } - public WebSelfRegistrationParams domainId(@javax.annotation.Nonnull DomainId domainId) { - this.domainId = domainId; - return this; - } - - /** - * Domain name for self registration URL. Typically this matches the domain name from the Login White Labeling page. - * @return domainId - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_DOMAIN_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public DomainId getDomainId() { - return domainId; - } - - - @JsonProperty(value = JSON_PROPERTY_DOMAIN_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDomainId(@javax.annotation.Nonnull DomainId domainId) { - this.domainId = domainId; - } - - @Override public WebSelfRegistrationParams type(@javax.annotation.Nonnull SelfRegistrationType type) { this.setType(type); @@ -158,56 +158,56 @@ public WebSelfRegistrationParams type(@javax.annotation.Nonnull SelfRegistration } @Override - public WebSelfRegistrationParams showPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { - this.setShowPrivacyPolicy(showPrivacyPolicy); + public WebSelfRegistrationParams enabled(@javax.annotation.Nullable Boolean enabled) { + this.setEnabled(enabled); return this; } @Override - public WebSelfRegistrationParams showTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { - this.setShowTermsOfUse(showTermsOfUse); + public WebSelfRegistrationParams captcha(@javax.annotation.Nullable CaptchaParams captcha) { + this.setCaptcha(captcha); return this; } @Override - public WebSelfRegistrationParams enabled(@javax.annotation.Nullable Boolean enabled) { - this.setEnabled(enabled); + public WebSelfRegistrationParams notificationRecipient(@javax.annotation.Nullable NotificationTargetId notificationRecipient) { + this.setNotificationRecipient(notificationRecipient); return this; } @Override - public WebSelfRegistrationParams homeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { - this.setHomeDashboard(homeDashboard); + public WebSelfRegistrationParams signUpFields(@javax.annotation.Nullable List signUpFields) { + this.setSignUpFields(signUpFields); return this; } @Override - public WebSelfRegistrationParams notificationRecipient(@javax.annotation.Nullable NotificationTargetId notificationRecipient) { - this.setNotificationRecipient(notificationRecipient); + public WebSelfRegistrationParams customerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { + this.setCustomerTitlePrefix(customerTitlePrefix); return this; } @Override - public WebSelfRegistrationParams signUpFields(@javax.annotation.Nullable List signUpFields) { - this.setSignUpFields(signUpFields); + public WebSelfRegistrationParams showPrivacyPolicy(@javax.annotation.Nullable Boolean showPrivacyPolicy) { + this.setShowPrivacyPolicy(showPrivacyPolicy); return this; } @Override - public WebSelfRegistrationParams defaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { - this.setDefaultDashboard(defaultDashboard); + public WebSelfRegistrationParams showTermsOfUse(@javax.annotation.Nullable Boolean showTermsOfUse) { + this.setShowTermsOfUse(showTermsOfUse); return this; } @Override - public WebSelfRegistrationParams customerTitlePrefix(@javax.annotation.Nullable String customerTitlePrefix) { - this.setCustomerTitlePrefix(customerTitlePrefix); + public WebSelfRegistrationParams defaultDashboard(@javax.annotation.Nullable DefaultDashboardParams defaultDashboard) { + this.setDefaultDashboard(defaultDashboard); return this; } @Override - public WebSelfRegistrationParams customMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { - this.setCustomMenuId(customMenuId); + public WebSelfRegistrationParams homeDashboard(@javax.annotation.Nullable HomeDashboardParams homeDashboard) { + this.setHomeDashboard(homeDashboard); return this; } @@ -218,8 +218,8 @@ public WebSelfRegistrationParams customerGroupId(@javax.annotation.Nullable Enti } @Override - public WebSelfRegistrationParams captcha(@javax.annotation.Nullable CaptchaParams captcha) { - this.setCaptcha(captcha); + public WebSelfRegistrationParams customMenuId(@javax.annotation.Nullable CustomMenuId customMenuId) { + this.setCustomMenuId(customMenuId); return this; } @@ -235,15 +235,15 @@ public boolean equals(Object o) { return false; } WebSelfRegistrationParams webSelfRegistrationParams = (WebSelfRegistrationParams) o; - return Objects.equals(this.privacyPolicy, webSelfRegistrationParams.privacyPolicy) && + return Objects.equals(this.domainId, webSelfRegistrationParams.domainId) && + Objects.equals(this.privacyPolicy, webSelfRegistrationParams.privacyPolicy) && Objects.equals(this.termsOfUse, webSelfRegistrationParams.termsOfUse) && - Objects.equals(this.domainId, webSelfRegistrationParams.domainId) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(privacyPolicy, termsOfUse, domainId, super.hashCode()); + return Objects.hash(domainId, privacyPolicy, termsOfUse, super.hashCode()); } @Override @@ -251,9 +251,9 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class WebSelfRegistrationParams {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" domainId: ").append(toIndentedString(domainId)).append("\n"); sb.append(" privacyPolicy: ").append(toIndentedString(privacyPolicy)).append("\n"); sb.append(" termsOfUse: ").append(toIndentedString(termsOfUse)).append("\n"); - sb.append(" domainId: ").append(toIndentedString(domainId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -301,29 +301,14 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `permissions` to the URL query string - if (getPermissions() != null) { - for (int i = 0; i < getPermissions().size(); i++) { - if (getPermissions().get(i) != null) { - joiner.add(getPermissions().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%spermissions%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - // add `type` to the URL query string if (getType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); } - // add `showPrivacyPolicy` to the URL query string - if (getShowPrivacyPolicy() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sshowPrivacyPolicy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowPrivacyPolicy())))); - } - - // add `showTermsOfUse` to the URL query string - if (getShowTermsOfUse() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sshowTermsOfUse%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowTermsOfUse())))); + // add `enabled` to the URL query string + if (getEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); } // add `title` to the URL query string @@ -331,14 +316,19 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); } - // add `enabled` to the URL query string - if (getEnabled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); + // add `captcha` to the URL query string + if (getCaptcha() != null) { + joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); } - // add `homeDashboard` to the URL query string - if (getHomeDashboard() != null) { - joiner.add(getHomeDashboard().toUrlQueryString(prefix + "homeDashboard" + suffix)); + // add `permissions` to the URL query string + if (getPermissions() != null) { + for (int i = 0; i < getPermissions().size(); i++) { + if (getPermissions().get(i) != null) { + joiner.add(getPermissions().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%spermissions%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } } // add `notificationRecipient` to the URL query string @@ -356,19 +346,29 @@ public String toUrlQueryString(String prefix) { } } - // add `defaultDashboard` to the URL query string - if (getDefaultDashboard() != null) { - joiner.add(getDefaultDashboard().toUrlQueryString(prefix + "defaultDashboard" + suffix)); - } - // add `customerTitlePrefix` to the URL query string if (getCustomerTitlePrefix() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%scustomerTitlePrefix%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCustomerTitlePrefix())))); } - // add `customMenuId` to the URL query string - if (getCustomMenuId() != null) { - joiner.add(getCustomMenuId().toUrlQueryString(prefix + "customMenuId" + suffix)); + // add `showPrivacyPolicy` to the URL query string + if (getShowPrivacyPolicy() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sshowPrivacyPolicy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowPrivacyPolicy())))); + } + + // add `showTermsOfUse` to the URL query string + if (getShowTermsOfUse() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sshowTermsOfUse%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShowTermsOfUse())))); + } + + // add `defaultDashboard` to the URL query string + if (getDefaultDashboard() != null) { + joiner.add(getDefaultDashboard().toUrlQueryString(prefix + "defaultDashboard" + suffix)); + } + + // add `homeDashboard` to the URL query string + if (getHomeDashboard() != null) { + joiner.add(getHomeDashboard().toUrlQueryString(prefix + "homeDashboard" + suffix)); } // add `customerGroupId` to the URL query string @@ -376,9 +376,14 @@ public String toUrlQueryString(String prefix) { joiner.add(getCustomerGroupId().toUrlQueryString(prefix + "customerGroupId" + suffix)); } - // add `captcha` to the URL query string - if (getCaptcha() != null) { - joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); + // add `customMenuId` to the URL query string + if (getCustomMenuId() != null) { + joiner.add(getCustomMenuId().toUrlQueryString(prefix + "customMenuId" + suffix)); + } + + // add `domainId` to the URL query string + if (getDomainId() != null) { + joiner.add(getDomainId().toUrlQueryString(prefix + "domainId" + suffix)); } // add `privacyPolicy` to the URL query string @@ -391,11 +396,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%stermsOfUse%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTermsOfUse())))); } - // add `domainId` to the URL query string - if (getDomainId() != null) { - joiner.add(getDomainId().toUrlQueryString(prefix + "domainId" + suffix)); - } - return joiner.toString(); } static { From bc81fd20bb565e8c54e1bcaafb7b79689e5c9bd6 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Thu, 12 Mar 2026 10:17:07 +0200 Subject: [PATCH 5/8] regenerated clients --- paas/docs/Integration.md | 2 +- paas/docs/IntegrationInfo.md | 2 +- paas/docs/PdfReportTemplateConfig.md | 10 +- paas/docs/ReportTemplateConfig.md | 6 +- paas/spec/openapi.json | 62 ++-- .../client/model/CsvReportTemplateConfig.java | 64 ++--- .../thingsboard/client/model/Integration.java | 78 ++--- .../client/model/IntegrationInfo.java | 78 ++--- .../client/model/PdfReportTemplateConfig.java | 270 +++++++++--------- .../client/model/ReportTemplateConfig.java | 244 ++++++++-------- pe/docs/Integration.md | 4 +- pe/docs/IntegrationInfo.md | 4 +- pe/docs/PdfReportTemplateConfig.md | 10 +- pe/docs/ReportTemplateConfig.md | 6 +- pe/spec/openapi.json | 78 ++--- .../client/model/CsvReportTemplateConfig.java | 64 ++--- .../thingsboard/client/model/Integration.java | 150 +++++----- .../client/model/IntegrationInfo.java | 150 +++++----- .../client/model/PdfReportTemplateConfig.java | 270 +++++++++--------- .../client/model/ReportTemplateConfig.java | 244 ++++++++-------- 20 files changed, 898 insertions(+), 898 deletions(-) diff --git a/paas/docs/Integration.md b/paas/docs/Integration.md index d05e4d3e..13b55fc2 100644 --- a/paas/docs/Integration.md +++ b/paas/docs/Integration.md @@ -17,6 +17,7 @@ A JSON value representing the integration. | **debugMode** | **Boolean** | Enable/disable debug. | [optional] | | **debugSettings** | **DebugSettings** | Debug settings object. | [optional] | | **enabled** | **Boolean** | Boolean flag to enable/disable the integration | [optional] | +| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | | **allowCreateDevicesOrAssets** | **Boolean** | Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet | [optional] | | **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | | **version** | **Long** | | [optional] | @@ -26,7 +27,6 @@ A JSON value representing the integration. | **secret** | **String** | String value used by the remote integrations. Remote integration uses this value along with the 'routingKey' for kind of security and validation to be able to connect to the platform using Grpc | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | JSON object representing integration configuration. Each integration type has specific configuration with the connectivity parameters (like 'host' and 'port' for MQTT type or 'baseUrl' for HTTP based type, etc.) and other important parameters dependent on the integration type | | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the integration | [optional] | -| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | diff --git a/paas/docs/IntegrationInfo.md b/paas/docs/IntegrationInfo.md index 34ec8280..66c30459 100644 --- a/paas/docs/IntegrationInfo.md +++ b/paas/docs/IntegrationInfo.md @@ -15,12 +15,12 @@ | **debugMode** | **Boolean** | Enable/disable debug. | [optional] | | **debugSettings** | **DebugSettings** | Debug settings object. | [optional] | | **enabled** | **Boolean** | Boolean flag to enable/disable the integration | [optional] | +| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | | **allowCreateDevicesOrAssets** | **Boolean** | Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet | [optional] | | **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | | **version** | **Long** | | [optional] | | **status** | **Object** | | [optional] | | **stats** | **Object** | | [optional] | -| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | diff --git a/paas/docs/PdfReportTemplateConfig.md b/paas/docs/PdfReportTemplateConfig.md index 4d3ce266..54b11562 100644 --- a/paas/docs/PdfReportTemplateConfig.md +++ b/paas/docs/PdfReportTemplateConfig.md @@ -9,12 +9,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **pageSize** | **PageSize** | | [optional] | -| **pageOrientation** | **PageOrientation** | | [optional] | -| **pageMargins** | **Insets** | | [optional] | -| **pageBackground** | **String** | | [optional] | -| **header** | **HeaderFooter** | | [optional] | | **footer** | **HeaderFooter** | | [optional] | +| **header** | **HeaderFooter** | | [optional] | +| **pageBackground** | **String** | | [optional] | +| **pageMargins** | **Insets** | | [optional] | +| **pageOrientation** | **PageOrientation** | | [optional] | +| **pageSize** | **PageSize** | | [optional] | diff --git a/paas/docs/ReportTemplateConfig.md b/paas/docs/ReportTemplateConfig.md index 0c4cda14..8a5b8bdd 100644 --- a/paas/docs/ReportTemplateConfig.md +++ b/paas/docs/ReportTemplateConfig.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **format** | **TbReportFormat** | Report format | | -| **filters** | **List\** | | [optional] | | **namePattern** | **String** | | [optional] | -| **components** | **List\** | | [optional] | | **timeDataPattern** | **String** | | [optional] | +| **format** | **TbReportFormat** | Report format | | | **entityAliases** | **List\** | | [optional] | +| **filters** | **List\** | | [optional] | +| **components** | **List\** | | [optional] | diff --git a/paas/spec/openapi.json b/paas/spec/openapi.json index 944dec72..6a6fedd8 100644 --- a/paas/spec/openapi.json +++ b/paas/spec/openapi.json @@ -144195,6 +144195,10 @@ "type": "boolean", "description": "Boolean flag to enable/disable the integration" }, + "remote": { + "type": "boolean", + "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" + }, "allowCreateDevicesOrAssets": { "type": "boolean", "description": "Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet" @@ -144232,10 +144236,6 @@ "additionalInfo": { "$ref": "#/components/schemas/JsonNode", "description": "Additional parameters of the integration" - }, - "remote": { - "type": "boolean", - "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" } }, "required": [ @@ -144317,6 +144317,10 @@ "type": "boolean", "description": "Boolean flag to enable/disable the integration" }, + "remote": { + "type": "boolean", + "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" + }, "allowCreateDevicesOrAssets": { "type": "boolean", "description": "Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet" @@ -144334,10 +144338,6 @@ }, "stats": { "$ref": "#/components/schemas/ArrayNode" - }, - "remote": { - "type": "boolean", - "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" } }, "required": [ @@ -150539,23 +150539,23 @@ { "type": "object", "properties": { - "pageSize": { - "$ref": "#/components/schemas/PageSize" - }, - "pageOrientation": { - "$ref": "#/components/schemas/PageOrientation" + "footer": { + "$ref": "#/components/schemas/HeaderFooter" }, - "pageMargins": { - "$ref": "#/components/schemas/Insets" + "header": { + "$ref": "#/components/schemas/HeaderFooter" }, "pageBackground": { "type": "string" }, - "header": { - "$ref": "#/components/schemas/HeaderFooter" + "pageMargins": { + "$ref": "#/components/schemas/Insets" }, - "footer": { - "$ref": "#/components/schemas/HeaderFooter" + "pageOrientation": { + "$ref": "#/components/schemas/PageOrientation" + }, + "pageSize": { + "$ref": "#/components/schemas/PageSize" } } } @@ -152053,32 +152053,32 @@ } }, "properties": { + "namePattern": { + "type": "string" + }, + "timeDataPattern": { + "type": "string" + }, "format": { "$ref": "#/components/schemas/TbReportFormat", "description": "Report format" }, - "filters": { + "entityAliases": { "type": "array", "items": { - "$ref": "#/components/schemas/Filter" + "$ref": "#/components/schemas/EntityAlias" } }, - "namePattern": { - "type": "string" - }, - "components": { + "filters": { "type": "array", "items": { - "$ref": "#/components/schemas/ReportComponent" + "$ref": "#/components/schemas/Filter" } }, - "timeDataPattern": { - "type": "string" - }, - "entityAliases": { + "components": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityAlias" + "$ref": "#/components/schemas/ReportComponent" } } }, diff --git a/paas/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java b/paas/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java index a4477fc6..3731634b 100644 --- a/paas/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java @@ -59,38 +59,38 @@ public CsvReportTemplateConfig() { } @Override - public CsvReportTemplateConfig format(@javax.annotation.Nonnull TbReportFormat format) { - this.setFormat(format); + public CsvReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { + this.setNamePattern(namePattern); return this; } @Override - public CsvReportTemplateConfig filters(@javax.annotation.Nullable List filters) { - this.setFilters(filters); + public CsvReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String timeDataPattern) { + this.setTimeDataPattern(timeDataPattern); return this; } @Override - public CsvReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { - this.setNamePattern(namePattern); + public CsvReportTemplateConfig format(@javax.annotation.Nonnull TbReportFormat format) { + this.setFormat(format); return this; } @Override - public CsvReportTemplateConfig components(@javax.annotation.Nullable List components) { - this.setComponents(components); + public CsvReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { + this.setEntityAliases(entityAliases); return this; } @Override - public CsvReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String timeDataPattern) { - this.setTimeDataPattern(timeDataPattern); + public CsvReportTemplateConfig filters(@javax.annotation.Nullable List filters) { + this.setFilters(filters); return this; } @Override - public CsvReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { - this.setEntityAliases(entityAliases); + public CsvReportTemplateConfig components(@javax.annotation.Nullable List components) { + this.setComponents(components); return this; } @@ -165,11 +165,31 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); + // add `namePattern` to the URL query string + if (getNamePattern() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); + } + + // add `timeDataPattern` to the URL query string + if (getTimeDataPattern() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); + } + // add `format` to the URL query string if (getFormat() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sformat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFormat())))); } + // add `entityAliases` to the URL query string + if (getEntityAliases() != null) { + for (int i = 0; i < getEntityAliases().size(); i++) { + if (getEntityAliases().get(i) != null) { + joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + // add `filters` to the URL query string if (getFilters() != null) { for (int i = 0; i < getFilters().size(); i++) { @@ -180,11 +200,6 @@ public String toUrlQueryString(String prefix) { } } - // add `namePattern` to the URL query string - if (getNamePattern() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); - } - // add `components` to the URL query string if (getComponents() != null) { for (int i = 0; i < getComponents().size(); i++) { @@ -195,21 +210,6 @@ public String toUrlQueryString(String prefix) { } } - // add `timeDataPattern` to the URL query string - if (getTimeDataPattern() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); - } - - // add `entityAliases` to the URL query string - if (getEntityAliases() != null) { - for (int i = 0; i < getEntityAliases().size(); i++) { - if (getEntityAliases().get(i) != null) { - joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/Integration.java b/paas/src/main/java/org/thingsboard/client/model/Integration.java index 513468ea..f96f37e5 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Integration.java +++ b/paas/src/main/java/org/thingsboard/client/model/Integration.java @@ -48,6 +48,7 @@ Integration.JSON_PROPERTY_DEBUG_MODE, Integration.JSON_PROPERTY_DEBUG_SETTINGS, Integration.JSON_PROPERTY_ENABLED, + Integration.JSON_PROPERTY_REMOTE, Integration.JSON_PROPERTY_ALLOW_CREATE_DEVICES_OR_ASSETS, Integration.JSON_PROPERTY_EDGE_TEMPLATE, Integration.JSON_PROPERTY_VERSION, @@ -56,8 +57,7 @@ Integration.JSON_PROPERTY_ROUTING_KEY, Integration.JSON_PROPERTY_SECRET, Integration.JSON_PROPERTY_CONFIGURATION, - Integration.JSON_PROPERTY_ADDITIONAL_INFO, - Integration.JSON_PROPERTY_REMOTE + Integration.JSON_PROPERTY_ADDITIONAL_INFO }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class Integration { @@ -93,6 +93,10 @@ public class Integration { @javax.annotation.Nullable private Boolean enabled; + public static final String JSON_PROPERTY_REMOTE = "remote"; + @javax.annotation.Nullable + private Boolean remote; + public static final String JSON_PROPERTY_ALLOW_CREATE_DEVICES_OR_ASSETS = "allowCreateDevicesOrAssets"; @javax.annotation.Nullable private Boolean allowCreateDevicesOrAssets; @@ -129,10 +133,6 @@ public class Integration { @javax.annotation.Nullable private com.fasterxml.jackson.databind.JsonNode additionalInfo; - public static final String JSON_PROPERTY_REMOTE = "remote"; - @javax.annotation.Nullable - private Boolean remote; - public Integration() { } @@ -320,6 +320,30 @@ public void setEnabled(@javax.annotation.Nullable Boolean enabled) { } + public Integration remote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; + return this; + } + + /** + * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core + * @return remote + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRemote() { + return remote; + } + + + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRemote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; + } + + public Integration allowCreateDevicesOrAssets(@javax.annotation.Nullable Boolean allowCreateDevicesOrAssets) { this.allowCreateDevicesOrAssets = allowCreateDevicesOrAssets; return this; @@ -536,30 +560,6 @@ public void setAdditionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.d } - public Integration remote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; - return this; - } - - /** - * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core - * @return remote - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRemote() { - return remote; - } - - - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRemote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; - } - - /** * Return true if this Integration object is equal to o. */ @@ -580,6 +580,7 @@ public boolean equals(Object o) { Objects.equals(this.debugMode, integration.debugMode) && Objects.equals(this.debugSettings, integration.debugSettings) && Objects.equals(this.enabled, integration.enabled) && + Objects.equals(this.remote, integration.remote) && Objects.equals(this.allowCreateDevicesOrAssets, integration.allowCreateDevicesOrAssets) && Objects.equals(this.edgeTemplate, integration.edgeTemplate) && Objects.equals(this.version, integration.version) && @@ -588,13 +589,12 @@ public boolean equals(Object o) { Objects.equals(this.routingKey, integration.routingKey) && Objects.equals(this.secret, integration.secret) && Objects.equals(this._configuration, integration._configuration) && - Objects.equals(this.additionalInfo, integration.additionalInfo) && - Objects.equals(this.remote, integration.remote); + Objects.equals(this.additionalInfo, integration.additionalInfo); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, allowCreateDevicesOrAssets, edgeTemplate, version, defaultConverterId, downlinkConverterId, routingKey, secret, _configuration, additionalInfo, remote); + return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, remote, allowCreateDevicesOrAssets, edgeTemplate, version, defaultConverterId, downlinkConverterId, routingKey, secret, _configuration, additionalInfo); } @Override @@ -609,6 +609,7 @@ public String toString() { sb.append(" debugMode: ").append(toIndentedString(debugMode)).append("\n"); sb.append(" debugSettings: ").append(toIndentedString(debugSettings)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append(" allowCreateDevicesOrAssets: ").append(toIndentedString(allowCreateDevicesOrAssets)).append("\n"); sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); @@ -618,7 +619,6 @@ public String toString() { sb.append(" secret: ").append(toIndentedString(secret)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); - sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append("}"); return sb.toString(); } @@ -706,6 +706,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); } + // add `remote` to the URL query string + if (getRemote() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); + } + // add `allowCreateDevicesOrAssets` to the URL query string if (getAllowCreateDevicesOrAssets() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sallowCreateDevicesOrAssets%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAllowCreateDevicesOrAssets())))); @@ -751,11 +756,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sadditionalInfo%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInfo())))); } - // add `remote` to the URL query string - if (getRemote() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); - } - return joiner.toString(); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/IntegrationInfo.java b/paas/src/main/java/org/thingsboard/client/model/IntegrationInfo.java index b542806f..b87f06ee 100644 --- a/paas/src/main/java/org/thingsboard/client/model/IntegrationInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/IntegrationInfo.java @@ -51,12 +51,12 @@ IntegrationInfo.JSON_PROPERTY_DEBUG_MODE, IntegrationInfo.JSON_PROPERTY_DEBUG_SETTINGS, IntegrationInfo.JSON_PROPERTY_ENABLED, + IntegrationInfo.JSON_PROPERTY_REMOTE, IntegrationInfo.JSON_PROPERTY_ALLOW_CREATE_DEVICES_OR_ASSETS, IntegrationInfo.JSON_PROPERTY_EDGE_TEMPLATE, IntegrationInfo.JSON_PROPERTY_VERSION, IntegrationInfo.JSON_PROPERTY_STATUS, - IntegrationInfo.JSON_PROPERTY_STATS, - IntegrationInfo.JSON_PROPERTY_REMOTE + IntegrationInfo.JSON_PROPERTY_STATS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class IntegrationInfo { @@ -92,6 +92,10 @@ public class IntegrationInfo { @javax.annotation.Nullable private Boolean enabled; + public static final String JSON_PROPERTY_REMOTE = "remote"; + @javax.annotation.Nullable + private Boolean remote; + public static final String JSON_PROPERTY_ALLOW_CREATE_DEVICES_OR_ASSETS = "allowCreateDevicesOrAssets"; @javax.annotation.Nullable private Boolean allowCreateDevicesOrAssets; @@ -111,10 +115,6 @@ public class IntegrationInfo { public static final String JSON_PROPERTY_STATS = "stats"; private JsonNullable stats = JsonNullable.of(null); - public static final String JSON_PROPERTY_REMOTE = "remote"; - @javax.annotation.Nullable - private Boolean remote; - public IntegrationInfo() { } @@ -302,6 +302,30 @@ public void setEnabled(@javax.annotation.Nullable Boolean enabled) { } + public IntegrationInfo remote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; + return this; + } + + /** + * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core + * @return remote + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRemote() { + return remote; + } + + + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRemote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; + } + + public IntegrationInfo allowCreateDevicesOrAssets(@javax.annotation.Nullable Boolean allowCreateDevicesOrAssets) { this.allowCreateDevicesOrAssets = allowCreateDevicesOrAssets; return this; @@ -430,30 +454,6 @@ public void setStats(@javax.annotation.Nullable Object stats) { } - public IntegrationInfo remote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; - return this; - } - - /** - * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core - * @return remote - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRemote() { - return remote; - } - - - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRemote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; - } - - /** * Return true if this IntegrationInfo object is equal to o. */ @@ -474,12 +474,12 @@ public boolean equals(Object o) { Objects.equals(this.debugMode, integrationInfo.debugMode) && Objects.equals(this.debugSettings, integrationInfo.debugSettings) && Objects.equals(this.enabled, integrationInfo.enabled) && + Objects.equals(this.remote, integrationInfo.remote) && Objects.equals(this.allowCreateDevicesOrAssets, integrationInfo.allowCreateDevicesOrAssets) && Objects.equals(this.edgeTemplate, integrationInfo.edgeTemplate) && Objects.equals(this.version, integrationInfo.version) && Objects.equals(this.status, integrationInfo.status) && - equalsNullable(this.stats, integrationInfo.stats) && - Objects.equals(this.remote, integrationInfo.remote); + equalsNullable(this.stats, integrationInfo.stats); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -488,7 +488,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, allowCreateDevicesOrAssets, edgeTemplate, version, status, hashCodeNullable(stats), remote); + return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, remote, allowCreateDevicesOrAssets, edgeTemplate, version, status, hashCodeNullable(stats)); } private static int hashCodeNullable(JsonNullable a) { @@ -510,12 +510,12 @@ public String toString() { sb.append(" debugMode: ").append(toIndentedString(debugMode)).append("\n"); sb.append(" debugSettings: ").append(toIndentedString(debugSettings)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append(" allowCreateDevicesOrAssets: ").append(toIndentedString(allowCreateDevicesOrAssets)).append("\n"); sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" stats: ").append(toIndentedString(stats)).append("\n"); - sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append("}"); return sb.toString(); } @@ -603,6 +603,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); } + // add `remote` to the URL query string + if (getRemote() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); + } + // add `allowCreateDevicesOrAssets` to the URL query string if (getAllowCreateDevicesOrAssets() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sallowCreateDevicesOrAssets%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAllowCreateDevicesOrAssets())))); @@ -628,11 +633,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstats%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStats())))); } - // add `remote` to the URL query string - if (getRemote() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); - } - return joiner.toString(); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java b/paas/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java index 11df6388..8b5f2140 100644 --- a/paas/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java @@ -50,12 +50,12 @@ * PdfReportTemplateConfig */ @JsonPropertyOrder({ - PdfReportTemplateConfig.JSON_PROPERTY_PAGE_SIZE, - PdfReportTemplateConfig.JSON_PROPERTY_PAGE_ORIENTATION, - PdfReportTemplateConfig.JSON_PROPERTY_PAGE_MARGINS, - PdfReportTemplateConfig.JSON_PROPERTY_PAGE_BACKGROUND, + PdfReportTemplateConfig.JSON_PROPERTY_FOOTER, PdfReportTemplateConfig.JSON_PROPERTY_HEADER, - PdfReportTemplateConfig.JSON_PROPERTY_FOOTER + PdfReportTemplateConfig.JSON_PROPERTY_PAGE_BACKGROUND, + PdfReportTemplateConfig.JSON_PROPERTY_PAGE_MARGINS, + PdfReportTemplateConfig.JSON_PROPERTY_PAGE_ORIENTATION, + PdfReportTemplateConfig.JSON_PROPERTY_PAGE_SIZE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -65,210 +65,210 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "format", visible = true) public class PdfReportTemplateConfig extends ReportTemplateConfig { - public static final String JSON_PROPERTY_PAGE_SIZE = "pageSize"; - @javax.annotation.Nullable - private PageSize pageSize; - - public static final String JSON_PROPERTY_PAGE_ORIENTATION = "pageOrientation"; + public static final String JSON_PROPERTY_FOOTER = "footer"; @javax.annotation.Nullable - private PageOrientation pageOrientation; + private HeaderFooter footer; - public static final String JSON_PROPERTY_PAGE_MARGINS = "pageMargins"; + public static final String JSON_PROPERTY_HEADER = "header"; @javax.annotation.Nullable - private Insets pageMargins; + private HeaderFooter header; public static final String JSON_PROPERTY_PAGE_BACKGROUND = "pageBackground"; @javax.annotation.Nullable private String pageBackground; - public static final String JSON_PROPERTY_HEADER = "header"; + public static final String JSON_PROPERTY_PAGE_MARGINS = "pageMargins"; @javax.annotation.Nullable - private HeaderFooter header; + private Insets pageMargins; - public static final String JSON_PROPERTY_FOOTER = "footer"; + public static final String JSON_PROPERTY_PAGE_ORIENTATION = "pageOrientation"; @javax.annotation.Nullable - private HeaderFooter footer; + private PageOrientation pageOrientation; + + public static final String JSON_PROPERTY_PAGE_SIZE = "pageSize"; + @javax.annotation.Nullable + private PageSize pageSize; public PdfReportTemplateConfig() { } - public PdfReportTemplateConfig pageSize(@javax.annotation.Nullable PageSize pageSize) { - this.pageSize = pageSize; + public PdfReportTemplateConfig footer(@javax.annotation.Nullable HeaderFooter footer) { + this.footer = footer; return this; } /** - * Get pageSize - * @return pageSize + * Get footer + * @return footer */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PAGE_SIZE, required = false) + @JsonProperty(value = JSON_PROPERTY_FOOTER, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public PageSize getPageSize() { - return pageSize; + public HeaderFooter getFooter() { + return footer; } - @JsonProperty(value = JSON_PROPERTY_PAGE_SIZE, required = false) + @JsonProperty(value = JSON_PROPERTY_FOOTER, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageSize(@javax.annotation.Nullable PageSize pageSize) { - this.pageSize = pageSize; + public void setFooter(@javax.annotation.Nullable HeaderFooter footer) { + this.footer = footer; } - public PdfReportTemplateConfig pageOrientation(@javax.annotation.Nullable PageOrientation pageOrientation) { - this.pageOrientation = pageOrientation; + public PdfReportTemplateConfig header(@javax.annotation.Nullable HeaderFooter header) { + this.header = header; return this; } /** - * Get pageOrientation - * @return pageOrientation + * Get header + * @return header */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PAGE_ORIENTATION, required = false) + @JsonProperty(value = JSON_PROPERTY_HEADER, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public PageOrientation getPageOrientation() { - return pageOrientation; + public HeaderFooter getHeader() { + return header; } - @JsonProperty(value = JSON_PROPERTY_PAGE_ORIENTATION, required = false) + @JsonProperty(value = JSON_PROPERTY_HEADER, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageOrientation(@javax.annotation.Nullable PageOrientation pageOrientation) { - this.pageOrientation = pageOrientation; + public void setHeader(@javax.annotation.Nullable HeaderFooter header) { + this.header = header; } - public PdfReportTemplateConfig pageMargins(@javax.annotation.Nullable Insets pageMargins) { - this.pageMargins = pageMargins; + public PdfReportTemplateConfig pageBackground(@javax.annotation.Nullable String pageBackground) { + this.pageBackground = pageBackground; return this; } /** - * Get pageMargins - * @return pageMargins + * Get pageBackground + * @return pageBackground */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PAGE_MARGINS, required = false) + @JsonProperty(value = JSON_PROPERTY_PAGE_BACKGROUND, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Insets getPageMargins() { - return pageMargins; + public String getPageBackground() { + return pageBackground; } - @JsonProperty(value = JSON_PROPERTY_PAGE_MARGINS, required = false) + @JsonProperty(value = JSON_PROPERTY_PAGE_BACKGROUND, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageMargins(@javax.annotation.Nullable Insets pageMargins) { - this.pageMargins = pageMargins; + public void setPageBackground(@javax.annotation.Nullable String pageBackground) { + this.pageBackground = pageBackground; } - public PdfReportTemplateConfig pageBackground(@javax.annotation.Nullable String pageBackground) { - this.pageBackground = pageBackground; + public PdfReportTemplateConfig pageMargins(@javax.annotation.Nullable Insets pageMargins) { + this.pageMargins = pageMargins; return this; } /** - * Get pageBackground - * @return pageBackground + * Get pageMargins + * @return pageMargins */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PAGE_BACKGROUND, required = false) + @JsonProperty(value = JSON_PROPERTY_PAGE_MARGINS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPageBackground() { - return pageBackground; + public Insets getPageMargins() { + return pageMargins; } - @JsonProperty(value = JSON_PROPERTY_PAGE_BACKGROUND, required = false) + @JsonProperty(value = JSON_PROPERTY_PAGE_MARGINS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageBackground(@javax.annotation.Nullable String pageBackground) { - this.pageBackground = pageBackground; + public void setPageMargins(@javax.annotation.Nullable Insets pageMargins) { + this.pageMargins = pageMargins; } - public PdfReportTemplateConfig header(@javax.annotation.Nullable HeaderFooter header) { - this.header = header; + public PdfReportTemplateConfig pageOrientation(@javax.annotation.Nullable PageOrientation pageOrientation) { + this.pageOrientation = pageOrientation; return this; } /** - * Get header - * @return header + * Get pageOrientation + * @return pageOrientation */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_HEADER, required = false) + @JsonProperty(value = JSON_PROPERTY_PAGE_ORIENTATION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HeaderFooter getHeader() { - return header; + public PageOrientation getPageOrientation() { + return pageOrientation; } - @JsonProperty(value = JSON_PROPERTY_HEADER, required = false) + @JsonProperty(value = JSON_PROPERTY_PAGE_ORIENTATION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeader(@javax.annotation.Nullable HeaderFooter header) { - this.header = header; + public void setPageOrientation(@javax.annotation.Nullable PageOrientation pageOrientation) { + this.pageOrientation = pageOrientation; } - public PdfReportTemplateConfig footer(@javax.annotation.Nullable HeaderFooter footer) { - this.footer = footer; + public PdfReportTemplateConfig pageSize(@javax.annotation.Nullable PageSize pageSize) { + this.pageSize = pageSize; return this; } /** - * Get footer - * @return footer + * Get pageSize + * @return pageSize */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_FOOTER, required = false) + @JsonProperty(value = JSON_PROPERTY_PAGE_SIZE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HeaderFooter getFooter() { - return footer; + public PageSize getPageSize() { + return pageSize; } - @JsonProperty(value = JSON_PROPERTY_FOOTER, required = false) + @JsonProperty(value = JSON_PROPERTY_PAGE_SIZE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFooter(@javax.annotation.Nullable HeaderFooter footer) { - this.footer = footer; + public void setPageSize(@javax.annotation.Nullable PageSize pageSize) { + this.pageSize = pageSize; } @Override - public PdfReportTemplateConfig format(@javax.annotation.Nonnull TbReportFormat format) { - this.setFormat(format); + public PdfReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { + this.setNamePattern(namePattern); return this; } @Override - public PdfReportTemplateConfig filters(@javax.annotation.Nullable List filters) { - this.setFilters(filters); + public PdfReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String timeDataPattern) { + this.setTimeDataPattern(timeDataPattern); return this; } @Override - public PdfReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { - this.setNamePattern(namePattern); + public PdfReportTemplateConfig format(@javax.annotation.Nonnull TbReportFormat format) { + this.setFormat(format); return this; } @Override - public PdfReportTemplateConfig components(@javax.annotation.Nullable List components) { - this.setComponents(components); + public PdfReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { + this.setEntityAliases(entityAliases); return this; } @Override - public PdfReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String timeDataPattern) { - this.setTimeDataPattern(timeDataPattern); + public PdfReportTemplateConfig filters(@javax.annotation.Nullable List filters) { + this.setFilters(filters); return this; } @Override - public PdfReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { - this.setEntityAliases(entityAliases); + public PdfReportTemplateConfig components(@javax.annotation.Nullable List components) { + this.setComponents(components); return this; } @@ -284,18 +284,18 @@ public boolean equals(Object o) { return false; } PdfReportTemplateConfig pdfReportTemplateConfig = (PdfReportTemplateConfig) o; - return Objects.equals(this.pageSize, pdfReportTemplateConfig.pageSize) && - Objects.equals(this.pageOrientation, pdfReportTemplateConfig.pageOrientation) && - Objects.equals(this.pageMargins, pdfReportTemplateConfig.pageMargins) && - Objects.equals(this.pageBackground, pdfReportTemplateConfig.pageBackground) && + return Objects.equals(this.footer, pdfReportTemplateConfig.footer) && Objects.equals(this.header, pdfReportTemplateConfig.header) && - Objects.equals(this.footer, pdfReportTemplateConfig.footer) && + Objects.equals(this.pageBackground, pdfReportTemplateConfig.pageBackground) && + Objects.equals(this.pageMargins, pdfReportTemplateConfig.pageMargins) && + Objects.equals(this.pageOrientation, pdfReportTemplateConfig.pageOrientation) && + Objects.equals(this.pageSize, pdfReportTemplateConfig.pageSize) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(pageSize, pageOrientation, pageMargins, pageBackground, header, footer, super.hashCode()); + return Objects.hash(footer, header, pageBackground, pageMargins, pageOrientation, pageSize, super.hashCode()); } @Override @@ -303,12 +303,12 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PdfReportTemplateConfig {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); - sb.append(" pageOrientation: ").append(toIndentedString(pageOrientation)).append("\n"); - sb.append(" pageMargins: ").append(toIndentedString(pageMargins)).append("\n"); - sb.append(" pageBackground: ").append(toIndentedString(pageBackground)).append("\n"); - sb.append(" header: ").append(toIndentedString(header)).append("\n"); sb.append(" footer: ").append(toIndentedString(footer)).append("\n"); + sb.append(" header: ").append(toIndentedString(header)).append("\n"); + sb.append(" pageBackground: ").append(toIndentedString(pageBackground)).append("\n"); + sb.append(" pageMargins: ").append(toIndentedString(pageMargins)).append("\n"); + sb.append(" pageOrientation: ").append(toIndentedString(pageOrientation)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); sb.append("}"); return sb.toString(); } @@ -356,11 +356,31 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); + // add `namePattern` to the URL query string + if (getNamePattern() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); + } + + // add `timeDataPattern` to the URL query string + if (getTimeDataPattern() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); + } + // add `format` to the URL query string if (getFormat() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sformat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFormat())))); } + // add `entityAliases` to the URL query string + if (getEntityAliases() != null) { + for (int i = 0; i < getEntityAliases().size(); i++) { + if (getEntityAliases().get(i) != null) { + joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + // add `filters` to the URL query string if (getFilters() != null) { for (int i = 0; i < getFilters().size(); i++) { @@ -371,11 +391,6 @@ public String toUrlQueryString(String prefix) { } } - // add `namePattern` to the URL query string - if (getNamePattern() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); - } - // add `components` to the URL query string if (getComponents() != null) { for (int i = 0; i < getComponents().size(); i++) { @@ -386,29 +401,19 @@ public String toUrlQueryString(String prefix) { } } - // add `timeDataPattern` to the URL query string - if (getTimeDataPattern() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); - } - - // add `entityAliases` to the URL query string - if (getEntityAliases() != null) { - for (int i = 0; i < getEntityAliases().size(); i++) { - if (getEntityAliases().get(i) != null) { - joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } + // add `footer` to the URL query string + if (getFooter() != null) { + joiner.add(getFooter().toUrlQueryString(prefix + "footer" + suffix)); } - // add `pageSize` to the URL query string - if (getPageSize() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%spageSize%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageSize())))); + // add `header` to the URL query string + if (getHeader() != null) { + joiner.add(getHeader().toUrlQueryString(prefix + "header" + suffix)); } - // add `pageOrientation` to the URL query string - if (getPageOrientation() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%spageOrientation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageOrientation())))); + // add `pageBackground` to the URL query string + if (getPageBackground() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%spageBackground%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageBackground())))); } // add `pageMargins` to the URL query string @@ -416,19 +421,14 @@ public String toUrlQueryString(String prefix) { joiner.add(getPageMargins().toUrlQueryString(prefix + "pageMargins" + suffix)); } - // add `pageBackground` to the URL query string - if (getPageBackground() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%spageBackground%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageBackground())))); - } - - // add `header` to the URL query string - if (getHeader() != null) { - joiner.add(getHeader().toUrlQueryString(prefix + "header" + suffix)); + // add `pageOrientation` to the URL query string + if (getPageOrientation() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%spageOrientation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageOrientation())))); } - // add `footer` to the URL query string - if (getFooter() != null) { - joiner.add(getFooter().toUrlQueryString(prefix + "footer" + suffix)); + // add `pageSize` to the URL query string + if (getPageSize() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%spageSize%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageSize())))); } return joiner.toString(); diff --git a/paas/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java b/paas/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java index 4a60a202..992c2ff7 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java @@ -45,12 +45,12 @@ * ReportTemplateConfig */ @JsonPropertyOrder({ - ReportTemplateConfig.JSON_PROPERTY_FORMAT, - ReportTemplateConfig.JSON_PROPERTY_FILTERS, ReportTemplateConfig.JSON_PROPERTY_NAME_PATTERN, - ReportTemplateConfig.JSON_PROPERTY_COMPONENTS, ReportTemplateConfig.JSON_PROPERTY_TIME_DATA_PATTERN, - ReportTemplateConfig.JSON_PROPERTY_ENTITY_ALIASES + ReportTemplateConfig.JSON_PROPERTY_FORMAT, + ReportTemplateConfig.JSON_PROPERTY_ENTITY_ALIASES, + ReportTemplateConfig.JSON_PROPERTY_FILTERS, + ReportTemplateConfig.JSON_PROPERTY_COMPONENTS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -64,33 +64,81 @@ }) public class ReportTemplateConfig { + public static final String JSON_PROPERTY_NAME_PATTERN = "namePattern"; + @javax.annotation.Nullable + private String namePattern; + + public static final String JSON_PROPERTY_TIME_DATA_PATTERN = "timeDataPattern"; + @javax.annotation.Nullable + private String timeDataPattern; + public static final String JSON_PROPERTY_FORMAT = "format"; @javax.annotation.Nonnull private TbReportFormat format; - public static final String JSON_PROPERTY_FILTERS = "filters"; + public static final String JSON_PROPERTY_ENTITY_ALIASES = "entityAliases"; @javax.annotation.Nullable - private List filters = new ArrayList<>(); + private List entityAliases = new ArrayList<>(); - public static final String JSON_PROPERTY_NAME_PATTERN = "namePattern"; + public static final String JSON_PROPERTY_FILTERS = "filters"; @javax.annotation.Nullable - private String namePattern; + private List filters = new ArrayList<>(); public static final String JSON_PROPERTY_COMPONENTS = "components"; @javax.annotation.Nullable private List components = new ArrayList<>(); - public static final String JSON_PROPERTY_TIME_DATA_PATTERN = "timeDataPattern"; + public ReportTemplateConfig() { + } + + public ReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * Get namePattern + * @return namePattern + */ @javax.annotation.Nullable - private String timeDataPattern; + @JsonProperty(value = JSON_PROPERTY_NAME_PATTERN, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNamePattern() { + return namePattern; + } - public static final String JSON_PROPERTY_ENTITY_ALIASES = "entityAliases"; + + @JsonProperty(value = JSON_PROPERTY_NAME_PATTERN, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + + public ReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String timeDataPattern) { + this.timeDataPattern = timeDataPattern; + return this; + } + + /** + * Get timeDataPattern + * @return timeDataPattern + */ @javax.annotation.Nullable - private List entityAliases = new ArrayList<>(); + @JsonProperty(value = JSON_PROPERTY_TIME_DATA_PATTERN, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTimeDataPattern() { + return timeDataPattern; + } - public ReportTemplateConfig() { + + @JsonProperty(value = JSON_PROPERTY_TIME_DATA_PATTERN, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTimeDataPattern(@javax.annotation.Nullable String timeDataPattern) { + this.timeDataPattern = timeDataPattern; } + public ReportTemplateConfig format(@javax.annotation.Nonnull TbReportFormat format) { this.format = format; return this; @@ -115,59 +163,67 @@ public void setFormat(@javax.annotation.Nonnull TbReportFormat format) { } - public ReportTemplateConfig filters(@javax.annotation.Nullable List filters) { - this.filters = filters; + public ReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { + this.entityAliases = entityAliases; return this; } - public ReportTemplateConfig addFiltersItem(Filter filtersItem) { - if (this.filters == null) { - this.filters = new ArrayList<>(); + public ReportTemplateConfig addEntityAliasesItem(EntityAlias entityAliasesItem) { + if (this.entityAliases == null) { + this.entityAliases = new ArrayList<>(); } - this.filters.add(filtersItem); + this.entityAliases.add(entityAliasesItem); return this; } /** - * Get filters - * @return filters + * Get entityAliases + * @return entityAliases */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_FILTERS, required = false) + @JsonProperty(value = JSON_PROPERTY_ENTITY_ALIASES, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFilters() { - return filters; + public List getEntityAliases() { + return entityAliases; } - @JsonProperty(value = JSON_PROPERTY_FILTERS, required = false) + @JsonProperty(value = JSON_PROPERTY_ENTITY_ALIASES, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFilters(@javax.annotation.Nullable List filters) { - this.filters = filters; + public void setEntityAliases(@javax.annotation.Nullable List entityAliases) { + this.entityAliases = entityAliases; } - public ReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; + public ReportTemplateConfig filters(@javax.annotation.Nullable List filters) { + this.filters = filters; + return this; + } + + public ReportTemplateConfig addFiltersItem(Filter filtersItem) { + if (this.filters == null) { + this.filters = new ArrayList<>(); + } + this.filters.add(filtersItem); return this; } /** - * Get namePattern - * @return namePattern + * Get filters + * @return filters */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_NAME_PATTERN, required = false) + @JsonProperty(value = JSON_PROPERTY_FILTERS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNamePattern() { - return namePattern; + public List getFilters() { + return filters; } - @JsonProperty(value = JSON_PROPERTY_NAME_PATTERN, required = false) + @JsonProperty(value = JSON_PROPERTY_FILTERS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; + public void setFilters(@javax.annotation.Nullable List filters) { + this.filters = filters; } @@ -203,62 +259,6 @@ public void setComponents(@javax.annotation.Nullable List compo } - public ReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String timeDataPattern) { - this.timeDataPattern = timeDataPattern; - return this; - } - - /** - * Get timeDataPattern - * @return timeDataPattern - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TIME_DATA_PATTERN, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimeDataPattern() { - return timeDataPattern; - } - - - @JsonProperty(value = JSON_PROPERTY_TIME_DATA_PATTERN, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTimeDataPattern(@javax.annotation.Nullable String timeDataPattern) { - this.timeDataPattern = timeDataPattern; - } - - - public ReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { - this.entityAliases = entityAliases; - return this; - } - - public ReportTemplateConfig addEntityAliasesItem(EntityAlias entityAliasesItem) { - if (this.entityAliases == null) { - this.entityAliases = new ArrayList<>(); - } - this.entityAliases.add(entityAliasesItem); - return this; - } - - /** - * Get entityAliases - * @return entityAliases - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ENTITY_ALIASES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getEntityAliases() { - return entityAliases; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_ALIASES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEntityAliases(@javax.annotation.Nullable List entityAliases) { - this.entityAliases = entityAliases; - } - - /** * Return true if this ReportTemplateConfig object is equal to o. */ @@ -271,29 +271,29 @@ public boolean equals(Object o) { return false; } ReportTemplateConfig reportTemplateConfig = (ReportTemplateConfig) o; - return Objects.equals(this.format, reportTemplateConfig.format) && - Objects.equals(this.filters, reportTemplateConfig.filters) && - Objects.equals(this.namePattern, reportTemplateConfig.namePattern) && - Objects.equals(this.components, reportTemplateConfig.components) && + return Objects.equals(this.namePattern, reportTemplateConfig.namePattern) && Objects.equals(this.timeDataPattern, reportTemplateConfig.timeDataPattern) && - Objects.equals(this.entityAliases, reportTemplateConfig.entityAliases); + Objects.equals(this.format, reportTemplateConfig.format) && + Objects.equals(this.entityAliases, reportTemplateConfig.entityAliases) && + Objects.equals(this.filters, reportTemplateConfig.filters) && + Objects.equals(this.components, reportTemplateConfig.components); } @Override public int hashCode() { - return Objects.hash(format, filters, namePattern, components, timeDataPattern, entityAliases); + return Objects.hash(namePattern, timeDataPattern, format, entityAliases, filters, components); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReportTemplateConfig {\n"); - sb.append(" format: ").append(toIndentedString(format)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); - sb.append(" components: ").append(toIndentedString(components)).append("\n"); sb.append(" timeDataPattern: ").append(toIndentedString(timeDataPattern)).append("\n"); + sb.append(" format: ").append(toIndentedString(format)).append("\n"); sb.append(" entityAliases: ").append(toIndentedString(entityAliases)).append("\n"); + sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); + sb.append(" components: ").append(toIndentedString(components)).append("\n"); sb.append("}"); return sb.toString(); } @@ -341,11 +341,31 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); + // add `namePattern` to the URL query string + if (getNamePattern() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); + } + + // add `timeDataPattern` to the URL query string + if (getTimeDataPattern() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); + } + // add `format` to the URL query string if (getFormat() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sformat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFormat())))); } + // add `entityAliases` to the URL query string + if (getEntityAliases() != null) { + for (int i = 0; i < getEntityAliases().size(); i++) { + if (getEntityAliases().get(i) != null) { + joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + // add `filters` to the URL query string if (getFilters() != null) { for (int i = 0; i < getFilters().size(); i++) { @@ -356,11 +376,6 @@ public String toUrlQueryString(String prefix) { } } - // add `namePattern` to the URL query string - if (getNamePattern() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); - } - // add `components` to the URL query string if (getComponents() != null) { for (int i = 0; i < getComponents().size(); i++) { @@ -371,21 +386,6 @@ public String toUrlQueryString(String prefix) { } } - // add `timeDataPattern` to the URL query string - if (getTimeDataPattern() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); - } - - // add `entityAliases` to the URL query string - if (getEntityAliases() != null) { - for (int i = 0; i < getEntityAliases().size(); i++) { - if (getEntityAliases().get(i) != null) { - joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - return joiner.toString(); } static { diff --git a/pe/docs/Integration.md b/pe/docs/Integration.md index c09e562f..13b55fc2 100644 --- a/pe/docs/Integration.md +++ b/pe/docs/Integration.md @@ -17,7 +17,9 @@ A JSON value representing the integration. | **debugMode** | **Boolean** | Enable/disable debug. | [optional] | | **debugSettings** | **DebugSettings** | Debug settings object. | [optional] | | **enabled** | **Boolean** | Boolean flag to enable/disable the integration | [optional] | +| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | | **allowCreateDevicesOrAssets** | **Boolean** | Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet | [optional] | +| **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | | **version** | **Long** | | [optional] | | **defaultConverterId** | **ConverterId** | JSON object with the Uplink Converter Id | | | **downlinkConverterId** | **ConverterId** | JSON object with the Downlink Converter Id | [optional] | @@ -25,8 +27,6 @@ A JSON value representing the integration. | **secret** | **String** | String value used by the remote integrations. Remote integration uses this value along with the 'routingKey' for kind of security and validation to be able to connect to the platform using Grpc | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | JSON object representing integration configuration. Each integration type has specific configuration with the connectivity parameters (like 'host' and 'port' for MQTT type or 'baseUrl' for HTTP based type, etc.) and other important parameters dependent on the integration type | | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the integration | [optional] | -| **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | -| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | diff --git a/pe/docs/IntegrationInfo.md b/pe/docs/IntegrationInfo.md index a6e9964f..66c30459 100644 --- a/pe/docs/IntegrationInfo.md +++ b/pe/docs/IntegrationInfo.md @@ -15,12 +15,12 @@ | **debugMode** | **Boolean** | Enable/disable debug. | [optional] | | **debugSettings** | **DebugSettings** | Debug settings object. | [optional] | | **enabled** | **Boolean** | Boolean flag to enable/disable the integration | [optional] | +| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | | **allowCreateDevicesOrAssets** | **Boolean** | Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet | [optional] | +| **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | | **version** | **Long** | | [optional] | | **status** | **Object** | | [optional] | | **stats** | **Object** | | [optional] | -| **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | -| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | diff --git a/pe/docs/PdfReportTemplateConfig.md b/pe/docs/PdfReportTemplateConfig.md index 4d3ce266..54b11562 100644 --- a/pe/docs/PdfReportTemplateConfig.md +++ b/pe/docs/PdfReportTemplateConfig.md @@ -9,12 +9,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **pageSize** | **PageSize** | | [optional] | -| **pageOrientation** | **PageOrientation** | | [optional] | -| **pageMargins** | **Insets** | | [optional] | -| **pageBackground** | **String** | | [optional] | -| **header** | **HeaderFooter** | | [optional] | | **footer** | **HeaderFooter** | | [optional] | +| **header** | **HeaderFooter** | | [optional] | +| **pageBackground** | **String** | | [optional] | +| **pageMargins** | **Insets** | | [optional] | +| **pageOrientation** | **PageOrientation** | | [optional] | +| **pageSize** | **PageSize** | | [optional] | diff --git a/pe/docs/ReportTemplateConfig.md b/pe/docs/ReportTemplateConfig.md index 0c4cda14..8a5b8bdd 100644 --- a/pe/docs/ReportTemplateConfig.md +++ b/pe/docs/ReportTemplateConfig.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **format** | **TbReportFormat** | Report format | | -| **filters** | **List\** | | [optional] | | **namePattern** | **String** | | [optional] | -| **components** | **List\** | | [optional] | | **timeDataPattern** | **String** | | [optional] | +| **format** | **TbReportFormat** | Report format | | | **entityAliases** | **List\** | | [optional] | +| **filters** | **List\** | | [optional] | +| **components** | **List\** | | [optional] | diff --git a/pe/spec/openapi.json b/pe/spec/openapi.json index d7865bf1..838b7ebd 100644 --- a/pe/spec/openapi.json +++ b/pe/spec/openapi.json @@ -126970,10 +126970,18 @@ "type": "boolean", "description": "Boolean flag to enable/disable the integration" }, + "remote": { + "type": "boolean", + "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" + }, "allowCreateDevicesOrAssets": { "type": "boolean", "description": "Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet" }, + "edgeTemplate": { + "type": "boolean", + "description": "Boolean flag that specifies that is regular or edge template integration" + }, "version": { "type": "integer", "format": "int64" @@ -127003,14 +127011,6 @@ "additionalInfo": { "$ref": "#/components/schemas/JsonNode", "description": "Additional parameters of the integration" - }, - "edgeTemplate": { - "type": "boolean", - "description": "Boolean flag that specifies that is regular or edge template integration" - }, - "remote": { - "type": "boolean", - "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" } }, "required": [ @@ -127092,10 +127092,18 @@ "type": "boolean", "description": "Boolean flag to enable/disable the integration" }, + "remote": { + "type": "boolean", + "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" + }, "allowCreateDevicesOrAssets": { "type": "boolean", "description": "Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet" }, + "edgeTemplate": { + "type": "boolean", + "description": "Boolean flag that specifies that is regular or edge template integration" + }, "version": { "type": "integer", "format": "int64" @@ -127105,14 +127113,6 @@ }, "stats": { "$ref": "#/components/schemas/ArrayNode" - }, - "edgeTemplate": { - "type": "boolean", - "description": "Boolean flag that specifies that is regular or edge template integration" - }, - "remote": { - "type": "boolean", - "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" } }, "required": [ @@ -133307,23 +133307,23 @@ { "type": "object", "properties": { - "pageSize": { - "$ref": "#/components/schemas/PageSize" - }, - "pageOrientation": { - "$ref": "#/components/schemas/PageOrientation" + "footer": { + "$ref": "#/components/schemas/HeaderFooter" }, - "pageMargins": { - "$ref": "#/components/schemas/Insets" + "header": { + "$ref": "#/components/schemas/HeaderFooter" }, "pageBackground": { "type": "string" }, - "header": { - "$ref": "#/components/schemas/HeaderFooter" + "pageMargins": { + "$ref": "#/components/schemas/Insets" }, - "footer": { - "$ref": "#/components/schemas/HeaderFooter" + "pageOrientation": { + "$ref": "#/components/schemas/PageOrientation" + }, + "pageSize": { + "$ref": "#/components/schemas/PageSize" } } } @@ -134821,32 +134821,32 @@ } }, "properties": { + "namePattern": { + "type": "string" + }, + "timeDataPattern": { + "type": "string" + }, "format": { "$ref": "#/components/schemas/TbReportFormat", "description": "Report format" }, - "filters": { + "entityAliases": { "type": "array", "items": { - "$ref": "#/components/schemas/Filter" + "$ref": "#/components/schemas/EntityAlias" } }, - "namePattern": { - "type": "string" - }, - "components": { + "filters": { "type": "array", "items": { - "$ref": "#/components/schemas/ReportComponent" + "$ref": "#/components/schemas/Filter" } }, - "timeDataPattern": { - "type": "string" - }, - "entityAliases": { + "components": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityAlias" + "$ref": "#/components/schemas/ReportComponent" } } }, diff --git a/pe/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java b/pe/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java index a4477fc6..3731634b 100644 --- a/pe/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java @@ -59,38 +59,38 @@ public CsvReportTemplateConfig() { } @Override - public CsvReportTemplateConfig format(@javax.annotation.Nonnull TbReportFormat format) { - this.setFormat(format); + public CsvReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { + this.setNamePattern(namePattern); return this; } @Override - public CsvReportTemplateConfig filters(@javax.annotation.Nullable List filters) { - this.setFilters(filters); + public CsvReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String timeDataPattern) { + this.setTimeDataPattern(timeDataPattern); return this; } @Override - public CsvReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { - this.setNamePattern(namePattern); + public CsvReportTemplateConfig format(@javax.annotation.Nonnull TbReportFormat format) { + this.setFormat(format); return this; } @Override - public CsvReportTemplateConfig components(@javax.annotation.Nullable List components) { - this.setComponents(components); + public CsvReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { + this.setEntityAliases(entityAliases); return this; } @Override - public CsvReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String timeDataPattern) { - this.setTimeDataPattern(timeDataPattern); + public CsvReportTemplateConfig filters(@javax.annotation.Nullable List filters) { + this.setFilters(filters); return this; } @Override - public CsvReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { - this.setEntityAliases(entityAliases); + public CsvReportTemplateConfig components(@javax.annotation.Nullable List components) { + this.setComponents(components); return this; } @@ -165,11 +165,31 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); + // add `namePattern` to the URL query string + if (getNamePattern() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); + } + + // add `timeDataPattern` to the URL query string + if (getTimeDataPattern() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); + } + // add `format` to the URL query string if (getFormat() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sformat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFormat())))); } + // add `entityAliases` to the URL query string + if (getEntityAliases() != null) { + for (int i = 0; i < getEntityAliases().size(); i++) { + if (getEntityAliases().get(i) != null) { + joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + // add `filters` to the URL query string if (getFilters() != null) { for (int i = 0; i < getFilters().size(); i++) { @@ -180,11 +200,6 @@ public String toUrlQueryString(String prefix) { } } - // add `namePattern` to the URL query string - if (getNamePattern() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); - } - // add `components` to the URL query string if (getComponents() != null) { for (int i = 0; i < getComponents().size(); i++) { @@ -195,21 +210,6 @@ public String toUrlQueryString(String prefix) { } } - // add `timeDataPattern` to the URL query string - if (getTimeDataPattern() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); - } - - // add `entityAliases` to the URL query string - if (getEntityAliases() != null) { - for (int i = 0; i < getEntityAliases().size(); i++) { - if (getEntityAliases().get(i) != null) { - joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/Integration.java b/pe/src/main/java/org/thingsboard/client/model/Integration.java index 5ea643ca..f96f37e5 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Integration.java +++ b/pe/src/main/java/org/thingsboard/client/model/Integration.java @@ -48,16 +48,16 @@ Integration.JSON_PROPERTY_DEBUG_MODE, Integration.JSON_PROPERTY_DEBUG_SETTINGS, Integration.JSON_PROPERTY_ENABLED, + Integration.JSON_PROPERTY_REMOTE, Integration.JSON_PROPERTY_ALLOW_CREATE_DEVICES_OR_ASSETS, + Integration.JSON_PROPERTY_EDGE_TEMPLATE, Integration.JSON_PROPERTY_VERSION, Integration.JSON_PROPERTY_DEFAULT_CONVERTER_ID, Integration.JSON_PROPERTY_DOWNLINK_CONVERTER_ID, Integration.JSON_PROPERTY_ROUTING_KEY, Integration.JSON_PROPERTY_SECRET, Integration.JSON_PROPERTY_CONFIGURATION, - Integration.JSON_PROPERTY_ADDITIONAL_INFO, - Integration.JSON_PROPERTY_EDGE_TEMPLATE, - Integration.JSON_PROPERTY_REMOTE + Integration.JSON_PROPERTY_ADDITIONAL_INFO }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class Integration { @@ -93,10 +93,18 @@ public class Integration { @javax.annotation.Nullable private Boolean enabled; + public static final String JSON_PROPERTY_REMOTE = "remote"; + @javax.annotation.Nullable + private Boolean remote; + public static final String JSON_PROPERTY_ALLOW_CREATE_DEVICES_OR_ASSETS = "allowCreateDevicesOrAssets"; @javax.annotation.Nullable private Boolean allowCreateDevicesOrAssets; + public static final String JSON_PROPERTY_EDGE_TEMPLATE = "edgeTemplate"; + @javax.annotation.Nullable + private Boolean edgeTemplate; + public static final String JSON_PROPERTY_VERSION = "version"; @javax.annotation.Nullable private Long version; @@ -125,14 +133,6 @@ public class Integration { @javax.annotation.Nullable private com.fasterxml.jackson.databind.JsonNode additionalInfo; - public static final String JSON_PROPERTY_EDGE_TEMPLATE = "edgeTemplate"; - @javax.annotation.Nullable - private Boolean edgeTemplate; - - public static final String JSON_PROPERTY_REMOTE = "remote"; - @javax.annotation.Nullable - private Boolean remote; - public Integration() { } @@ -320,6 +320,30 @@ public void setEnabled(@javax.annotation.Nullable Boolean enabled) { } + public Integration remote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; + return this; + } + + /** + * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core + * @return remote + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRemote() { + return remote; + } + + + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRemote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; + } + + public Integration allowCreateDevicesOrAssets(@javax.annotation.Nullable Boolean allowCreateDevicesOrAssets) { this.allowCreateDevicesOrAssets = allowCreateDevicesOrAssets; return this; @@ -344,6 +368,30 @@ public void setAllowCreateDevicesOrAssets(@javax.annotation.Nullable Boolean all } + public Integration edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; + return this; + } + + /** + * Boolean flag that specifies that is regular or edge template integration + * @return edgeTemplate + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEdgeTemplate() { + return edgeTemplate; + } + + + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; + } + + public Integration version(@javax.annotation.Nullable Long version) { this.version = version; return this; @@ -512,54 +560,6 @@ public void setAdditionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.d } - public Integration edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; - return this; - } - - /** - * Boolean flag that specifies that is regular or edge template integration - * @return edgeTemplate - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEdgeTemplate() { - return edgeTemplate; - } - - - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; - } - - - public Integration remote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; - return this; - } - - /** - * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core - * @return remote - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRemote() { - return remote; - } - - - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRemote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; - } - - /** * Return true if this Integration object is equal to o. */ @@ -580,21 +580,21 @@ public boolean equals(Object o) { Objects.equals(this.debugMode, integration.debugMode) && Objects.equals(this.debugSettings, integration.debugSettings) && Objects.equals(this.enabled, integration.enabled) && + Objects.equals(this.remote, integration.remote) && Objects.equals(this.allowCreateDevicesOrAssets, integration.allowCreateDevicesOrAssets) && + Objects.equals(this.edgeTemplate, integration.edgeTemplate) && Objects.equals(this.version, integration.version) && Objects.equals(this.defaultConverterId, integration.defaultConverterId) && Objects.equals(this.downlinkConverterId, integration.downlinkConverterId) && Objects.equals(this.routingKey, integration.routingKey) && Objects.equals(this.secret, integration.secret) && Objects.equals(this._configuration, integration._configuration) && - Objects.equals(this.additionalInfo, integration.additionalInfo) && - Objects.equals(this.edgeTemplate, integration.edgeTemplate) && - Objects.equals(this.remote, integration.remote); + Objects.equals(this.additionalInfo, integration.additionalInfo); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, allowCreateDevicesOrAssets, version, defaultConverterId, downlinkConverterId, routingKey, secret, _configuration, additionalInfo, edgeTemplate, remote); + return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, remote, allowCreateDevicesOrAssets, edgeTemplate, version, defaultConverterId, downlinkConverterId, routingKey, secret, _configuration, additionalInfo); } @Override @@ -609,7 +609,9 @@ public String toString() { sb.append(" debugMode: ").append(toIndentedString(debugMode)).append("\n"); sb.append(" debugSettings: ").append(toIndentedString(debugSettings)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append(" allowCreateDevicesOrAssets: ").append(toIndentedString(allowCreateDevicesOrAssets)).append("\n"); + sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" defaultConverterId: ").append(toIndentedString(defaultConverterId)).append("\n"); sb.append(" downlinkConverterId: ").append(toIndentedString(downlinkConverterId)).append("\n"); @@ -617,8 +619,6 @@ public String toString() { sb.append(" secret: ").append(toIndentedString(secret)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); - sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); - sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append("}"); return sb.toString(); } @@ -706,11 +706,21 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); } + // add `remote` to the URL query string + if (getRemote() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); + } + // add `allowCreateDevicesOrAssets` to the URL query string if (getAllowCreateDevicesOrAssets() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sallowCreateDevicesOrAssets%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAllowCreateDevicesOrAssets())))); } + // add `edgeTemplate` to the URL query string + if (getEdgeTemplate() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sedgeTemplate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEdgeTemplate())))); + } + // add `version` to the URL query string if (getVersion() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); @@ -746,16 +756,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sadditionalInfo%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInfo())))); } - // add `edgeTemplate` to the URL query string - if (getEdgeTemplate() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sedgeTemplate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEdgeTemplate())))); - } - - // add `remote` to the URL query string - if (getRemote() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); - } - return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/IntegrationInfo.java b/pe/src/main/java/org/thingsboard/client/model/IntegrationInfo.java index 7f818e83..b87f06ee 100644 --- a/pe/src/main/java/org/thingsboard/client/model/IntegrationInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/IntegrationInfo.java @@ -51,12 +51,12 @@ IntegrationInfo.JSON_PROPERTY_DEBUG_MODE, IntegrationInfo.JSON_PROPERTY_DEBUG_SETTINGS, IntegrationInfo.JSON_PROPERTY_ENABLED, + IntegrationInfo.JSON_PROPERTY_REMOTE, IntegrationInfo.JSON_PROPERTY_ALLOW_CREATE_DEVICES_OR_ASSETS, + IntegrationInfo.JSON_PROPERTY_EDGE_TEMPLATE, IntegrationInfo.JSON_PROPERTY_VERSION, IntegrationInfo.JSON_PROPERTY_STATUS, - IntegrationInfo.JSON_PROPERTY_STATS, - IntegrationInfo.JSON_PROPERTY_EDGE_TEMPLATE, - IntegrationInfo.JSON_PROPERTY_REMOTE + IntegrationInfo.JSON_PROPERTY_STATS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class IntegrationInfo { @@ -92,10 +92,18 @@ public class IntegrationInfo { @javax.annotation.Nullable private Boolean enabled; + public static final String JSON_PROPERTY_REMOTE = "remote"; + @javax.annotation.Nullable + private Boolean remote; + public static final String JSON_PROPERTY_ALLOW_CREATE_DEVICES_OR_ASSETS = "allowCreateDevicesOrAssets"; @javax.annotation.Nullable private Boolean allowCreateDevicesOrAssets; + public static final String JSON_PROPERTY_EDGE_TEMPLATE = "edgeTemplate"; + @javax.annotation.Nullable + private Boolean edgeTemplate; + public static final String JSON_PROPERTY_VERSION = "version"; @javax.annotation.Nullable private Long version; @@ -107,14 +115,6 @@ public class IntegrationInfo { public static final String JSON_PROPERTY_STATS = "stats"; private JsonNullable stats = JsonNullable.of(null); - public static final String JSON_PROPERTY_EDGE_TEMPLATE = "edgeTemplate"; - @javax.annotation.Nullable - private Boolean edgeTemplate; - - public static final String JSON_PROPERTY_REMOTE = "remote"; - @javax.annotation.Nullable - private Boolean remote; - public IntegrationInfo() { } @@ -302,6 +302,30 @@ public void setEnabled(@javax.annotation.Nullable Boolean enabled) { } + public IntegrationInfo remote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; + return this; + } + + /** + * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core + * @return remote + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRemote() { + return remote; + } + + + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRemote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; + } + + public IntegrationInfo allowCreateDevicesOrAssets(@javax.annotation.Nullable Boolean allowCreateDevicesOrAssets) { this.allowCreateDevicesOrAssets = allowCreateDevicesOrAssets; return this; @@ -326,6 +350,30 @@ public void setAllowCreateDevicesOrAssets(@javax.annotation.Nullable Boolean all } + public IntegrationInfo edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; + return this; + } + + /** + * Boolean flag that specifies that is regular or edge template integration + * @return edgeTemplate + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEdgeTemplate() { + return edgeTemplate; + } + + + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; + } + + public IntegrationInfo version(@javax.annotation.Nullable Long version) { this.version = version; return this; @@ -406,54 +454,6 @@ public void setStats(@javax.annotation.Nullable Object stats) { } - public IntegrationInfo edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; - return this; - } - - /** - * Boolean flag that specifies that is regular or edge template integration - * @return edgeTemplate - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEdgeTemplate() { - return edgeTemplate; - } - - - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; - } - - - public IntegrationInfo remote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; - return this; - } - - /** - * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core - * @return remote - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRemote() { - return remote; - } - - - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRemote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; - } - - /** * Return true if this IntegrationInfo object is equal to o. */ @@ -474,12 +474,12 @@ public boolean equals(Object o) { Objects.equals(this.debugMode, integrationInfo.debugMode) && Objects.equals(this.debugSettings, integrationInfo.debugSettings) && Objects.equals(this.enabled, integrationInfo.enabled) && + Objects.equals(this.remote, integrationInfo.remote) && Objects.equals(this.allowCreateDevicesOrAssets, integrationInfo.allowCreateDevicesOrAssets) && + Objects.equals(this.edgeTemplate, integrationInfo.edgeTemplate) && Objects.equals(this.version, integrationInfo.version) && Objects.equals(this.status, integrationInfo.status) && - equalsNullable(this.stats, integrationInfo.stats) && - Objects.equals(this.edgeTemplate, integrationInfo.edgeTemplate) && - Objects.equals(this.remote, integrationInfo.remote); + equalsNullable(this.stats, integrationInfo.stats); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -488,7 +488,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, allowCreateDevicesOrAssets, version, status, hashCodeNullable(stats), edgeTemplate, remote); + return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, remote, allowCreateDevicesOrAssets, edgeTemplate, version, status, hashCodeNullable(stats)); } private static int hashCodeNullable(JsonNullable a) { @@ -510,12 +510,12 @@ public String toString() { sb.append(" debugMode: ").append(toIndentedString(debugMode)).append("\n"); sb.append(" debugSettings: ").append(toIndentedString(debugSettings)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append(" allowCreateDevicesOrAssets: ").append(toIndentedString(allowCreateDevicesOrAssets)).append("\n"); + sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" stats: ").append(toIndentedString(stats)).append("\n"); - sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); - sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append("}"); return sb.toString(); } @@ -603,11 +603,21 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); } + // add `remote` to the URL query string + if (getRemote() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); + } + // add `allowCreateDevicesOrAssets` to the URL query string if (getAllowCreateDevicesOrAssets() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sallowCreateDevicesOrAssets%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAllowCreateDevicesOrAssets())))); } + // add `edgeTemplate` to the URL query string + if (getEdgeTemplate() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sedgeTemplate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEdgeTemplate())))); + } + // add `version` to the URL query string if (getVersion() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); @@ -623,16 +633,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstats%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStats())))); } - // add `edgeTemplate` to the URL query string - if (getEdgeTemplate() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sedgeTemplate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEdgeTemplate())))); - } - - // add `remote` to the URL query string - if (getRemote() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); - } - return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java b/pe/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java index 11df6388..8b5f2140 100644 --- a/pe/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java @@ -50,12 +50,12 @@ * PdfReportTemplateConfig */ @JsonPropertyOrder({ - PdfReportTemplateConfig.JSON_PROPERTY_PAGE_SIZE, - PdfReportTemplateConfig.JSON_PROPERTY_PAGE_ORIENTATION, - PdfReportTemplateConfig.JSON_PROPERTY_PAGE_MARGINS, - PdfReportTemplateConfig.JSON_PROPERTY_PAGE_BACKGROUND, + PdfReportTemplateConfig.JSON_PROPERTY_FOOTER, PdfReportTemplateConfig.JSON_PROPERTY_HEADER, - PdfReportTemplateConfig.JSON_PROPERTY_FOOTER + PdfReportTemplateConfig.JSON_PROPERTY_PAGE_BACKGROUND, + PdfReportTemplateConfig.JSON_PROPERTY_PAGE_MARGINS, + PdfReportTemplateConfig.JSON_PROPERTY_PAGE_ORIENTATION, + PdfReportTemplateConfig.JSON_PROPERTY_PAGE_SIZE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -65,210 +65,210 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "format", visible = true) public class PdfReportTemplateConfig extends ReportTemplateConfig { - public static final String JSON_PROPERTY_PAGE_SIZE = "pageSize"; - @javax.annotation.Nullable - private PageSize pageSize; - - public static final String JSON_PROPERTY_PAGE_ORIENTATION = "pageOrientation"; + public static final String JSON_PROPERTY_FOOTER = "footer"; @javax.annotation.Nullable - private PageOrientation pageOrientation; + private HeaderFooter footer; - public static final String JSON_PROPERTY_PAGE_MARGINS = "pageMargins"; + public static final String JSON_PROPERTY_HEADER = "header"; @javax.annotation.Nullable - private Insets pageMargins; + private HeaderFooter header; public static final String JSON_PROPERTY_PAGE_BACKGROUND = "pageBackground"; @javax.annotation.Nullable private String pageBackground; - public static final String JSON_PROPERTY_HEADER = "header"; + public static final String JSON_PROPERTY_PAGE_MARGINS = "pageMargins"; @javax.annotation.Nullable - private HeaderFooter header; + private Insets pageMargins; - public static final String JSON_PROPERTY_FOOTER = "footer"; + public static final String JSON_PROPERTY_PAGE_ORIENTATION = "pageOrientation"; @javax.annotation.Nullable - private HeaderFooter footer; + private PageOrientation pageOrientation; + + public static final String JSON_PROPERTY_PAGE_SIZE = "pageSize"; + @javax.annotation.Nullable + private PageSize pageSize; public PdfReportTemplateConfig() { } - public PdfReportTemplateConfig pageSize(@javax.annotation.Nullable PageSize pageSize) { - this.pageSize = pageSize; + public PdfReportTemplateConfig footer(@javax.annotation.Nullable HeaderFooter footer) { + this.footer = footer; return this; } /** - * Get pageSize - * @return pageSize + * Get footer + * @return footer */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PAGE_SIZE, required = false) + @JsonProperty(value = JSON_PROPERTY_FOOTER, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public PageSize getPageSize() { - return pageSize; + public HeaderFooter getFooter() { + return footer; } - @JsonProperty(value = JSON_PROPERTY_PAGE_SIZE, required = false) + @JsonProperty(value = JSON_PROPERTY_FOOTER, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageSize(@javax.annotation.Nullable PageSize pageSize) { - this.pageSize = pageSize; + public void setFooter(@javax.annotation.Nullable HeaderFooter footer) { + this.footer = footer; } - public PdfReportTemplateConfig pageOrientation(@javax.annotation.Nullable PageOrientation pageOrientation) { - this.pageOrientation = pageOrientation; + public PdfReportTemplateConfig header(@javax.annotation.Nullable HeaderFooter header) { + this.header = header; return this; } /** - * Get pageOrientation - * @return pageOrientation + * Get header + * @return header */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PAGE_ORIENTATION, required = false) + @JsonProperty(value = JSON_PROPERTY_HEADER, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public PageOrientation getPageOrientation() { - return pageOrientation; + public HeaderFooter getHeader() { + return header; } - @JsonProperty(value = JSON_PROPERTY_PAGE_ORIENTATION, required = false) + @JsonProperty(value = JSON_PROPERTY_HEADER, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageOrientation(@javax.annotation.Nullable PageOrientation pageOrientation) { - this.pageOrientation = pageOrientation; + public void setHeader(@javax.annotation.Nullable HeaderFooter header) { + this.header = header; } - public PdfReportTemplateConfig pageMargins(@javax.annotation.Nullable Insets pageMargins) { - this.pageMargins = pageMargins; + public PdfReportTemplateConfig pageBackground(@javax.annotation.Nullable String pageBackground) { + this.pageBackground = pageBackground; return this; } /** - * Get pageMargins - * @return pageMargins + * Get pageBackground + * @return pageBackground */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PAGE_MARGINS, required = false) + @JsonProperty(value = JSON_PROPERTY_PAGE_BACKGROUND, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Insets getPageMargins() { - return pageMargins; + public String getPageBackground() { + return pageBackground; } - @JsonProperty(value = JSON_PROPERTY_PAGE_MARGINS, required = false) + @JsonProperty(value = JSON_PROPERTY_PAGE_BACKGROUND, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageMargins(@javax.annotation.Nullable Insets pageMargins) { - this.pageMargins = pageMargins; + public void setPageBackground(@javax.annotation.Nullable String pageBackground) { + this.pageBackground = pageBackground; } - public PdfReportTemplateConfig pageBackground(@javax.annotation.Nullable String pageBackground) { - this.pageBackground = pageBackground; + public PdfReportTemplateConfig pageMargins(@javax.annotation.Nullable Insets pageMargins) { + this.pageMargins = pageMargins; return this; } /** - * Get pageBackground - * @return pageBackground + * Get pageMargins + * @return pageMargins */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PAGE_BACKGROUND, required = false) + @JsonProperty(value = JSON_PROPERTY_PAGE_MARGINS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPageBackground() { - return pageBackground; + public Insets getPageMargins() { + return pageMargins; } - @JsonProperty(value = JSON_PROPERTY_PAGE_BACKGROUND, required = false) + @JsonProperty(value = JSON_PROPERTY_PAGE_MARGINS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageBackground(@javax.annotation.Nullable String pageBackground) { - this.pageBackground = pageBackground; + public void setPageMargins(@javax.annotation.Nullable Insets pageMargins) { + this.pageMargins = pageMargins; } - public PdfReportTemplateConfig header(@javax.annotation.Nullable HeaderFooter header) { - this.header = header; + public PdfReportTemplateConfig pageOrientation(@javax.annotation.Nullable PageOrientation pageOrientation) { + this.pageOrientation = pageOrientation; return this; } /** - * Get header - * @return header + * Get pageOrientation + * @return pageOrientation */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_HEADER, required = false) + @JsonProperty(value = JSON_PROPERTY_PAGE_ORIENTATION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HeaderFooter getHeader() { - return header; + public PageOrientation getPageOrientation() { + return pageOrientation; } - @JsonProperty(value = JSON_PROPERTY_HEADER, required = false) + @JsonProperty(value = JSON_PROPERTY_PAGE_ORIENTATION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeader(@javax.annotation.Nullable HeaderFooter header) { - this.header = header; + public void setPageOrientation(@javax.annotation.Nullable PageOrientation pageOrientation) { + this.pageOrientation = pageOrientation; } - public PdfReportTemplateConfig footer(@javax.annotation.Nullable HeaderFooter footer) { - this.footer = footer; + public PdfReportTemplateConfig pageSize(@javax.annotation.Nullable PageSize pageSize) { + this.pageSize = pageSize; return this; } /** - * Get footer - * @return footer + * Get pageSize + * @return pageSize */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_FOOTER, required = false) + @JsonProperty(value = JSON_PROPERTY_PAGE_SIZE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HeaderFooter getFooter() { - return footer; + public PageSize getPageSize() { + return pageSize; } - @JsonProperty(value = JSON_PROPERTY_FOOTER, required = false) + @JsonProperty(value = JSON_PROPERTY_PAGE_SIZE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFooter(@javax.annotation.Nullable HeaderFooter footer) { - this.footer = footer; + public void setPageSize(@javax.annotation.Nullable PageSize pageSize) { + this.pageSize = pageSize; } @Override - public PdfReportTemplateConfig format(@javax.annotation.Nonnull TbReportFormat format) { - this.setFormat(format); + public PdfReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { + this.setNamePattern(namePattern); return this; } @Override - public PdfReportTemplateConfig filters(@javax.annotation.Nullable List filters) { - this.setFilters(filters); + public PdfReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String timeDataPattern) { + this.setTimeDataPattern(timeDataPattern); return this; } @Override - public PdfReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { - this.setNamePattern(namePattern); + public PdfReportTemplateConfig format(@javax.annotation.Nonnull TbReportFormat format) { + this.setFormat(format); return this; } @Override - public PdfReportTemplateConfig components(@javax.annotation.Nullable List components) { - this.setComponents(components); + public PdfReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { + this.setEntityAliases(entityAliases); return this; } @Override - public PdfReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String timeDataPattern) { - this.setTimeDataPattern(timeDataPattern); + public PdfReportTemplateConfig filters(@javax.annotation.Nullable List filters) { + this.setFilters(filters); return this; } @Override - public PdfReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { - this.setEntityAliases(entityAliases); + public PdfReportTemplateConfig components(@javax.annotation.Nullable List components) { + this.setComponents(components); return this; } @@ -284,18 +284,18 @@ public boolean equals(Object o) { return false; } PdfReportTemplateConfig pdfReportTemplateConfig = (PdfReportTemplateConfig) o; - return Objects.equals(this.pageSize, pdfReportTemplateConfig.pageSize) && - Objects.equals(this.pageOrientation, pdfReportTemplateConfig.pageOrientation) && - Objects.equals(this.pageMargins, pdfReportTemplateConfig.pageMargins) && - Objects.equals(this.pageBackground, pdfReportTemplateConfig.pageBackground) && + return Objects.equals(this.footer, pdfReportTemplateConfig.footer) && Objects.equals(this.header, pdfReportTemplateConfig.header) && - Objects.equals(this.footer, pdfReportTemplateConfig.footer) && + Objects.equals(this.pageBackground, pdfReportTemplateConfig.pageBackground) && + Objects.equals(this.pageMargins, pdfReportTemplateConfig.pageMargins) && + Objects.equals(this.pageOrientation, pdfReportTemplateConfig.pageOrientation) && + Objects.equals(this.pageSize, pdfReportTemplateConfig.pageSize) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(pageSize, pageOrientation, pageMargins, pageBackground, header, footer, super.hashCode()); + return Objects.hash(footer, header, pageBackground, pageMargins, pageOrientation, pageSize, super.hashCode()); } @Override @@ -303,12 +303,12 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PdfReportTemplateConfig {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); - sb.append(" pageOrientation: ").append(toIndentedString(pageOrientation)).append("\n"); - sb.append(" pageMargins: ").append(toIndentedString(pageMargins)).append("\n"); - sb.append(" pageBackground: ").append(toIndentedString(pageBackground)).append("\n"); - sb.append(" header: ").append(toIndentedString(header)).append("\n"); sb.append(" footer: ").append(toIndentedString(footer)).append("\n"); + sb.append(" header: ").append(toIndentedString(header)).append("\n"); + sb.append(" pageBackground: ").append(toIndentedString(pageBackground)).append("\n"); + sb.append(" pageMargins: ").append(toIndentedString(pageMargins)).append("\n"); + sb.append(" pageOrientation: ").append(toIndentedString(pageOrientation)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); sb.append("}"); return sb.toString(); } @@ -356,11 +356,31 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); + // add `namePattern` to the URL query string + if (getNamePattern() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); + } + + // add `timeDataPattern` to the URL query string + if (getTimeDataPattern() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); + } + // add `format` to the URL query string if (getFormat() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sformat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFormat())))); } + // add `entityAliases` to the URL query string + if (getEntityAliases() != null) { + for (int i = 0; i < getEntityAliases().size(); i++) { + if (getEntityAliases().get(i) != null) { + joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + // add `filters` to the URL query string if (getFilters() != null) { for (int i = 0; i < getFilters().size(); i++) { @@ -371,11 +391,6 @@ public String toUrlQueryString(String prefix) { } } - // add `namePattern` to the URL query string - if (getNamePattern() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); - } - // add `components` to the URL query string if (getComponents() != null) { for (int i = 0; i < getComponents().size(); i++) { @@ -386,29 +401,19 @@ public String toUrlQueryString(String prefix) { } } - // add `timeDataPattern` to the URL query string - if (getTimeDataPattern() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); - } - - // add `entityAliases` to the URL query string - if (getEntityAliases() != null) { - for (int i = 0; i < getEntityAliases().size(); i++) { - if (getEntityAliases().get(i) != null) { - joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } + // add `footer` to the URL query string + if (getFooter() != null) { + joiner.add(getFooter().toUrlQueryString(prefix + "footer" + suffix)); } - // add `pageSize` to the URL query string - if (getPageSize() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%spageSize%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageSize())))); + // add `header` to the URL query string + if (getHeader() != null) { + joiner.add(getHeader().toUrlQueryString(prefix + "header" + suffix)); } - // add `pageOrientation` to the URL query string - if (getPageOrientation() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%spageOrientation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageOrientation())))); + // add `pageBackground` to the URL query string + if (getPageBackground() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%spageBackground%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageBackground())))); } // add `pageMargins` to the URL query string @@ -416,19 +421,14 @@ public String toUrlQueryString(String prefix) { joiner.add(getPageMargins().toUrlQueryString(prefix + "pageMargins" + suffix)); } - // add `pageBackground` to the URL query string - if (getPageBackground() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%spageBackground%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageBackground())))); - } - - // add `header` to the URL query string - if (getHeader() != null) { - joiner.add(getHeader().toUrlQueryString(prefix + "header" + suffix)); + // add `pageOrientation` to the URL query string + if (getPageOrientation() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%spageOrientation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageOrientation())))); } - // add `footer` to the URL query string - if (getFooter() != null) { - joiner.add(getFooter().toUrlQueryString(prefix + "footer" + suffix)); + // add `pageSize` to the URL query string + if (getPageSize() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%spageSize%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageSize())))); } return joiner.toString(); diff --git a/pe/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java b/pe/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java index 4a60a202..992c2ff7 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java @@ -45,12 +45,12 @@ * ReportTemplateConfig */ @JsonPropertyOrder({ - ReportTemplateConfig.JSON_PROPERTY_FORMAT, - ReportTemplateConfig.JSON_PROPERTY_FILTERS, ReportTemplateConfig.JSON_PROPERTY_NAME_PATTERN, - ReportTemplateConfig.JSON_PROPERTY_COMPONENTS, ReportTemplateConfig.JSON_PROPERTY_TIME_DATA_PATTERN, - ReportTemplateConfig.JSON_PROPERTY_ENTITY_ALIASES + ReportTemplateConfig.JSON_PROPERTY_FORMAT, + ReportTemplateConfig.JSON_PROPERTY_ENTITY_ALIASES, + ReportTemplateConfig.JSON_PROPERTY_FILTERS, + ReportTemplateConfig.JSON_PROPERTY_COMPONENTS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -64,33 +64,81 @@ }) public class ReportTemplateConfig { + public static final String JSON_PROPERTY_NAME_PATTERN = "namePattern"; + @javax.annotation.Nullable + private String namePattern; + + public static final String JSON_PROPERTY_TIME_DATA_PATTERN = "timeDataPattern"; + @javax.annotation.Nullable + private String timeDataPattern; + public static final String JSON_PROPERTY_FORMAT = "format"; @javax.annotation.Nonnull private TbReportFormat format; - public static final String JSON_PROPERTY_FILTERS = "filters"; + public static final String JSON_PROPERTY_ENTITY_ALIASES = "entityAliases"; @javax.annotation.Nullable - private List filters = new ArrayList<>(); + private List entityAliases = new ArrayList<>(); - public static final String JSON_PROPERTY_NAME_PATTERN = "namePattern"; + public static final String JSON_PROPERTY_FILTERS = "filters"; @javax.annotation.Nullable - private String namePattern; + private List filters = new ArrayList<>(); public static final String JSON_PROPERTY_COMPONENTS = "components"; @javax.annotation.Nullable private List components = new ArrayList<>(); - public static final String JSON_PROPERTY_TIME_DATA_PATTERN = "timeDataPattern"; + public ReportTemplateConfig() { + } + + public ReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * Get namePattern + * @return namePattern + */ @javax.annotation.Nullable - private String timeDataPattern; + @JsonProperty(value = JSON_PROPERTY_NAME_PATTERN, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNamePattern() { + return namePattern; + } - public static final String JSON_PROPERTY_ENTITY_ALIASES = "entityAliases"; + + @JsonProperty(value = JSON_PROPERTY_NAME_PATTERN, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + + public ReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String timeDataPattern) { + this.timeDataPattern = timeDataPattern; + return this; + } + + /** + * Get timeDataPattern + * @return timeDataPattern + */ @javax.annotation.Nullable - private List entityAliases = new ArrayList<>(); + @JsonProperty(value = JSON_PROPERTY_TIME_DATA_PATTERN, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTimeDataPattern() { + return timeDataPattern; + } - public ReportTemplateConfig() { + + @JsonProperty(value = JSON_PROPERTY_TIME_DATA_PATTERN, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTimeDataPattern(@javax.annotation.Nullable String timeDataPattern) { + this.timeDataPattern = timeDataPattern; } + public ReportTemplateConfig format(@javax.annotation.Nonnull TbReportFormat format) { this.format = format; return this; @@ -115,59 +163,67 @@ public void setFormat(@javax.annotation.Nonnull TbReportFormat format) { } - public ReportTemplateConfig filters(@javax.annotation.Nullable List filters) { - this.filters = filters; + public ReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { + this.entityAliases = entityAliases; return this; } - public ReportTemplateConfig addFiltersItem(Filter filtersItem) { - if (this.filters == null) { - this.filters = new ArrayList<>(); + public ReportTemplateConfig addEntityAliasesItem(EntityAlias entityAliasesItem) { + if (this.entityAliases == null) { + this.entityAliases = new ArrayList<>(); } - this.filters.add(filtersItem); + this.entityAliases.add(entityAliasesItem); return this; } /** - * Get filters - * @return filters + * Get entityAliases + * @return entityAliases */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_FILTERS, required = false) + @JsonProperty(value = JSON_PROPERTY_ENTITY_ALIASES, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFilters() { - return filters; + public List getEntityAliases() { + return entityAliases; } - @JsonProperty(value = JSON_PROPERTY_FILTERS, required = false) + @JsonProperty(value = JSON_PROPERTY_ENTITY_ALIASES, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFilters(@javax.annotation.Nullable List filters) { - this.filters = filters; + public void setEntityAliases(@javax.annotation.Nullable List entityAliases) { + this.entityAliases = entityAliases; } - public ReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; + public ReportTemplateConfig filters(@javax.annotation.Nullable List filters) { + this.filters = filters; + return this; + } + + public ReportTemplateConfig addFiltersItem(Filter filtersItem) { + if (this.filters == null) { + this.filters = new ArrayList<>(); + } + this.filters.add(filtersItem); return this; } /** - * Get namePattern - * @return namePattern + * Get filters + * @return filters */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_NAME_PATTERN, required = false) + @JsonProperty(value = JSON_PROPERTY_FILTERS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNamePattern() { - return namePattern; + public List getFilters() { + return filters; } - @JsonProperty(value = JSON_PROPERTY_NAME_PATTERN, required = false) + @JsonProperty(value = JSON_PROPERTY_FILTERS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; + public void setFilters(@javax.annotation.Nullable List filters) { + this.filters = filters; } @@ -203,62 +259,6 @@ public void setComponents(@javax.annotation.Nullable List compo } - public ReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String timeDataPattern) { - this.timeDataPattern = timeDataPattern; - return this; - } - - /** - * Get timeDataPattern - * @return timeDataPattern - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TIME_DATA_PATTERN, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimeDataPattern() { - return timeDataPattern; - } - - - @JsonProperty(value = JSON_PROPERTY_TIME_DATA_PATTERN, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTimeDataPattern(@javax.annotation.Nullable String timeDataPattern) { - this.timeDataPattern = timeDataPattern; - } - - - public ReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { - this.entityAliases = entityAliases; - return this; - } - - public ReportTemplateConfig addEntityAliasesItem(EntityAlias entityAliasesItem) { - if (this.entityAliases == null) { - this.entityAliases = new ArrayList<>(); - } - this.entityAliases.add(entityAliasesItem); - return this; - } - - /** - * Get entityAliases - * @return entityAliases - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ENTITY_ALIASES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getEntityAliases() { - return entityAliases; - } - - - @JsonProperty(value = JSON_PROPERTY_ENTITY_ALIASES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEntityAliases(@javax.annotation.Nullable List entityAliases) { - this.entityAliases = entityAliases; - } - - /** * Return true if this ReportTemplateConfig object is equal to o. */ @@ -271,29 +271,29 @@ public boolean equals(Object o) { return false; } ReportTemplateConfig reportTemplateConfig = (ReportTemplateConfig) o; - return Objects.equals(this.format, reportTemplateConfig.format) && - Objects.equals(this.filters, reportTemplateConfig.filters) && - Objects.equals(this.namePattern, reportTemplateConfig.namePattern) && - Objects.equals(this.components, reportTemplateConfig.components) && + return Objects.equals(this.namePattern, reportTemplateConfig.namePattern) && Objects.equals(this.timeDataPattern, reportTemplateConfig.timeDataPattern) && - Objects.equals(this.entityAliases, reportTemplateConfig.entityAliases); + Objects.equals(this.format, reportTemplateConfig.format) && + Objects.equals(this.entityAliases, reportTemplateConfig.entityAliases) && + Objects.equals(this.filters, reportTemplateConfig.filters) && + Objects.equals(this.components, reportTemplateConfig.components); } @Override public int hashCode() { - return Objects.hash(format, filters, namePattern, components, timeDataPattern, entityAliases); + return Objects.hash(namePattern, timeDataPattern, format, entityAliases, filters, components); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReportTemplateConfig {\n"); - sb.append(" format: ").append(toIndentedString(format)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); - sb.append(" components: ").append(toIndentedString(components)).append("\n"); sb.append(" timeDataPattern: ").append(toIndentedString(timeDataPattern)).append("\n"); + sb.append(" format: ").append(toIndentedString(format)).append("\n"); sb.append(" entityAliases: ").append(toIndentedString(entityAliases)).append("\n"); + sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); + sb.append(" components: ").append(toIndentedString(components)).append("\n"); sb.append("}"); return sb.toString(); } @@ -341,11 +341,31 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); + // add `namePattern` to the URL query string + if (getNamePattern() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); + } + + // add `timeDataPattern` to the URL query string + if (getTimeDataPattern() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); + } + // add `format` to the URL query string if (getFormat() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sformat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFormat())))); } + // add `entityAliases` to the URL query string + if (getEntityAliases() != null) { + for (int i = 0; i < getEntityAliases().size(); i++) { + if (getEntityAliases().get(i) != null) { + joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + // add `filters` to the URL query string if (getFilters() != null) { for (int i = 0; i < getFilters().size(); i++) { @@ -356,11 +376,6 @@ public String toUrlQueryString(String prefix) { } } - // add `namePattern` to the URL query string - if (getNamePattern() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); - } - // add `components` to the URL query string if (getComponents() != null) { for (int i = 0; i < getComponents().size(); i++) { @@ -371,21 +386,6 @@ public String toUrlQueryString(String prefix) { } } - // add `timeDataPattern` to the URL query string - if (getTimeDataPattern() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); - } - - // add `entityAliases` to the URL query string - if (getEntityAliases() != null) { - for (int i = 0; i < getEntityAliases().size(); i++) { - if (getEntityAliases().get(i) != null) { - joiner.add(getEntityAliases().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityAliases%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - return joiner.toString(); } static { From 45603965924de6ac20b06a1d0746126222325059 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Thu, 12 Mar 2026 16:39:35 +0200 Subject: [PATCH 6/8] regenerated clients --- ce/docs/RelationsQueryFilter.md | 2 +- ce/docs/ShortCustomerInfo.md | 3 +- ce/docs/SystemInfo.md | 2 +- ce/spec/openapi.json | 14 +- .../client/model/RelationsQueryFilter.java | 76 ++++----- .../client/model/ShortCustomerInfo.java | 44 +---- .../thingsboard/client/model/SystemInfo.java | 2 +- paas/docs/Integration.md | 4 +- paas/docs/IntegrationInfo.md | 4 +- paas/docs/RelationsQueryFilter.md | 2 +- paas/docs/ShortCustomerInfo.md | 3 +- paas/docs/SystemInfo.md | 2 +- paas/spec/openapi.json | 46 +++--- .../thingsboard/client/model/Integration.java | 150 +++++++++--------- .../client/model/IntegrationInfo.java | 150 +++++++++--------- .../client/model/RelationsQueryFilter.java | 76 ++++----- .../client/model/ShortCustomerInfo.java | 44 +---- .../thingsboard/client/model/SystemInfo.java | 2 +- pe/docs/Integration.md | 4 +- pe/docs/IntegrationInfo.md | 4 +- pe/docs/RelationsQueryFilter.md | 2 +- pe/docs/ShortCustomerInfo.md | 3 +- pe/docs/SystemInfo.md | 2 +- pe/spec/openapi.json | 46 +++--- .../thingsboard/client/model/Integration.java | 150 +++++++++--------- .../client/model/IntegrationInfo.java | 150 +++++++++--------- .../client/model/RelationsQueryFilter.java | 76 ++++----- .../client/model/ShortCustomerInfo.java | 44 +---- .../thingsboard/client/model/SystemInfo.java | 2 +- 29 files changed, 496 insertions(+), 613 deletions(-) diff --git a/ce/docs/RelationsQueryFilter.md b/ce/docs/RelationsQueryFilter.md index 0764f517..1ba618c2 100644 --- a/ce/docs/RelationsQueryFilter.md +++ b/ce/docs/RelationsQueryFilter.md @@ -10,6 +10,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **rootEntity** | **AliasEntityId** | | [optional] | +| **multiRoot** | **Boolean** | | [optional] | | **multiRootEntitiesType** | **EntityType** | | [optional] | | **multiRootEntityIds** | **Set\** | | [optional] | | **direction** | **EntitySearchDirection** | | [optional] | @@ -19,7 +20,6 @@ | **negate** | **Boolean** | | [optional] | | **rootStateEntity** | **Boolean** | | [optional] | | **defaultStateEntity** | **AliasEntityId** | | [optional] | -| **multiRoot** | **Boolean** | | [optional] | diff --git a/ce/docs/ShortCustomerInfo.md b/ce/docs/ShortCustomerInfo.md index 140b5e69..d06b45f3 100644 --- a/ce/docs/ShortCustomerInfo.md +++ b/ce/docs/ShortCustomerInfo.md @@ -9,8 +9,7 @@ |------------ | ------------- | ------------- | -------------| | **customerId** | **CustomerId** | JSON object with the customer Id. | [optional] | | **title** | **String** | Title of the customer. | [optional] | -| **isPublic** | **Boolean** | | [optional] | -| **_public** | **Boolean** | | [optional] | +| **isPublic** | **Boolean** | Indicates special 'Public' customer used to embed dashboards on public websites. | [optional] | diff --git a/ce/docs/SystemInfo.md b/ce/docs/SystemInfo.md index 535dbc3f..82d74800 100644 --- a/ce/docs/SystemInfo.md +++ b/ce/docs/SystemInfo.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **systemData** | **List\** | System data. | [optional] | -| **monolith** | **Boolean** | | [optional] | +| **monolith** | **Boolean** | Is monolith. | [optional] | diff --git a/ce/spec/openapi.json b/ce/spec/openapi.json index 8a111545..26eb736d 100644 --- a/ce/spec/openapi.json +++ b/ce/spec/openapi.json @@ -96163,6 +96163,9 @@ "rootEntity": { "$ref": "#/components/schemas/AliasEntityId" }, + "multiRoot": { + "type": "boolean" + }, "multiRootEntitiesType": { "$ref": "#/components/schemas/EntityType" }, @@ -96197,9 +96200,6 @@ }, "defaultStateEntity": { "$ref": "#/components/schemas/AliasEntityId" - }, - "multiRoot": { - "type": "boolean" } } } @@ -97258,10 +97258,7 @@ }, "isPublic": { "type": "boolean", - "writeOnly": true - }, - "public": { - "type": "boolean" + "description": "Indicates special 'Public' customer used to embed dashboards on public websites." } } }, @@ -97964,7 +97961,8 @@ } }, "monolith": { - "type": "boolean" + "type": "boolean", + "description": "Is monolith." } } }, diff --git a/ce/src/main/java/org/thingsboard/client/model/RelationsQueryFilter.java b/ce/src/main/java/org/thingsboard/client/model/RelationsQueryFilter.java index b36e3a13..9c17fe05 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RelationsQueryFilter.java +++ b/ce/src/main/java/org/thingsboard/client/model/RelationsQueryFilter.java @@ -50,6 +50,7 @@ */ @JsonPropertyOrder({ RelationsQueryFilter.JSON_PROPERTY_ROOT_ENTITY, + RelationsQueryFilter.JSON_PROPERTY_MULTI_ROOT, RelationsQueryFilter.JSON_PROPERTY_MULTI_ROOT_ENTITIES_TYPE, RelationsQueryFilter.JSON_PROPERTY_MULTI_ROOT_ENTITY_IDS, RelationsQueryFilter.JSON_PROPERTY_DIRECTION, @@ -58,8 +59,7 @@ RelationsQueryFilter.JSON_PROPERTY_FETCH_LAST_LEVEL_ONLY, RelationsQueryFilter.JSON_PROPERTY_NEGATE, RelationsQueryFilter.JSON_PROPERTY_ROOT_STATE_ENTITY, - RelationsQueryFilter.JSON_PROPERTY_DEFAULT_STATE_ENTITY, - RelationsQueryFilter.JSON_PROPERTY_MULTI_ROOT + RelationsQueryFilter.JSON_PROPERTY_DEFAULT_STATE_ENTITY }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -73,6 +73,10 @@ public class RelationsQueryFilter extends EntityFilter { @javax.annotation.Nullable private AliasEntityId rootEntity; + public static final String JSON_PROPERTY_MULTI_ROOT = "multiRoot"; + @javax.annotation.Nullable + private Boolean multiRoot; + public static final String JSON_PROPERTY_MULTI_ROOT_ENTITIES_TYPE = "multiRootEntitiesType"; @javax.annotation.Nullable private EntityType multiRootEntitiesType; @@ -109,10 +113,6 @@ public class RelationsQueryFilter extends EntityFilter { @javax.annotation.Nullable private AliasEntityId defaultStateEntity; - public static final String JSON_PROPERTY_MULTI_ROOT = "multiRoot"; - @javax.annotation.Nullable - private Boolean multiRoot; - public RelationsQueryFilter() { } @@ -140,6 +140,30 @@ public void setRootEntity(@javax.annotation.Nullable AliasEntityId rootEntity) { } + public RelationsQueryFilter multiRoot(@javax.annotation.Nullable Boolean multiRoot) { + this.multiRoot = multiRoot; + return this; + } + + /** + * Get multiRoot + * @return multiRoot + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_MULTI_ROOT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMultiRoot() { + return multiRoot; + } + + + @JsonProperty(value = JSON_PROPERTY_MULTI_ROOT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMultiRoot(@javax.annotation.Nullable Boolean multiRoot) { + this.multiRoot = multiRoot; + } + + public RelationsQueryFilter multiRootEntitiesType(@javax.annotation.Nullable EntityType multiRootEntitiesType) { this.multiRootEntitiesType = multiRootEntitiesType; return this; @@ -373,30 +397,6 @@ public void setDefaultStateEntity(@javax.annotation.Nullable AliasEntityId defau } - public RelationsQueryFilter multiRoot(@javax.annotation.Nullable Boolean multiRoot) { - this.multiRoot = multiRoot; - return this; - } - - /** - * Get multiRoot - * @return multiRoot - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_MULTI_ROOT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMultiRoot() { - return multiRoot; - } - - - @JsonProperty(value = JSON_PROPERTY_MULTI_ROOT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMultiRoot(@javax.annotation.Nullable Boolean multiRoot) { - this.multiRoot = multiRoot; - } - - @Override public RelationsQueryFilter type(@javax.annotation.Nonnull String type) { this.setType(type); @@ -416,6 +416,7 @@ public boolean equals(Object o) { } RelationsQueryFilter relationsQueryFilter = (RelationsQueryFilter) o; return Objects.equals(this.rootEntity, relationsQueryFilter.rootEntity) && + Objects.equals(this.multiRoot, relationsQueryFilter.multiRoot) && Objects.equals(this.multiRootEntitiesType, relationsQueryFilter.multiRootEntitiesType) && Objects.equals(this.multiRootEntityIds, relationsQueryFilter.multiRootEntityIds) && Objects.equals(this.direction, relationsQueryFilter.direction) && @@ -425,13 +426,12 @@ public boolean equals(Object o) { Objects.equals(this.negate, relationsQueryFilter.negate) && Objects.equals(this.rootStateEntity, relationsQueryFilter.rootStateEntity) && Objects.equals(this.defaultStateEntity, relationsQueryFilter.defaultStateEntity) && - Objects.equals(this.multiRoot, relationsQueryFilter.multiRoot) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(rootEntity, multiRootEntitiesType, multiRootEntityIds, direction, filters, maxLevel, fetchLastLevelOnly, negate, rootStateEntity, defaultStateEntity, multiRoot, super.hashCode()); + return Objects.hash(rootEntity, multiRoot, multiRootEntitiesType, multiRootEntityIds, direction, filters, maxLevel, fetchLastLevelOnly, negate, rootStateEntity, defaultStateEntity, super.hashCode()); } @Override @@ -440,6 +440,7 @@ public String toString() { sb.append("class RelationsQueryFilter {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" rootEntity: ").append(toIndentedString(rootEntity)).append("\n"); + sb.append(" multiRoot: ").append(toIndentedString(multiRoot)).append("\n"); sb.append(" multiRootEntitiesType: ").append(toIndentedString(multiRootEntitiesType)).append("\n"); sb.append(" multiRootEntityIds: ").append(toIndentedString(multiRootEntityIds)).append("\n"); sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); @@ -449,7 +450,6 @@ public String toString() { sb.append(" negate: ").append(toIndentedString(negate)).append("\n"); sb.append(" rootStateEntity: ").append(toIndentedString(rootStateEntity)).append("\n"); sb.append(" defaultStateEntity: ").append(toIndentedString(defaultStateEntity)).append("\n"); - sb.append(" multiRoot: ").append(toIndentedString(multiRoot)).append("\n"); sb.append("}"); return sb.toString(); } @@ -507,6 +507,11 @@ public String toUrlQueryString(String prefix) { joiner.add(getRootEntity().toUrlQueryString(prefix + "rootEntity" + suffix)); } + // add `multiRoot` to the URL query string + if (getMultiRoot() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smultiRoot%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMultiRoot())))); + } + // add `multiRootEntitiesType` to the URL query string if (getMultiRootEntitiesType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%smultiRootEntitiesType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMultiRootEntitiesType())))); @@ -563,11 +568,6 @@ public String toUrlQueryString(String prefix) { joiner.add(getDefaultStateEntity().toUrlQueryString(prefix + "defaultStateEntity" + suffix)); } - // add `multiRoot` to the URL query string - if (getMultiRoot() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smultiRoot%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMultiRoot())))); - } - return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/ShortCustomerInfo.java b/ce/src/main/java/org/thingsboard/client/model/ShortCustomerInfo.java index b0ddff99..29e76e12 100644 --- a/ce/src/main/java/org/thingsboard/client/model/ShortCustomerInfo.java +++ b/ce/src/main/java/org/thingsboard/client/model/ShortCustomerInfo.java @@ -38,8 +38,7 @@ @JsonPropertyOrder({ ShortCustomerInfo.JSON_PROPERTY_CUSTOMER_ID, ShortCustomerInfo.JSON_PROPERTY_TITLE, - ShortCustomerInfo.JSON_PROPERTY_IS_PUBLIC, - ShortCustomerInfo.JSON_PROPERTY_PUBLIC + ShortCustomerInfo.JSON_PROPERTY_IS_PUBLIC }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class ShortCustomerInfo { @@ -55,10 +54,6 @@ public class ShortCustomerInfo { @javax.annotation.Nullable private Boolean isPublic; - public static final String JSON_PROPERTY_PUBLIC = "public"; - @javax.annotation.Nullable - private Boolean _public; - public ShortCustomerInfo() { } @@ -116,7 +111,7 @@ public ShortCustomerInfo isPublic(@javax.annotation.Nullable Boolean isPublic) { } /** - * Get isPublic + * Indicates special 'Public' customer used to embed dashboards on public websites. * @return isPublic */ @javax.annotation.Nullable @@ -134,30 +129,6 @@ public void setIsPublic(@javax.annotation.Nullable Boolean isPublic) { } - public ShortCustomerInfo _public(@javax.annotation.Nullable Boolean _public) { - this._public = _public; - return this; - } - - /** - * Get _public - * @return _public - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PUBLIC, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPublic() { - return _public; - } - - - @JsonProperty(value = JSON_PROPERTY_PUBLIC, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPublic(@javax.annotation.Nullable Boolean _public) { - this._public = _public; - } - - /** * Return true if this ShortCustomerInfo object is equal to o. */ @@ -172,13 +143,12 @@ public boolean equals(Object o) { ShortCustomerInfo shortCustomerInfo = (ShortCustomerInfo) o; return Objects.equals(this.customerId, shortCustomerInfo.customerId) && Objects.equals(this.title, shortCustomerInfo.title) && - Objects.equals(this.isPublic, shortCustomerInfo.isPublic) && - Objects.equals(this._public, shortCustomerInfo._public); + Objects.equals(this.isPublic, shortCustomerInfo.isPublic); } @Override public int hashCode() { - return Objects.hash(customerId, title, isPublic, _public); + return Objects.hash(customerId, title, isPublic); } @Override @@ -188,7 +158,6 @@ public String toString() { sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" isPublic: ").append(toIndentedString(isPublic)).append("\n"); - sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); sb.append("}"); return sb.toString(); } @@ -251,11 +220,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sisPublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsPublic())))); } - // add `public` to the URL query string - if (getPublic() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%spublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublic())))); - } - return joiner.toString(); } } diff --git a/ce/src/main/java/org/thingsboard/client/model/SystemInfo.java b/ce/src/main/java/org/thingsboard/client/model/SystemInfo.java index d8d55c47..212fbf8e 100644 --- a/ce/src/main/java/org/thingsboard/client/model/SystemInfo.java +++ b/ce/src/main/java/org/thingsboard/client/model/SystemInfo.java @@ -92,7 +92,7 @@ public SystemInfo monolith(@javax.annotation.Nullable Boolean monolith) { } /** - * Get monolith + * Is monolith. * @return monolith */ @javax.annotation.Nullable diff --git a/paas/docs/Integration.md b/paas/docs/Integration.md index 13b55fc2..c09e562f 100644 --- a/paas/docs/Integration.md +++ b/paas/docs/Integration.md @@ -17,9 +17,7 @@ A JSON value representing the integration. | **debugMode** | **Boolean** | Enable/disable debug. | [optional] | | **debugSettings** | **DebugSettings** | Debug settings object. | [optional] | | **enabled** | **Boolean** | Boolean flag to enable/disable the integration | [optional] | -| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | | **allowCreateDevicesOrAssets** | **Boolean** | Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet | [optional] | -| **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | | **version** | **Long** | | [optional] | | **defaultConverterId** | **ConverterId** | JSON object with the Uplink Converter Id | | | **downlinkConverterId** | **ConverterId** | JSON object with the Downlink Converter Id | [optional] | @@ -27,6 +25,8 @@ A JSON value representing the integration. | **secret** | **String** | String value used by the remote integrations. Remote integration uses this value along with the 'routingKey' for kind of security and validation to be able to connect to the platform using Grpc | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | JSON object representing integration configuration. Each integration type has specific configuration with the connectivity parameters (like 'host' and 'port' for MQTT type or 'baseUrl' for HTTP based type, etc.) and other important parameters dependent on the integration type | | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the integration | [optional] | +| **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | +| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | diff --git a/paas/docs/IntegrationInfo.md b/paas/docs/IntegrationInfo.md index 66c30459..a6e9964f 100644 --- a/paas/docs/IntegrationInfo.md +++ b/paas/docs/IntegrationInfo.md @@ -15,12 +15,12 @@ | **debugMode** | **Boolean** | Enable/disable debug. | [optional] | | **debugSettings** | **DebugSettings** | Debug settings object. | [optional] | | **enabled** | **Boolean** | Boolean flag to enable/disable the integration | [optional] | -| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | | **allowCreateDevicesOrAssets** | **Boolean** | Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet | [optional] | -| **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | | **version** | **Long** | | [optional] | | **status** | **Object** | | [optional] | | **stats** | **Object** | | [optional] | +| **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | +| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | diff --git a/paas/docs/RelationsQueryFilter.md b/paas/docs/RelationsQueryFilter.md index 0764f517..1ba618c2 100644 --- a/paas/docs/RelationsQueryFilter.md +++ b/paas/docs/RelationsQueryFilter.md @@ -10,6 +10,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **rootEntity** | **AliasEntityId** | | [optional] | +| **multiRoot** | **Boolean** | | [optional] | | **multiRootEntitiesType** | **EntityType** | | [optional] | | **multiRootEntityIds** | **Set\** | | [optional] | | **direction** | **EntitySearchDirection** | | [optional] | @@ -19,7 +20,6 @@ | **negate** | **Boolean** | | [optional] | | **rootStateEntity** | **Boolean** | | [optional] | | **defaultStateEntity** | **AliasEntityId** | | [optional] | -| **multiRoot** | **Boolean** | | [optional] | diff --git a/paas/docs/ShortCustomerInfo.md b/paas/docs/ShortCustomerInfo.md index 140b5e69..d06b45f3 100644 --- a/paas/docs/ShortCustomerInfo.md +++ b/paas/docs/ShortCustomerInfo.md @@ -9,8 +9,7 @@ |------------ | ------------- | ------------- | -------------| | **customerId** | **CustomerId** | JSON object with the customer Id. | [optional] | | **title** | **String** | Title of the customer. | [optional] | -| **isPublic** | **Boolean** | | [optional] | -| **_public** | **Boolean** | | [optional] | +| **isPublic** | **Boolean** | Indicates special 'Public' customer used to embed dashboards on public websites. | [optional] | diff --git a/paas/docs/SystemInfo.md b/paas/docs/SystemInfo.md index 535dbc3f..82d74800 100644 --- a/paas/docs/SystemInfo.md +++ b/paas/docs/SystemInfo.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **systemData** | **List\** | System data. | [optional] | -| **monolith** | **Boolean** | | [optional] | +| **monolith** | **Boolean** | Is monolith. | [optional] | diff --git a/paas/spec/openapi.json b/paas/spec/openapi.json index 6a6fedd8..721b5fc5 100644 --- a/paas/spec/openapi.json +++ b/paas/spec/openapi.json @@ -144195,18 +144195,10 @@ "type": "boolean", "description": "Boolean flag to enable/disable the integration" }, - "remote": { - "type": "boolean", - "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" - }, "allowCreateDevicesOrAssets": { "type": "boolean", "description": "Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet" }, - "edgeTemplate": { - "type": "boolean", - "description": "Boolean flag that specifies that is regular or edge template integration" - }, "version": { "type": "integer", "format": "int64" @@ -144236,6 +144228,14 @@ "additionalInfo": { "$ref": "#/components/schemas/JsonNode", "description": "Additional parameters of the integration" + }, + "edgeTemplate": { + "type": "boolean", + "description": "Boolean flag that specifies that is regular or edge template integration" + }, + "remote": { + "type": "boolean", + "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" } }, "required": [ @@ -144317,18 +144317,10 @@ "type": "boolean", "description": "Boolean flag to enable/disable the integration" }, - "remote": { - "type": "boolean", - "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" - }, "allowCreateDevicesOrAssets": { "type": "boolean", "description": "Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet" }, - "edgeTemplate": { - "type": "boolean", - "description": "Boolean flag that specifies that is regular or edge template integration" - }, "version": { "type": "integer", "format": "int64" @@ -144338,6 +144330,14 @@ }, "stats": { "$ref": "#/components/schemas/ArrayNode" + }, + "edgeTemplate": { + "type": "boolean", + "description": "Boolean flag that specifies that is regular or edge template integration" + }, + "remote": { + "type": "boolean", + "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" } }, "required": [ @@ -151335,6 +151335,9 @@ "rootEntity": { "$ref": "#/components/schemas/AliasEntityId" }, + "multiRoot": { + "type": "boolean" + }, "multiRootEntitiesType": { "$ref": "#/components/schemas/EntityType" }, @@ -151369,9 +151372,6 @@ }, "defaultStateEntity": { "$ref": "#/components/schemas/AliasEntityId" - }, - "multiRoot": { - "type": "boolean" } } } @@ -154009,10 +154009,7 @@ }, "isPublic": { "type": "boolean", - "writeOnly": true - }, - "public": { - "type": "boolean" + "description": "Indicates special 'Public' customer used to embed dashboards on public websites." } } }, @@ -155272,7 +155269,8 @@ } }, "monolith": { - "type": "boolean" + "type": "boolean", + "description": "Is monolith." } } }, diff --git a/paas/src/main/java/org/thingsboard/client/model/Integration.java b/paas/src/main/java/org/thingsboard/client/model/Integration.java index f96f37e5..5ea643ca 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Integration.java +++ b/paas/src/main/java/org/thingsboard/client/model/Integration.java @@ -48,16 +48,16 @@ Integration.JSON_PROPERTY_DEBUG_MODE, Integration.JSON_PROPERTY_DEBUG_SETTINGS, Integration.JSON_PROPERTY_ENABLED, - Integration.JSON_PROPERTY_REMOTE, Integration.JSON_PROPERTY_ALLOW_CREATE_DEVICES_OR_ASSETS, - Integration.JSON_PROPERTY_EDGE_TEMPLATE, Integration.JSON_PROPERTY_VERSION, Integration.JSON_PROPERTY_DEFAULT_CONVERTER_ID, Integration.JSON_PROPERTY_DOWNLINK_CONVERTER_ID, Integration.JSON_PROPERTY_ROUTING_KEY, Integration.JSON_PROPERTY_SECRET, Integration.JSON_PROPERTY_CONFIGURATION, - Integration.JSON_PROPERTY_ADDITIONAL_INFO + Integration.JSON_PROPERTY_ADDITIONAL_INFO, + Integration.JSON_PROPERTY_EDGE_TEMPLATE, + Integration.JSON_PROPERTY_REMOTE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class Integration { @@ -93,18 +93,10 @@ public class Integration { @javax.annotation.Nullable private Boolean enabled; - public static final String JSON_PROPERTY_REMOTE = "remote"; - @javax.annotation.Nullable - private Boolean remote; - public static final String JSON_PROPERTY_ALLOW_CREATE_DEVICES_OR_ASSETS = "allowCreateDevicesOrAssets"; @javax.annotation.Nullable private Boolean allowCreateDevicesOrAssets; - public static final String JSON_PROPERTY_EDGE_TEMPLATE = "edgeTemplate"; - @javax.annotation.Nullable - private Boolean edgeTemplate; - public static final String JSON_PROPERTY_VERSION = "version"; @javax.annotation.Nullable private Long version; @@ -133,6 +125,14 @@ public class Integration { @javax.annotation.Nullable private com.fasterxml.jackson.databind.JsonNode additionalInfo; + public static final String JSON_PROPERTY_EDGE_TEMPLATE = "edgeTemplate"; + @javax.annotation.Nullable + private Boolean edgeTemplate; + + public static final String JSON_PROPERTY_REMOTE = "remote"; + @javax.annotation.Nullable + private Boolean remote; + public Integration() { } @@ -320,30 +320,6 @@ public void setEnabled(@javax.annotation.Nullable Boolean enabled) { } - public Integration remote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; - return this; - } - - /** - * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core - * @return remote - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRemote() { - return remote; - } - - - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRemote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; - } - - public Integration allowCreateDevicesOrAssets(@javax.annotation.Nullable Boolean allowCreateDevicesOrAssets) { this.allowCreateDevicesOrAssets = allowCreateDevicesOrAssets; return this; @@ -368,30 +344,6 @@ public void setAllowCreateDevicesOrAssets(@javax.annotation.Nullable Boolean all } - public Integration edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; - return this; - } - - /** - * Boolean flag that specifies that is regular or edge template integration - * @return edgeTemplate - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEdgeTemplate() { - return edgeTemplate; - } - - - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; - } - - public Integration version(@javax.annotation.Nullable Long version) { this.version = version; return this; @@ -560,6 +512,54 @@ public void setAdditionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.d } + public Integration edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; + return this; + } + + /** + * Boolean flag that specifies that is regular or edge template integration + * @return edgeTemplate + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEdgeTemplate() { + return edgeTemplate; + } + + + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; + } + + + public Integration remote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; + return this; + } + + /** + * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core + * @return remote + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRemote() { + return remote; + } + + + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRemote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; + } + + /** * Return true if this Integration object is equal to o. */ @@ -580,21 +580,21 @@ public boolean equals(Object o) { Objects.equals(this.debugMode, integration.debugMode) && Objects.equals(this.debugSettings, integration.debugSettings) && Objects.equals(this.enabled, integration.enabled) && - Objects.equals(this.remote, integration.remote) && Objects.equals(this.allowCreateDevicesOrAssets, integration.allowCreateDevicesOrAssets) && - Objects.equals(this.edgeTemplate, integration.edgeTemplate) && Objects.equals(this.version, integration.version) && Objects.equals(this.defaultConverterId, integration.defaultConverterId) && Objects.equals(this.downlinkConverterId, integration.downlinkConverterId) && Objects.equals(this.routingKey, integration.routingKey) && Objects.equals(this.secret, integration.secret) && Objects.equals(this._configuration, integration._configuration) && - Objects.equals(this.additionalInfo, integration.additionalInfo); + Objects.equals(this.additionalInfo, integration.additionalInfo) && + Objects.equals(this.edgeTemplate, integration.edgeTemplate) && + Objects.equals(this.remote, integration.remote); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, remote, allowCreateDevicesOrAssets, edgeTemplate, version, defaultConverterId, downlinkConverterId, routingKey, secret, _configuration, additionalInfo); + return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, allowCreateDevicesOrAssets, version, defaultConverterId, downlinkConverterId, routingKey, secret, _configuration, additionalInfo, edgeTemplate, remote); } @Override @@ -609,9 +609,7 @@ public String toString() { sb.append(" debugMode: ").append(toIndentedString(debugMode)).append("\n"); sb.append(" debugSettings: ").append(toIndentedString(debugSettings)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append(" allowCreateDevicesOrAssets: ").append(toIndentedString(allowCreateDevicesOrAssets)).append("\n"); - sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" defaultConverterId: ").append(toIndentedString(defaultConverterId)).append("\n"); sb.append(" downlinkConverterId: ").append(toIndentedString(downlinkConverterId)).append("\n"); @@ -619,6 +617,8 @@ public String toString() { sb.append(" secret: ").append(toIndentedString(secret)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); + sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); + sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append("}"); return sb.toString(); } @@ -706,21 +706,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); } - // add `remote` to the URL query string - if (getRemote() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); - } - // add `allowCreateDevicesOrAssets` to the URL query string if (getAllowCreateDevicesOrAssets() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sallowCreateDevicesOrAssets%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAllowCreateDevicesOrAssets())))); } - // add `edgeTemplate` to the URL query string - if (getEdgeTemplate() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sedgeTemplate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEdgeTemplate())))); - } - // add `version` to the URL query string if (getVersion() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); @@ -756,6 +746,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sadditionalInfo%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInfo())))); } + // add `edgeTemplate` to the URL query string + if (getEdgeTemplate() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sedgeTemplate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEdgeTemplate())))); + } + + // add `remote` to the URL query string + if (getRemote() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); + } + return joiner.toString(); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/IntegrationInfo.java b/paas/src/main/java/org/thingsboard/client/model/IntegrationInfo.java index b87f06ee..7f818e83 100644 --- a/paas/src/main/java/org/thingsboard/client/model/IntegrationInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/IntegrationInfo.java @@ -51,12 +51,12 @@ IntegrationInfo.JSON_PROPERTY_DEBUG_MODE, IntegrationInfo.JSON_PROPERTY_DEBUG_SETTINGS, IntegrationInfo.JSON_PROPERTY_ENABLED, - IntegrationInfo.JSON_PROPERTY_REMOTE, IntegrationInfo.JSON_PROPERTY_ALLOW_CREATE_DEVICES_OR_ASSETS, - IntegrationInfo.JSON_PROPERTY_EDGE_TEMPLATE, IntegrationInfo.JSON_PROPERTY_VERSION, IntegrationInfo.JSON_PROPERTY_STATUS, - IntegrationInfo.JSON_PROPERTY_STATS + IntegrationInfo.JSON_PROPERTY_STATS, + IntegrationInfo.JSON_PROPERTY_EDGE_TEMPLATE, + IntegrationInfo.JSON_PROPERTY_REMOTE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class IntegrationInfo { @@ -92,18 +92,10 @@ public class IntegrationInfo { @javax.annotation.Nullable private Boolean enabled; - public static final String JSON_PROPERTY_REMOTE = "remote"; - @javax.annotation.Nullable - private Boolean remote; - public static final String JSON_PROPERTY_ALLOW_CREATE_DEVICES_OR_ASSETS = "allowCreateDevicesOrAssets"; @javax.annotation.Nullable private Boolean allowCreateDevicesOrAssets; - public static final String JSON_PROPERTY_EDGE_TEMPLATE = "edgeTemplate"; - @javax.annotation.Nullable - private Boolean edgeTemplate; - public static final String JSON_PROPERTY_VERSION = "version"; @javax.annotation.Nullable private Long version; @@ -115,6 +107,14 @@ public class IntegrationInfo { public static final String JSON_PROPERTY_STATS = "stats"; private JsonNullable stats = JsonNullable.of(null); + public static final String JSON_PROPERTY_EDGE_TEMPLATE = "edgeTemplate"; + @javax.annotation.Nullable + private Boolean edgeTemplate; + + public static final String JSON_PROPERTY_REMOTE = "remote"; + @javax.annotation.Nullable + private Boolean remote; + public IntegrationInfo() { } @@ -302,30 +302,6 @@ public void setEnabled(@javax.annotation.Nullable Boolean enabled) { } - public IntegrationInfo remote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; - return this; - } - - /** - * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core - * @return remote - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRemote() { - return remote; - } - - - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRemote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; - } - - public IntegrationInfo allowCreateDevicesOrAssets(@javax.annotation.Nullable Boolean allowCreateDevicesOrAssets) { this.allowCreateDevicesOrAssets = allowCreateDevicesOrAssets; return this; @@ -350,30 +326,6 @@ public void setAllowCreateDevicesOrAssets(@javax.annotation.Nullable Boolean all } - public IntegrationInfo edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; - return this; - } - - /** - * Boolean flag that specifies that is regular or edge template integration - * @return edgeTemplate - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEdgeTemplate() { - return edgeTemplate; - } - - - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; - } - - public IntegrationInfo version(@javax.annotation.Nullable Long version) { this.version = version; return this; @@ -454,6 +406,54 @@ public void setStats(@javax.annotation.Nullable Object stats) { } + public IntegrationInfo edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; + return this; + } + + /** + * Boolean flag that specifies that is regular or edge template integration + * @return edgeTemplate + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEdgeTemplate() { + return edgeTemplate; + } + + + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; + } + + + public IntegrationInfo remote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; + return this; + } + + /** + * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core + * @return remote + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRemote() { + return remote; + } + + + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRemote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; + } + + /** * Return true if this IntegrationInfo object is equal to o. */ @@ -474,12 +474,12 @@ public boolean equals(Object o) { Objects.equals(this.debugMode, integrationInfo.debugMode) && Objects.equals(this.debugSettings, integrationInfo.debugSettings) && Objects.equals(this.enabled, integrationInfo.enabled) && - Objects.equals(this.remote, integrationInfo.remote) && Objects.equals(this.allowCreateDevicesOrAssets, integrationInfo.allowCreateDevicesOrAssets) && - Objects.equals(this.edgeTemplate, integrationInfo.edgeTemplate) && Objects.equals(this.version, integrationInfo.version) && Objects.equals(this.status, integrationInfo.status) && - equalsNullable(this.stats, integrationInfo.stats); + equalsNullable(this.stats, integrationInfo.stats) && + Objects.equals(this.edgeTemplate, integrationInfo.edgeTemplate) && + Objects.equals(this.remote, integrationInfo.remote); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -488,7 +488,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, remote, allowCreateDevicesOrAssets, edgeTemplate, version, status, hashCodeNullable(stats)); + return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, allowCreateDevicesOrAssets, version, status, hashCodeNullable(stats), edgeTemplate, remote); } private static int hashCodeNullable(JsonNullable a) { @@ -510,12 +510,12 @@ public String toString() { sb.append(" debugMode: ").append(toIndentedString(debugMode)).append("\n"); sb.append(" debugSettings: ").append(toIndentedString(debugSettings)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append(" allowCreateDevicesOrAssets: ").append(toIndentedString(allowCreateDevicesOrAssets)).append("\n"); - sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" stats: ").append(toIndentedString(stats)).append("\n"); + sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); + sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append("}"); return sb.toString(); } @@ -603,21 +603,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); } - // add `remote` to the URL query string - if (getRemote() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); - } - // add `allowCreateDevicesOrAssets` to the URL query string if (getAllowCreateDevicesOrAssets() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sallowCreateDevicesOrAssets%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAllowCreateDevicesOrAssets())))); } - // add `edgeTemplate` to the URL query string - if (getEdgeTemplate() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sedgeTemplate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEdgeTemplate())))); - } - // add `version` to the URL query string if (getVersion() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); @@ -633,6 +623,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstats%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStats())))); } + // add `edgeTemplate` to the URL query string + if (getEdgeTemplate() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sedgeTemplate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEdgeTemplate())))); + } + + // add `remote` to the URL query string + if (getRemote() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); + } + return joiner.toString(); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/RelationsQueryFilter.java b/paas/src/main/java/org/thingsboard/client/model/RelationsQueryFilter.java index b36e3a13..9c17fe05 100644 --- a/paas/src/main/java/org/thingsboard/client/model/RelationsQueryFilter.java +++ b/paas/src/main/java/org/thingsboard/client/model/RelationsQueryFilter.java @@ -50,6 +50,7 @@ */ @JsonPropertyOrder({ RelationsQueryFilter.JSON_PROPERTY_ROOT_ENTITY, + RelationsQueryFilter.JSON_PROPERTY_MULTI_ROOT, RelationsQueryFilter.JSON_PROPERTY_MULTI_ROOT_ENTITIES_TYPE, RelationsQueryFilter.JSON_PROPERTY_MULTI_ROOT_ENTITY_IDS, RelationsQueryFilter.JSON_PROPERTY_DIRECTION, @@ -58,8 +59,7 @@ RelationsQueryFilter.JSON_PROPERTY_FETCH_LAST_LEVEL_ONLY, RelationsQueryFilter.JSON_PROPERTY_NEGATE, RelationsQueryFilter.JSON_PROPERTY_ROOT_STATE_ENTITY, - RelationsQueryFilter.JSON_PROPERTY_DEFAULT_STATE_ENTITY, - RelationsQueryFilter.JSON_PROPERTY_MULTI_ROOT + RelationsQueryFilter.JSON_PROPERTY_DEFAULT_STATE_ENTITY }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -73,6 +73,10 @@ public class RelationsQueryFilter extends EntityFilter { @javax.annotation.Nullable private AliasEntityId rootEntity; + public static final String JSON_PROPERTY_MULTI_ROOT = "multiRoot"; + @javax.annotation.Nullable + private Boolean multiRoot; + public static final String JSON_PROPERTY_MULTI_ROOT_ENTITIES_TYPE = "multiRootEntitiesType"; @javax.annotation.Nullable private EntityType multiRootEntitiesType; @@ -109,10 +113,6 @@ public class RelationsQueryFilter extends EntityFilter { @javax.annotation.Nullable private AliasEntityId defaultStateEntity; - public static final String JSON_PROPERTY_MULTI_ROOT = "multiRoot"; - @javax.annotation.Nullable - private Boolean multiRoot; - public RelationsQueryFilter() { } @@ -140,6 +140,30 @@ public void setRootEntity(@javax.annotation.Nullable AliasEntityId rootEntity) { } + public RelationsQueryFilter multiRoot(@javax.annotation.Nullable Boolean multiRoot) { + this.multiRoot = multiRoot; + return this; + } + + /** + * Get multiRoot + * @return multiRoot + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_MULTI_ROOT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMultiRoot() { + return multiRoot; + } + + + @JsonProperty(value = JSON_PROPERTY_MULTI_ROOT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMultiRoot(@javax.annotation.Nullable Boolean multiRoot) { + this.multiRoot = multiRoot; + } + + public RelationsQueryFilter multiRootEntitiesType(@javax.annotation.Nullable EntityType multiRootEntitiesType) { this.multiRootEntitiesType = multiRootEntitiesType; return this; @@ -373,30 +397,6 @@ public void setDefaultStateEntity(@javax.annotation.Nullable AliasEntityId defau } - public RelationsQueryFilter multiRoot(@javax.annotation.Nullable Boolean multiRoot) { - this.multiRoot = multiRoot; - return this; - } - - /** - * Get multiRoot - * @return multiRoot - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_MULTI_ROOT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMultiRoot() { - return multiRoot; - } - - - @JsonProperty(value = JSON_PROPERTY_MULTI_ROOT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMultiRoot(@javax.annotation.Nullable Boolean multiRoot) { - this.multiRoot = multiRoot; - } - - @Override public RelationsQueryFilter type(@javax.annotation.Nonnull String type) { this.setType(type); @@ -416,6 +416,7 @@ public boolean equals(Object o) { } RelationsQueryFilter relationsQueryFilter = (RelationsQueryFilter) o; return Objects.equals(this.rootEntity, relationsQueryFilter.rootEntity) && + Objects.equals(this.multiRoot, relationsQueryFilter.multiRoot) && Objects.equals(this.multiRootEntitiesType, relationsQueryFilter.multiRootEntitiesType) && Objects.equals(this.multiRootEntityIds, relationsQueryFilter.multiRootEntityIds) && Objects.equals(this.direction, relationsQueryFilter.direction) && @@ -425,13 +426,12 @@ public boolean equals(Object o) { Objects.equals(this.negate, relationsQueryFilter.negate) && Objects.equals(this.rootStateEntity, relationsQueryFilter.rootStateEntity) && Objects.equals(this.defaultStateEntity, relationsQueryFilter.defaultStateEntity) && - Objects.equals(this.multiRoot, relationsQueryFilter.multiRoot) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(rootEntity, multiRootEntitiesType, multiRootEntityIds, direction, filters, maxLevel, fetchLastLevelOnly, negate, rootStateEntity, defaultStateEntity, multiRoot, super.hashCode()); + return Objects.hash(rootEntity, multiRoot, multiRootEntitiesType, multiRootEntityIds, direction, filters, maxLevel, fetchLastLevelOnly, negate, rootStateEntity, defaultStateEntity, super.hashCode()); } @Override @@ -440,6 +440,7 @@ public String toString() { sb.append("class RelationsQueryFilter {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" rootEntity: ").append(toIndentedString(rootEntity)).append("\n"); + sb.append(" multiRoot: ").append(toIndentedString(multiRoot)).append("\n"); sb.append(" multiRootEntitiesType: ").append(toIndentedString(multiRootEntitiesType)).append("\n"); sb.append(" multiRootEntityIds: ").append(toIndentedString(multiRootEntityIds)).append("\n"); sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); @@ -449,7 +450,6 @@ public String toString() { sb.append(" negate: ").append(toIndentedString(negate)).append("\n"); sb.append(" rootStateEntity: ").append(toIndentedString(rootStateEntity)).append("\n"); sb.append(" defaultStateEntity: ").append(toIndentedString(defaultStateEntity)).append("\n"); - sb.append(" multiRoot: ").append(toIndentedString(multiRoot)).append("\n"); sb.append("}"); return sb.toString(); } @@ -507,6 +507,11 @@ public String toUrlQueryString(String prefix) { joiner.add(getRootEntity().toUrlQueryString(prefix + "rootEntity" + suffix)); } + // add `multiRoot` to the URL query string + if (getMultiRoot() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smultiRoot%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMultiRoot())))); + } + // add `multiRootEntitiesType` to the URL query string if (getMultiRootEntitiesType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%smultiRootEntitiesType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMultiRootEntitiesType())))); @@ -563,11 +568,6 @@ public String toUrlQueryString(String prefix) { joiner.add(getDefaultStateEntity().toUrlQueryString(prefix + "defaultStateEntity" + suffix)); } - // add `multiRoot` to the URL query string - if (getMultiRoot() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smultiRoot%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMultiRoot())))); - } - return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/ShortCustomerInfo.java b/paas/src/main/java/org/thingsboard/client/model/ShortCustomerInfo.java index b0ddff99..29e76e12 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ShortCustomerInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/ShortCustomerInfo.java @@ -38,8 +38,7 @@ @JsonPropertyOrder({ ShortCustomerInfo.JSON_PROPERTY_CUSTOMER_ID, ShortCustomerInfo.JSON_PROPERTY_TITLE, - ShortCustomerInfo.JSON_PROPERTY_IS_PUBLIC, - ShortCustomerInfo.JSON_PROPERTY_PUBLIC + ShortCustomerInfo.JSON_PROPERTY_IS_PUBLIC }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class ShortCustomerInfo { @@ -55,10 +54,6 @@ public class ShortCustomerInfo { @javax.annotation.Nullable private Boolean isPublic; - public static final String JSON_PROPERTY_PUBLIC = "public"; - @javax.annotation.Nullable - private Boolean _public; - public ShortCustomerInfo() { } @@ -116,7 +111,7 @@ public ShortCustomerInfo isPublic(@javax.annotation.Nullable Boolean isPublic) { } /** - * Get isPublic + * Indicates special 'Public' customer used to embed dashboards on public websites. * @return isPublic */ @javax.annotation.Nullable @@ -134,30 +129,6 @@ public void setIsPublic(@javax.annotation.Nullable Boolean isPublic) { } - public ShortCustomerInfo _public(@javax.annotation.Nullable Boolean _public) { - this._public = _public; - return this; - } - - /** - * Get _public - * @return _public - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PUBLIC, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPublic() { - return _public; - } - - - @JsonProperty(value = JSON_PROPERTY_PUBLIC, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPublic(@javax.annotation.Nullable Boolean _public) { - this._public = _public; - } - - /** * Return true if this ShortCustomerInfo object is equal to o. */ @@ -172,13 +143,12 @@ public boolean equals(Object o) { ShortCustomerInfo shortCustomerInfo = (ShortCustomerInfo) o; return Objects.equals(this.customerId, shortCustomerInfo.customerId) && Objects.equals(this.title, shortCustomerInfo.title) && - Objects.equals(this.isPublic, shortCustomerInfo.isPublic) && - Objects.equals(this._public, shortCustomerInfo._public); + Objects.equals(this.isPublic, shortCustomerInfo.isPublic); } @Override public int hashCode() { - return Objects.hash(customerId, title, isPublic, _public); + return Objects.hash(customerId, title, isPublic); } @Override @@ -188,7 +158,6 @@ public String toString() { sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" isPublic: ").append(toIndentedString(isPublic)).append("\n"); - sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); sb.append("}"); return sb.toString(); } @@ -251,11 +220,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sisPublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsPublic())))); } - // add `public` to the URL query string - if (getPublic() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%spublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublic())))); - } - return joiner.toString(); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/SystemInfo.java b/paas/src/main/java/org/thingsboard/client/model/SystemInfo.java index d8d55c47..212fbf8e 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SystemInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/SystemInfo.java @@ -92,7 +92,7 @@ public SystemInfo monolith(@javax.annotation.Nullable Boolean monolith) { } /** - * Get monolith + * Is monolith. * @return monolith */ @javax.annotation.Nullable diff --git a/pe/docs/Integration.md b/pe/docs/Integration.md index 13b55fc2..c09e562f 100644 --- a/pe/docs/Integration.md +++ b/pe/docs/Integration.md @@ -17,9 +17,7 @@ A JSON value representing the integration. | **debugMode** | **Boolean** | Enable/disable debug. | [optional] | | **debugSettings** | **DebugSettings** | Debug settings object. | [optional] | | **enabled** | **Boolean** | Boolean flag to enable/disable the integration | [optional] | -| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | | **allowCreateDevicesOrAssets** | **Boolean** | Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet | [optional] | -| **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | | **version** | **Long** | | [optional] | | **defaultConverterId** | **ConverterId** | JSON object with the Uplink Converter Id | | | **downlinkConverterId** | **ConverterId** | JSON object with the Downlink Converter Id | [optional] | @@ -27,6 +25,8 @@ A JSON value representing the integration. | **secret** | **String** | String value used by the remote integrations. Remote integration uses this value along with the 'routingKey' for kind of security and validation to be able to connect to the platform using Grpc | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | JSON object representing integration configuration. Each integration type has specific configuration with the connectivity parameters (like 'host' and 'port' for MQTT type or 'baseUrl' for HTTP based type, etc.) and other important parameters dependent on the integration type | | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the integration | [optional] | +| **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | +| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | diff --git a/pe/docs/IntegrationInfo.md b/pe/docs/IntegrationInfo.md index 66c30459..a6e9964f 100644 --- a/pe/docs/IntegrationInfo.md +++ b/pe/docs/IntegrationInfo.md @@ -15,12 +15,12 @@ | **debugMode** | **Boolean** | Enable/disable debug. | [optional] | | **debugSettings** | **DebugSettings** | Debug settings object. | [optional] | | **enabled** | **Boolean** | Boolean flag to enable/disable the integration | [optional] | -| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | | **allowCreateDevicesOrAssets** | **Boolean** | Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet | [optional] | -| **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | | **version** | **Long** | | [optional] | | **status** | **Object** | | [optional] | | **stats** | **Object** | | [optional] | +| **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | +| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | diff --git a/pe/docs/RelationsQueryFilter.md b/pe/docs/RelationsQueryFilter.md index 0764f517..1ba618c2 100644 --- a/pe/docs/RelationsQueryFilter.md +++ b/pe/docs/RelationsQueryFilter.md @@ -10,6 +10,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **rootEntity** | **AliasEntityId** | | [optional] | +| **multiRoot** | **Boolean** | | [optional] | | **multiRootEntitiesType** | **EntityType** | | [optional] | | **multiRootEntityIds** | **Set\** | | [optional] | | **direction** | **EntitySearchDirection** | | [optional] | @@ -19,7 +20,6 @@ | **negate** | **Boolean** | | [optional] | | **rootStateEntity** | **Boolean** | | [optional] | | **defaultStateEntity** | **AliasEntityId** | | [optional] | -| **multiRoot** | **Boolean** | | [optional] | diff --git a/pe/docs/ShortCustomerInfo.md b/pe/docs/ShortCustomerInfo.md index 140b5e69..d06b45f3 100644 --- a/pe/docs/ShortCustomerInfo.md +++ b/pe/docs/ShortCustomerInfo.md @@ -9,8 +9,7 @@ |------------ | ------------- | ------------- | -------------| | **customerId** | **CustomerId** | JSON object with the customer Id. | [optional] | | **title** | **String** | Title of the customer. | [optional] | -| **isPublic** | **Boolean** | | [optional] | -| **_public** | **Boolean** | | [optional] | +| **isPublic** | **Boolean** | Indicates special 'Public' customer used to embed dashboards on public websites. | [optional] | diff --git a/pe/docs/SystemInfo.md b/pe/docs/SystemInfo.md index 535dbc3f..82d74800 100644 --- a/pe/docs/SystemInfo.md +++ b/pe/docs/SystemInfo.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **systemData** | **List\** | System data. | [optional] | -| **monolith** | **Boolean** | | [optional] | +| **monolith** | **Boolean** | Is monolith. | [optional] | diff --git a/pe/spec/openapi.json b/pe/spec/openapi.json index 838b7ebd..a180afd5 100644 --- a/pe/spec/openapi.json +++ b/pe/spec/openapi.json @@ -126970,18 +126970,10 @@ "type": "boolean", "description": "Boolean flag to enable/disable the integration" }, - "remote": { - "type": "boolean", - "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" - }, "allowCreateDevicesOrAssets": { "type": "boolean", "description": "Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet" }, - "edgeTemplate": { - "type": "boolean", - "description": "Boolean flag that specifies that is regular or edge template integration" - }, "version": { "type": "integer", "format": "int64" @@ -127011,6 +127003,14 @@ "additionalInfo": { "$ref": "#/components/schemas/JsonNode", "description": "Additional parameters of the integration" + }, + "edgeTemplate": { + "type": "boolean", + "description": "Boolean flag that specifies that is regular or edge template integration" + }, + "remote": { + "type": "boolean", + "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" } }, "required": [ @@ -127092,18 +127092,10 @@ "type": "boolean", "description": "Boolean flag to enable/disable the integration" }, - "remote": { - "type": "boolean", - "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" - }, "allowCreateDevicesOrAssets": { "type": "boolean", "description": "Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet" }, - "edgeTemplate": { - "type": "boolean", - "description": "Boolean flag that specifies that is regular or edge template integration" - }, "version": { "type": "integer", "format": "int64" @@ -127113,6 +127105,14 @@ }, "stats": { "$ref": "#/components/schemas/ArrayNode" + }, + "edgeTemplate": { + "type": "boolean", + "description": "Boolean flag that specifies that is regular or edge template integration" + }, + "remote": { + "type": "boolean", + "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" } }, "required": [ @@ -134103,6 +134103,9 @@ "rootEntity": { "$ref": "#/components/schemas/AliasEntityId" }, + "multiRoot": { + "type": "boolean" + }, "multiRootEntitiesType": { "$ref": "#/components/schemas/EntityType" }, @@ -134137,9 +134140,6 @@ }, "defaultStateEntity": { "$ref": "#/components/schemas/AliasEntityId" - }, - "multiRoot": { - "type": "boolean" } } } @@ -136772,10 +136772,7 @@ }, "isPublic": { "type": "boolean", - "writeOnly": true - }, - "public": { - "type": "boolean" + "description": "Indicates special 'Public' customer used to embed dashboards on public websites." } } }, @@ -137754,7 +137751,8 @@ } }, "monolith": { - "type": "boolean" + "type": "boolean", + "description": "Is monolith." } } }, diff --git a/pe/src/main/java/org/thingsboard/client/model/Integration.java b/pe/src/main/java/org/thingsboard/client/model/Integration.java index f96f37e5..5ea643ca 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Integration.java +++ b/pe/src/main/java/org/thingsboard/client/model/Integration.java @@ -48,16 +48,16 @@ Integration.JSON_PROPERTY_DEBUG_MODE, Integration.JSON_PROPERTY_DEBUG_SETTINGS, Integration.JSON_PROPERTY_ENABLED, - Integration.JSON_PROPERTY_REMOTE, Integration.JSON_PROPERTY_ALLOW_CREATE_DEVICES_OR_ASSETS, - Integration.JSON_PROPERTY_EDGE_TEMPLATE, Integration.JSON_PROPERTY_VERSION, Integration.JSON_PROPERTY_DEFAULT_CONVERTER_ID, Integration.JSON_PROPERTY_DOWNLINK_CONVERTER_ID, Integration.JSON_PROPERTY_ROUTING_KEY, Integration.JSON_PROPERTY_SECRET, Integration.JSON_PROPERTY_CONFIGURATION, - Integration.JSON_PROPERTY_ADDITIONAL_INFO + Integration.JSON_PROPERTY_ADDITIONAL_INFO, + Integration.JSON_PROPERTY_EDGE_TEMPLATE, + Integration.JSON_PROPERTY_REMOTE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class Integration { @@ -93,18 +93,10 @@ public class Integration { @javax.annotation.Nullable private Boolean enabled; - public static final String JSON_PROPERTY_REMOTE = "remote"; - @javax.annotation.Nullable - private Boolean remote; - public static final String JSON_PROPERTY_ALLOW_CREATE_DEVICES_OR_ASSETS = "allowCreateDevicesOrAssets"; @javax.annotation.Nullable private Boolean allowCreateDevicesOrAssets; - public static final String JSON_PROPERTY_EDGE_TEMPLATE = "edgeTemplate"; - @javax.annotation.Nullable - private Boolean edgeTemplate; - public static final String JSON_PROPERTY_VERSION = "version"; @javax.annotation.Nullable private Long version; @@ -133,6 +125,14 @@ public class Integration { @javax.annotation.Nullable private com.fasterxml.jackson.databind.JsonNode additionalInfo; + public static final String JSON_PROPERTY_EDGE_TEMPLATE = "edgeTemplate"; + @javax.annotation.Nullable + private Boolean edgeTemplate; + + public static final String JSON_PROPERTY_REMOTE = "remote"; + @javax.annotation.Nullable + private Boolean remote; + public Integration() { } @@ -320,30 +320,6 @@ public void setEnabled(@javax.annotation.Nullable Boolean enabled) { } - public Integration remote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; - return this; - } - - /** - * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core - * @return remote - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRemote() { - return remote; - } - - - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRemote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; - } - - public Integration allowCreateDevicesOrAssets(@javax.annotation.Nullable Boolean allowCreateDevicesOrAssets) { this.allowCreateDevicesOrAssets = allowCreateDevicesOrAssets; return this; @@ -368,30 +344,6 @@ public void setAllowCreateDevicesOrAssets(@javax.annotation.Nullable Boolean all } - public Integration edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; - return this; - } - - /** - * Boolean flag that specifies that is regular or edge template integration - * @return edgeTemplate - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEdgeTemplate() { - return edgeTemplate; - } - - - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; - } - - public Integration version(@javax.annotation.Nullable Long version) { this.version = version; return this; @@ -560,6 +512,54 @@ public void setAdditionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.d } + public Integration edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; + return this; + } + + /** + * Boolean flag that specifies that is regular or edge template integration + * @return edgeTemplate + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEdgeTemplate() { + return edgeTemplate; + } + + + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; + } + + + public Integration remote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; + return this; + } + + /** + * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core + * @return remote + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRemote() { + return remote; + } + + + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRemote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; + } + + /** * Return true if this Integration object is equal to o. */ @@ -580,21 +580,21 @@ public boolean equals(Object o) { Objects.equals(this.debugMode, integration.debugMode) && Objects.equals(this.debugSettings, integration.debugSettings) && Objects.equals(this.enabled, integration.enabled) && - Objects.equals(this.remote, integration.remote) && Objects.equals(this.allowCreateDevicesOrAssets, integration.allowCreateDevicesOrAssets) && - Objects.equals(this.edgeTemplate, integration.edgeTemplate) && Objects.equals(this.version, integration.version) && Objects.equals(this.defaultConverterId, integration.defaultConverterId) && Objects.equals(this.downlinkConverterId, integration.downlinkConverterId) && Objects.equals(this.routingKey, integration.routingKey) && Objects.equals(this.secret, integration.secret) && Objects.equals(this._configuration, integration._configuration) && - Objects.equals(this.additionalInfo, integration.additionalInfo); + Objects.equals(this.additionalInfo, integration.additionalInfo) && + Objects.equals(this.edgeTemplate, integration.edgeTemplate) && + Objects.equals(this.remote, integration.remote); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, remote, allowCreateDevicesOrAssets, edgeTemplate, version, defaultConverterId, downlinkConverterId, routingKey, secret, _configuration, additionalInfo); + return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, allowCreateDevicesOrAssets, version, defaultConverterId, downlinkConverterId, routingKey, secret, _configuration, additionalInfo, edgeTemplate, remote); } @Override @@ -609,9 +609,7 @@ public String toString() { sb.append(" debugMode: ").append(toIndentedString(debugMode)).append("\n"); sb.append(" debugSettings: ").append(toIndentedString(debugSettings)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append(" allowCreateDevicesOrAssets: ").append(toIndentedString(allowCreateDevicesOrAssets)).append("\n"); - sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" defaultConverterId: ").append(toIndentedString(defaultConverterId)).append("\n"); sb.append(" downlinkConverterId: ").append(toIndentedString(downlinkConverterId)).append("\n"); @@ -619,6 +617,8 @@ public String toString() { sb.append(" secret: ").append(toIndentedString(secret)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); + sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); + sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append("}"); return sb.toString(); } @@ -706,21 +706,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); } - // add `remote` to the URL query string - if (getRemote() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); - } - // add `allowCreateDevicesOrAssets` to the URL query string if (getAllowCreateDevicesOrAssets() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sallowCreateDevicesOrAssets%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAllowCreateDevicesOrAssets())))); } - // add `edgeTemplate` to the URL query string - if (getEdgeTemplate() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sedgeTemplate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEdgeTemplate())))); - } - // add `version` to the URL query string if (getVersion() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); @@ -756,6 +746,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sadditionalInfo%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInfo())))); } + // add `edgeTemplate` to the URL query string + if (getEdgeTemplate() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sedgeTemplate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEdgeTemplate())))); + } + + // add `remote` to the URL query string + if (getRemote() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); + } + return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/IntegrationInfo.java b/pe/src/main/java/org/thingsboard/client/model/IntegrationInfo.java index b87f06ee..7f818e83 100644 --- a/pe/src/main/java/org/thingsboard/client/model/IntegrationInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/IntegrationInfo.java @@ -51,12 +51,12 @@ IntegrationInfo.JSON_PROPERTY_DEBUG_MODE, IntegrationInfo.JSON_PROPERTY_DEBUG_SETTINGS, IntegrationInfo.JSON_PROPERTY_ENABLED, - IntegrationInfo.JSON_PROPERTY_REMOTE, IntegrationInfo.JSON_PROPERTY_ALLOW_CREATE_DEVICES_OR_ASSETS, - IntegrationInfo.JSON_PROPERTY_EDGE_TEMPLATE, IntegrationInfo.JSON_PROPERTY_VERSION, IntegrationInfo.JSON_PROPERTY_STATUS, - IntegrationInfo.JSON_PROPERTY_STATS + IntegrationInfo.JSON_PROPERTY_STATS, + IntegrationInfo.JSON_PROPERTY_EDGE_TEMPLATE, + IntegrationInfo.JSON_PROPERTY_REMOTE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class IntegrationInfo { @@ -92,18 +92,10 @@ public class IntegrationInfo { @javax.annotation.Nullable private Boolean enabled; - public static final String JSON_PROPERTY_REMOTE = "remote"; - @javax.annotation.Nullable - private Boolean remote; - public static final String JSON_PROPERTY_ALLOW_CREATE_DEVICES_OR_ASSETS = "allowCreateDevicesOrAssets"; @javax.annotation.Nullable private Boolean allowCreateDevicesOrAssets; - public static final String JSON_PROPERTY_EDGE_TEMPLATE = "edgeTemplate"; - @javax.annotation.Nullable - private Boolean edgeTemplate; - public static final String JSON_PROPERTY_VERSION = "version"; @javax.annotation.Nullable private Long version; @@ -115,6 +107,14 @@ public class IntegrationInfo { public static final String JSON_PROPERTY_STATS = "stats"; private JsonNullable stats = JsonNullable.of(null); + public static final String JSON_PROPERTY_EDGE_TEMPLATE = "edgeTemplate"; + @javax.annotation.Nullable + private Boolean edgeTemplate; + + public static final String JSON_PROPERTY_REMOTE = "remote"; + @javax.annotation.Nullable + private Boolean remote; + public IntegrationInfo() { } @@ -302,30 +302,6 @@ public void setEnabled(@javax.annotation.Nullable Boolean enabled) { } - public IntegrationInfo remote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; - return this; - } - - /** - * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core - * @return remote - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRemote() { - return remote; - } - - - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRemote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; - } - - public IntegrationInfo allowCreateDevicesOrAssets(@javax.annotation.Nullable Boolean allowCreateDevicesOrAssets) { this.allowCreateDevicesOrAssets = allowCreateDevicesOrAssets; return this; @@ -350,30 +326,6 @@ public void setAllowCreateDevicesOrAssets(@javax.annotation.Nullable Boolean all } - public IntegrationInfo edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; - return this; - } - - /** - * Boolean flag that specifies that is regular or edge template integration - * @return edgeTemplate - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEdgeTemplate() { - return edgeTemplate; - } - - - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; - } - - public IntegrationInfo version(@javax.annotation.Nullable Long version) { this.version = version; return this; @@ -454,6 +406,54 @@ public void setStats(@javax.annotation.Nullable Object stats) { } + public IntegrationInfo edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; + return this; + } + + /** + * Boolean flag that specifies that is regular or edge template integration + * @return edgeTemplate + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEdgeTemplate() { + return edgeTemplate; + } + + + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; + } + + + public IntegrationInfo remote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; + return this; + } + + /** + * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core + * @return remote + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRemote() { + return remote; + } + + + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRemote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; + } + + /** * Return true if this IntegrationInfo object is equal to o. */ @@ -474,12 +474,12 @@ public boolean equals(Object o) { Objects.equals(this.debugMode, integrationInfo.debugMode) && Objects.equals(this.debugSettings, integrationInfo.debugSettings) && Objects.equals(this.enabled, integrationInfo.enabled) && - Objects.equals(this.remote, integrationInfo.remote) && Objects.equals(this.allowCreateDevicesOrAssets, integrationInfo.allowCreateDevicesOrAssets) && - Objects.equals(this.edgeTemplate, integrationInfo.edgeTemplate) && Objects.equals(this.version, integrationInfo.version) && Objects.equals(this.status, integrationInfo.status) && - equalsNullable(this.stats, integrationInfo.stats); + equalsNullable(this.stats, integrationInfo.stats) && + Objects.equals(this.edgeTemplate, integrationInfo.edgeTemplate) && + Objects.equals(this.remote, integrationInfo.remote); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -488,7 +488,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, remote, allowCreateDevicesOrAssets, edgeTemplate, version, status, hashCodeNullable(stats)); + return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, allowCreateDevicesOrAssets, version, status, hashCodeNullable(stats), edgeTemplate, remote); } private static int hashCodeNullable(JsonNullable a) { @@ -510,12 +510,12 @@ public String toString() { sb.append(" debugMode: ").append(toIndentedString(debugMode)).append("\n"); sb.append(" debugSettings: ").append(toIndentedString(debugSettings)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append(" allowCreateDevicesOrAssets: ").append(toIndentedString(allowCreateDevicesOrAssets)).append("\n"); - sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" stats: ").append(toIndentedString(stats)).append("\n"); + sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); + sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append("}"); return sb.toString(); } @@ -603,21 +603,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); } - // add `remote` to the URL query string - if (getRemote() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); - } - // add `allowCreateDevicesOrAssets` to the URL query string if (getAllowCreateDevicesOrAssets() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sallowCreateDevicesOrAssets%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAllowCreateDevicesOrAssets())))); } - // add `edgeTemplate` to the URL query string - if (getEdgeTemplate() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sedgeTemplate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEdgeTemplate())))); - } - // add `version` to the URL query string if (getVersion() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); @@ -633,6 +623,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstats%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStats())))); } + // add `edgeTemplate` to the URL query string + if (getEdgeTemplate() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sedgeTemplate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEdgeTemplate())))); + } + + // add `remote` to the URL query string + if (getRemote() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); + } + return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/RelationsQueryFilter.java b/pe/src/main/java/org/thingsboard/client/model/RelationsQueryFilter.java index b36e3a13..9c17fe05 100644 --- a/pe/src/main/java/org/thingsboard/client/model/RelationsQueryFilter.java +++ b/pe/src/main/java/org/thingsboard/client/model/RelationsQueryFilter.java @@ -50,6 +50,7 @@ */ @JsonPropertyOrder({ RelationsQueryFilter.JSON_PROPERTY_ROOT_ENTITY, + RelationsQueryFilter.JSON_PROPERTY_MULTI_ROOT, RelationsQueryFilter.JSON_PROPERTY_MULTI_ROOT_ENTITIES_TYPE, RelationsQueryFilter.JSON_PROPERTY_MULTI_ROOT_ENTITY_IDS, RelationsQueryFilter.JSON_PROPERTY_DIRECTION, @@ -58,8 +59,7 @@ RelationsQueryFilter.JSON_PROPERTY_FETCH_LAST_LEVEL_ONLY, RelationsQueryFilter.JSON_PROPERTY_NEGATE, RelationsQueryFilter.JSON_PROPERTY_ROOT_STATE_ENTITY, - RelationsQueryFilter.JSON_PROPERTY_DEFAULT_STATE_ENTITY, - RelationsQueryFilter.JSON_PROPERTY_MULTI_ROOT + RelationsQueryFilter.JSON_PROPERTY_DEFAULT_STATE_ENTITY }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -73,6 +73,10 @@ public class RelationsQueryFilter extends EntityFilter { @javax.annotation.Nullable private AliasEntityId rootEntity; + public static final String JSON_PROPERTY_MULTI_ROOT = "multiRoot"; + @javax.annotation.Nullable + private Boolean multiRoot; + public static final String JSON_PROPERTY_MULTI_ROOT_ENTITIES_TYPE = "multiRootEntitiesType"; @javax.annotation.Nullable private EntityType multiRootEntitiesType; @@ -109,10 +113,6 @@ public class RelationsQueryFilter extends EntityFilter { @javax.annotation.Nullable private AliasEntityId defaultStateEntity; - public static final String JSON_PROPERTY_MULTI_ROOT = "multiRoot"; - @javax.annotation.Nullable - private Boolean multiRoot; - public RelationsQueryFilter() { } @@ -140,6 +140,30 @@ public void setRootEntity(@javax.annotation.Nullable AliasEntityId rootEntity) { } + public RelationsQueryFilter multiRoot(@javax.annotation.Nullable Boolean multiRoot) { + this.multiRoot = multiRoot; + return this; + } + + /** + * Get multiRoot + * @return multiRoot + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_MULTI_ROOT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMultiRoot() { + return multiRoot; + } + + + @JsonProperty(value = JSON_PROPERTY_MULTI_ROOT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMultiRoot(@javax.annotation.Nullable Boolean multiRoot) { + this.multiRoot = multiRoot; + } + + public RelationsQueryFilter multiRootEntitiesType(@javax.annotation.Nullable EntityType multiRootEntitiesType) { this.multiRootEntitiesType = multiRootEntitiesType; return this; @@ -373,30 +397,6 @@ public void setDefaultStateEntity(@javax.annotation.Nullable AliasEntityId defau } - public RelationsQueryFilter multiRoot(@javax.annotation.Nullable Boolean multiRoot) { - this.multiRoot = multiRoot; - return this; - } - - /** - * Get multiRoot - * @return multiRoot - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_MULTI_ROOT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMultiRoot() { - return multiRoot; - } - - - @JsonProperty(value = JSON_PROPERTY_MULTI_ROOT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMultiRoot(@javax.annotation.Nullable Boolean multiRoot) { - this.multiRoot = multiRoot; - } - - @Override public RelationsQueryFilter type(@javax.annotation.Nonnull String type) { this.setType(type); @@ -416,6 +416,7 @@ public boolean equals(Object o) { } RelationsQueryFilter relationsQueryFilter = (RelationsQueryFilter) o; return Objects.equals(this.rootEntity, relationsQueryFilter.rootEntity) && + Objects.equals(this.multiRoot, relationsQueryFilter.multiRoot) && Objects.equals(this.multiRootEntitiesType, relationsQueryFilter.multiRootEntitiesType) && Objects.equals(this.multiRootEntityIds, relationsQueryFilter.multiRootEntityIds) && Objects.equals(this.direction, relationsQueryFilter.direction) && @@ -425,13 +426,12 @@ public boolean equals(Object o) { Objects.equals(this.negate, relationsQueryFilter.negate) && Objects.equals(this.rootStateEntity, relationsQueryFilter.rootStateEntity) && Objects.equals(this.defaultStateEntity, relationsQueryFilter.defaultStateEntity) && - Objects.equals(this.multiRoot, relationsQueryFilter.multiRoot) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(rootEntity, multiRootEntitiesType, multiRootEntityIds, direction, filters, maxLevel, fetchLastLevelOnly, negate, rootStateEntity, defaultStateEntity, multiRoot, super.hashCode()); + return Objects.hash(rootEntity, multiRoot, multiRootEntitiesType, multiRootEntityIds, direction, filters, maxLevel, fetchLastLevelOnly, negate, rootStateEntity, defaultStateEntity, super.hashCode()); } @Override @@ -440,6 +440,7 @@ public String toString() { sb.append("class RelationsQueryFilter {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" rootEntity: ").append(toIndentedString(rootEntity)).append("\n"); + sb.append(" multiRoot: ").append(toIndentedString(multiRoot)).append("\n"); sb.append(" multiRootEntitiesType: ").append(toIndentedString(multiRootEntitiesType)).append("\n"); sb.append(" multiRootEntityIds: ").append(toIndentedString(multiRootEntityIds)).append("\n"); sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); @@ -449,7 +450,6 @@ public String toString() { sb.append(" negate: ").append(toIndentedString(negate)).append("\n"); sb.append(" rootStateEntity: ").append(toIndentedString(rootStateEntity)).append("\n"); sb.append(" defaultStateEntity: ").append(toIndentedString(defaultStateEntity)).append("\n"); - sb.append(" multiRoot: ").append(toIndentedString(multiRoot)).append("\n"); sb.append("}"); return sb.toString(); } @@ -507,6 +507,11 @@ public String toUrlQueryString(String prefix) { joiner.add(getRootEntity().toUrlQueryString(prefix + "rootEntity" + suffix)); } + // add `multiRoot` to the URL query string + if (getMultiRoot() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smultiRoot%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMultiRoot())))); + } + // add `multiRootEntitiesType` to the URL query string if (getMultiRootEntitiesType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%smultiRootEntitiesType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMultiRootEntitiesType())))); @@ -563,11 +568,6 @@ public String toUrlQueryString(String prefix) { joiner.add(getDefaultStateEntity().toUrlQueryString(prefix + "defaultStateEntity" + suffix)); } - // add `multiRoot` to the URL query string - if (getMultiRoot() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smultiRoot%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMultiRoot())))); - } - return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/ShortCustomerInfo.java b/pe/src/main/java/org/thingsboard/client/model/ShortCustomerInfo.java index b0ddff99..29e76e12 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ShortCustomerInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/ShortCustomerInfo.java @@ -38,8 +38,7 @@ @JsonPropertyOrder({ ShortCustomerInfo.JSON_PROPERTY_CUSTOMER_ID, ShortCustomerInfo.JSON_PROPERTY_TITLE, - ShortCustomerInfo.JSON_PROPERTY_IS_PUBLIC, - ShortCustomerInfo.JSON_PROPERTY_PUBLIC + ShortCustomerInfo.JSON_PROPERTY_IS_PUBLIC }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class ShortCustomerInfo { @@ -55,10 +54,6 @@ public class ShortCustomerInfo { @javax.annotation.Nullable private Boolean isPublic; - public static final String JSON_PROPERTY_PUBLIC = "public"; - @javax.annotation.Nullable - private Boolean _public; - public ShortCustomerInfo() { } @@ -116,7 +111,7 @@ public ShortCustomerInfo isPublic(@javax.annotation.Nullable Boolean isPublic) { } /** - * Get isPublic + * Indicates special 'Public' customer used to embed dashboards on public websites. * @return isPublic */ @javax.annotation.Nullable @@ -134,30 +129,6 @@ public void setIsPublic(@javax.annotation.Nullable Boolean isPublic) { } - public ShortCustomerInfo _public(@javax.annotation.Nullable Boolean _public) { - this._public = _public; - return this; - } - - /** - * Get _public - * @return _public - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PUBLIC, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPublic() { - return _public; - } - - - @JsonProperty(value = JSON_PROPERTY_PUBLIC, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPublic(@javax.annotation.Nullable Boolean _public) { - this._public = _public; - } - - /** * Return true if this ShortCustomerInfo object is equal to o. */ @@ -172,13 +143,12 @@ public boolean equals(Object o) { ShortCustomerInfo shortCustomerInfo = (ShortCustomerInfo) o; return Objects.equals(this.customerId, shortCustomerInfo.customerId) && Objects.equals(this.title, shortCustomerInfo.title) && - Objects.equals(this.isPublic, shortCustomerInfo.isPublic) && - Objects.equals(this._public, shortCustomerInfo._public); + Objects.equals(this.isPublic, shortCustomerInfo.isPublic); } @Override public int hashCode() { - return Objects.hash(customerId, title, isPublic, _public); + return Objects.hash(customerId, title, isPublic); } @Override @@ -188,7 +158,6 @@ public String toString() { sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" isPublic: ").append(toIndentedString(isPublic)).append("\n"); - sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); sb.append("}"); return sb.toString(); } @@ -251,11 +220,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sisPublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsPublic())))); } - // add `public` to the URL query string - if (getPublic() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%spublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublic())))); - } - return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/SystemInfo.java b/pe/src/main/java/org/thingsboard/client/model/SystemInfo.java index d8d55c47..212fbf8e 100644 --- a/pe/src/main/java/org/thingsboard/client/model/SystemInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/SystemInfo.java @@ -92,7 +92,7 @@ public SystemInfo monolith(@javax.annotation.Nullable Boolean monolith) { } /** - * Get monolith + * Is monolith. * @return monolith */ @javax.annotation.Nullable From 64f7313fd86b6e93a1d918c7803836bb9b3eea5f Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Fri, 13 Mar 2026 14:17:44 +0200 Subject: [PATCH 7/8] regenerated clients --- ce/docs/Alarm.md | 2 +- ce/docs/AlarmData.md | 2 +- ce/docs/AlarmInfo.md | 2 +- ce/docs/ApiKeyControllerApi.md | 2 +- ce/docs/AuditLog.md | 2 +- ce/docs/CalculatedField.md | 1 + ce/docs/CalculatedFieldDebugEventFilter.md | 11 +- ce/docs/CalculatedFieldInfo.md | 1 + ce/docs/Dashboard.md | 10 +- ce/docs/DeviceControllerApi.md | 4 +- ce/docs/EdgeEventType.md | 2 + .../EntitiesVersionControlControllerApi.md | 2 +- ce/docs/EventInfo.md | 2 +- ce/docs/OtaPackage.md | 2 +- ce/docs/OtaPackageData.md | 29 -- ce/docs/RuleChainDebugEventFilter.md | 11 +- ce/docs/RuleNodeDebugEventFilter.md | 11 +- ce/spec/openapi.json | 179 ++++--- .../client/api/ThingsboardApi.java | 32 +- .../org/thingsboard/client/model/Alarm.java | 4 +- .../thingsboard/client/model/AlarmData.java | 78 +-- .../thingsboard/client/model/AlarmInfo.java | 78 +-- .../thingsboard/client/model/AuditLog.java | 12 +- .../client/model/CalculatedField.java | 42 +- .../CalculatedFieldDebugEventFilter.java | 147 +++--- .../client/model/CalculatedFieldInfo.java | 38 +- .../thingsboard/client/model/Dashboard.java | 342 +++++++------- .../client/model/EdgeEventType.java | 4 +- .../thingsboard/client/model/EventInfo.java | 14 +- .../thingsboard/client/model/OtaPackage.java | 15 +- .../client/model/OtaPackageData.java | 405 ---------------- .../model/RuleChainDebugEventFilter.java | 147 +++--- .../model/RuleNodeDebugEventFilter.java | 147 +++--- paas/docs/Alarm.md | 2 +- paas/docs/AlarmData.md | 2 +- paas/docs/AlarmInfo.md | 2 +- paas/docs/ApiKeyControllerApi.md | 2 +- paas/docs/Asset.md | 2 +- paas/docs/AssetInfo.md | 2 +- paas/docs/AuditLog.md | 2 +- paas/docs/BlobEntityInfo.md | 2 +- paas/docs/BlobEntityWithCustomerInfo.md | 2 +- paas/docs/CalculatedField.md | 1 + paas/docs/CalculatedFieldDebugEventFilter.md | 11 +- paas/docs/CalculatedFieldInfo.md | 1 + paas/docs/Customer.md | 2 +- paas/docs/CustomerInfo.md | 2 +- paas/docs/Dashboard.md | 14 +- paas/docs/DashboardInfo.md | 14 +- paas/docs/DebugConverterEventFilter.md | 11 +- paas/docs/DebugIntegrationEventFilter.md | 11 +- paas/docs/Device.md | 2 +- paas/docs/DeviceControllerApi.md | 4 +- paas/docs/DeviceInfo.md | 2 +- paas/docs/Domain.md | 2 +- paas/docs/DomainInfo.md | 2 +- paas/docs/Edge.md | 2 +- paas/docs/EdgeEventType.md | 2 + paas/docs/EdgeInfo.md | 2 +- .../EntitiesVersionControlControllerApi.md | 2 +- paas/docs/EntityView.md | 2 +- paas/docs/EntityViewInfo.md | 2 +- paas/docs/EventInfo.md | 2 +- paas/docs/OAuth2Client.md | 2 +- paas/docs/OtaPackage.md | 2 +- paas/docs/OtaPackageData.md | 29 -- paas/docs/Report.md | 2 +- paas/docs/ReportInfo.md | 2 +- paas/docs/ReportTemplate.md | 2 +- paas/docs/ReportTemplateInfo.md | 2 +- paas/docs/Role.md | 2 +- paas/docs/RuleChainDebugEventFilter.md | 11 +- paas/docs/RuleNodeDebugEventFilter.md | 11 +- paas/docs/ScheduledReportInfo.md | 4 +- paas/docs/SchedulerEvent.md | 4 +- paas/docs/SchedulerEventInfo.md | 4 +- paas/docs/SchedulerEventWithCustomerInfo.md | 4 +- paas/docs/ShortEntityView.md | 2 +- paas/docs/User.md | 2 +- paas/docs/UserInfo.md | 2 +- paas/spec/openapi.json | 398 ++++++++-------- .../client/api/ThingsboardApi.java | 32 +- .../org/thingsboard/client/model/Alarm.java | 4 +- .../thingsboard/client/model/AlarmData.java | 78 +-- .../thingsboard/client/model/AlarmInfo.java | 78 +-- .../org/thingsboard/client/model/Asset.java | 14 +- .../thingsboard/client/model/AssetInfo.java | 14 +- .../thingsboard/client/model/AuditLog.java | 12 +- .../client/model/BlobEntityInfo.java | 14 +- .../model/BlobEntityWithCustomerInfo.java | 14 +- .../client/model/CalculatedField.java | 42 +- .../CalculatedFieldDebugEventFilter.java | 147 +++--- .../client/model/CalculatedFieldInfo.java | 38 +- .../thingsboard/client/model/Customer.java | 14 +- .../client/model/CustomerInfo.java | 14 +- .../thingsboard/client/model/Dashboard.java | 404 ++++++++-------- .../client/model/DashboardInfo.java | 444 +++++++++--------- .../model/DebugConverterEventFilter.java | 147 +++--- .../model/DebugIntegrationEventFilter.java | 147 +++--- .../org/thingsboard/client/model/Device.java | 14 +- .../thingsboard/client/model/DeviceInfo.java | 14 +- .../org/thingsboard/client/model/Domain.java | 14 +- .../thingsboard/client/model/DomainInfo.java | 14 +- .../org/thingsboard/client/model/Edge.java | 14 +- .../client/model/EdgeEventType.java | 4 +- .../thingsboard/client/model/EdgeInfo.java | 14 +- .../thingsboard/client/model/EntityView.java | 14 +- .../client/model/EntityViewInfo.java | 14 +- .../thingsboard/client/model/EventInfo.java | 14 +- .../client/model/OAuth2Client.java | 14 +- .../thingsboard/client/model/OtaPackage.java | 15 +- .../client/model/OtaPackageData.java | 405 ---------------- .../org/thingsboard/client/model/Report.java | 14 +- .../thingsboard/client/model/ReportInfo.java | 14 +- .../client/model/ReportTemplate.java | 14 +- .../client/model/ReportTemplateInfo.java | 14 +- .../org/thingsboard/client/model/Role.java | 14 +- .../model/RuleChainDebugEventFilter.java | 147 +++--- .../model/RuleNodeDebugEventFilter.java | 147 +++--- .../client/model/ScheduledReportInfo.java | 26 +- .../client/model/SchedulerEvent.java | 26 +- .../client/model/SchedulerEventInfo.java | 26 +- .../model/SchedulerEventWithCustomerInfo.java | 26 +- .../client/model/ShortEntityView.java | 12 +- .../org/thingsboard/client/model/User.java | 14 +- .../thingsboard/client/model/UserInfo.java | 14 +- pe/docs/Alarm.md | 2 +- pe/docs/AlarmData.md | 2 +- pe/docs/AlarmInfo.md | 2 +- pe/docs/ApiKeyControllerApi.md | 2 +- pe/docs/Asset.md | 2 +- pe/docs/AssetInfo.md | 2 +- pe/docs/AuditLog.md | 2 +- pe/docs/BlobEntityInfo.md | 2 +- pe/docs/BlobEntityWithCustomerInfo.md | 2 +- pe/docs/CalculatedField.md | 1 + pe/docs/CalculatedFieldDebugEventFilter.md | 11 +- pe/docs/CalculatedFieldInfo.md | 1 + pe/docs/Customer.md | 2 +- pe/docs/CustomerInfo.md | 2 +- pe/docs/Dashboard.md | 14 +- pe/docs/DashboardInfo.md | 14 +- pe/docs/DebugConverterEventFilter.md | 11 +- pe/docs/DebugIntegrationEventFilter.md | 11 +- pe/docs/Device.md | 2 +- pe/docs/DeviceControllerApi.md | 4 +- pe/docs/DeviceInfo.md | 2 +- pe/docs/Domain.md | 2 +- pe/docs/DomainInfo.md | 2 +- pe/docs/Edge.md | 2 +- pe/docs/EdgeEventType.md | 2 + pe/docs/EdgeInfo.md | 2 +- .../EntitiesVersionControlControllerApi.md | 2 +- pe/docs/EntityView.md | 2 +- pe/docs/EntityViewInfo.md | 2 +- pe/docs/EventInfo.md | 2 +- pe/docs/OAuth2Client.md | 2 +- pe/docs/OtaPackage.md | 2 +- pe/docs/OtaPackageData.md | 29 -- pe/docs/Report.md | 2 +- pe/docs/ReportInfo.md | 2 +- pe/docs/ReportTemplate.md | 2 +- pe/docs/ReportTemplateInfo.md | 2 +- pe/docs/Role.md | 2 +- pe/docs/RuleChainDebugEventFilter.md | 11 +- pe/docs/RuleNodeDebugEventFilter.md | 11 +- pe/docs/ScheduledReportInfo.md | 4 +- pe/docs/SchedulerEvent.md | 4 +- pe/docs/SchedulerEventInfo.md | 4 +- pe/docs/SchedulerEventWithCustomerInfo.md | 4 +- pe/docs/ShortEntityView.md | 2 +- pe/docs/User.md | 2 +- pe/docs/UserInfo.md | 2 +- pe/spec/openapi.json | 398 ++++++++-------- .../client/api/ThingsboardApi.java | 32 +- .../org/thingsboard/client/model/Alarm.java | 4 +- .../thingsboard/client/model/AlarmData.java | 78 +-- .../thingsboard/client/model/AlarmInfo.java | 78 +-- .../org/thingsboard/client/model/Asset.java | 14 +- .../thingsboard/client/model/AssetInfo.java | 14 +- .../thingsboard/client/model/AuditLog.java | 12 +- .../client/model/BlobEntityInfo.java | 14 +- .../model/BlobEntityWithCustomerInfo.java | 14 +- .../client/model/CalculatedField.java | 42 +- .../CalculatedFieldDebugEventFilter.java | 147 +++--- .../client/model/CalculatedFieldInfo.java | 38 +- .../thingsboard/client/model/Customer.java | 14 +- .../client/model/CustomerInfo.java | 14 +- .../thingsboard/client/model/Dashboard.java | 404 ++++++++-------- .../client/model/DashboardInfo.java | 444 +++++++++--------- .../model/DebugConverterEventFilter.java | 147 +++--- .../model/DebugIntegrationEventFilter.java | 147 +++--- .../org/thingsboard/client/model/Device.java | 14 +- .../thingsboard/client/model/DeviceInfo.java | 14 +- .../org/thingsboard/client/model/Domain.java | 14 +- .../thingsboard/client/model/DomainInfo.java | 14 +- .../org/thingsboard/client/model/Edge.java | 14 +- .../client/model/EdgeEventType.java | 4 +- .../thingsboard/client/model/EdgeInfo.java | 14 +- .../thingsboard/client/model/EntityView.java | 14 +- .../client/model/EntityViewInfo.java | 14 +- .../thingsboard/client/model/EventInfo.java | 14 +- .../client/model/OAuth2Client.java | 14 +- .../thingsboard/client/model/OtaPackage.java | 15 +- .../client/model/OtaPackageData.java | 405 ---------------- .../org/thingsboard/client/model/Report.java | 14 +- .../thingsboard/client/model/ReportInfo.java | 14 +- .../client/model/ReportTemplate.java | 14 +- .../client/model/ReportTemplateInfo.java | 14 +- .../org/thingsboard/client/model/Role.java | 14 +- .../model/RuleChainDebugEventFilter.java | 147 +++--- .../model/RuleNodeDebugEventFilter.java | 147 +++--- .../client/model/ScheduledReportInfo.java | 26 +- .../client/model/SchedulerEvent.java | 26 +- .../client/model/SchedulerEventInfo.java | 26 +- .../model/SchedulerEventWithCustomerInfo.java | 26 +- .../client/model/ShortEntityView.java | 12 +- .../org/thingsboard/client/model/User.java | 14 +- .../thingsboard/client/model/UserInfo.java | 14 +- 219 files changed, 3446 insertions(+), 4984 deletions(-) delete mode 100644 ce/docs/OtaPackageData.md delete mode 100644 ce/src/main/java/org/thingsboard/client/model/OtaPackageData.java delete mode 100644 paas/docs/OtaPackageData.md delete mode 100644 paas/src/main/java/org/thingsboard/client/model/OtaPackageData.java delete mode 100644 pe/docs/OtaPackageData.md delete mode 100644 pe/src/main/java/org/thingsboard/client/model/OtaPackageData.java diff --git a/ce/docs/Alarm.md b/ce/docs/Alarm.md index 60f4df57..604b271f 100644 --- a/ce/docs/Alarm.md +++ b/ce/docs/Alarm.md @@ -20,7 +20,7 @@ | **ackTs** | **Long** | Timestamp of the alarm acknowledgement, in milliseconds | [optional] | | **clearTs** | **Long** | Timestamp of the alarm clearing, in milliseconds | [optional] | | **assignTs** | **Long** | Timestamp of the alarm assignment, in milliseconds | [optional] | -| **details** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | +| **details** | **com.fasterxml.jackson.databind.JsonNode** | JSON object with alarm details | [optional] | | **propagate** | **Boolean** | Propagation flag to specify if alarm should be propagated to parent entities of alarm originator | [optional] | | **propagateToOwner** | **Boolean** | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator | [optional] | | **propagateToTenant** | **Boolean** | Propagation flag to specify if alarm should be propagated to the tenant entity | [optional] | diff --git a/ce/docs/AlarmData.md b/ce/docs/AlarmData.md index ce06f3c2..fdca78f2 100644 --- a/ce/docs/AlarmData.md +++ b/ce/docs/AlarmData.md @@ -24,6 +24,7 @@ | **ackTs** | **Long** | Timestamp of the alarm acknowledgement, in milliseconds | [optional] | | **clearTs** | **Long** | Timestamp of the alarm clearing, in milliseconds | [optional] | | **assignTs** | **Long** | Timestamp of the alarm assignment, in milliseconds | [optional] | +| **details** | **com.fasterxml.jackson.databind.JsonNode** | JSON object with alarm details | [optional] | | **propagate** | **Boolean** | Propagation flag to specify if alarm should be propagated to parent entities of alarm originator | [optional] | | **propagateToOwner** | **Boolean** | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator | [optional] | | **propagateToTenant** | **Boolean** | Propagation flag to specify if alarm should be propagated to the tenant entity | [optional] | @@ -34,7 +35,6 @@ | **assignee** | **AlarmAssignee** | Alarm assignee | [optional] | | **name** | **String** | representing type of the Alarm | [readonly] | | **status** | **AlarmStatus** | status of the Alarm | [readonly] | -| **details** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | diff --git a/ce/docs/AlarmInfo.md b/ce/docs/AlarmInfo.md index 0dce6007..98879988 100644 --- a/ce/docs/AlarmInfo.md +++ b/ce/docs/AlarmInfo.md @@ -22,6 +22,7 @@ | **ackTs** | **Long** | Timestamp of the alarm acknowledgement, in milliseconds | [optional] | | **clearTs** | **Long** | Timestamp of the alarm clearing, in milliseconds | [optional] | | **assignTs** | **Long** | Timestamp of the alarm assignment, in milliseconds | [optional] | +| **details** | **com.fasterxml.jackson.databind.JsonNode** | JSON object with alarm details | [optional] | | **propagate** | **Boolean** | Propagation flag to specify if alarm should be propagated to parent entities of alarm originator | [optional] | | **propagateToOwner** | **Boolean** | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator | [optional] | | **propagateToTenant** | **Boolean** | Propagation flag to specify if alarm should be propagated to the tenant entity | [optional] | @@ -32,7 +33,6 @@ | **assignee** | **AlarmAssignee** | Alarm assignee | [optional] | | **name** | **String** | representing type of the Alarm | [readonly] | | **status** | **AlarmStatus** | status of the Alarm | [readonly] | -| **details** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | diff --git a/ce/docs/ApiKeyControllerApi.md b/ce/docs/ApiKeyControllerApi.md index e3405f9f..92b3a76c 100644 --- a/ce/docs/ApiKeyControllerApi.md +++ b/ce/docs/ApiKeyControllerApi.md @@ -99,7 +99,7 @@ ApiKey saveApiKey(@Nonnull ApiKeyInfo apiKeyInfo) Save API key for user (saveApiKey) -Creates an API key for the given user and returns the token ONCE as 'ApiKey '. Available for any authorized user. +Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'. Available for any authorized user. ### Parameters diff --git a/ce/docs/AuditLog.md b/ce/docs/AuditLog.md index 27d4f603..06d9da33 100644 --- a/ce/docs/AuditLog.md +++ b/ce/docs/AuditLog.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the auditLog creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **entityId** | **EntityId** | JSON object with Entity id | [optional] | +| **entityId** | **EntityId** | JSON object with Entity id | [optional] [readonly] | | **entityName** | **String** | Name of the logged entity | [optional] [readonly] | | **userId** | **UserId** | JSON object with User id. | [optional] [readonly] | | **userName** | **String** | Unique user name(email) of the user that performed some action on logged entity | [optional] [readonly] | diff --git a/ce/docs/CalculatedField.md b/ce/docs/CalculatedField.md index 8a87b153..9241417f 100644 --- a/ce/docs/CalculatedField.md +++ b/ce/docs/CalculatedField.md @@ -18,6 +18,7 @@ | **configurationVersion** | **Integer** | Version of calculated field configuration. | [optional] | | **_configuration** | **CalculatedFieldConfiguration** | | | | **version** | **Long** | | [optional] | +| **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the calculated field | [optional] | diff --git a/ce/docs/CalculatedFieldDebugEventFilter.md b/ce/docs/CalculatedFieldDebugEventFilter.md index 4654cee1..23b34fed 100644 --- a/ce/docs/CalculatedFieldDebugEventFilter.md +++ b/ce/docs/CalculatedFieldDebugEventFilter.md @@ -10,6 +10,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **server** | **String** | String value representing the server name, identifier or ip address where the platform is running | [optional] | +| **isError** | **IsErrorEnum** | Boolean value to filter the errors | [optional] | | **errorStr** | **String** | The case insensitive 'contains' filter based on error message | [optional] | | **entityId** | **String** | String value representing the entity id in the event body | [optional] | | **entityType** | **EntityTypeEnum** | String value representing the entity type | [optional] | @@ -17,8 +18,14 @@ | **msgType** | **String** | String value representing the message type | [optional] | | **arguments** | **String** | String value representing the arguments that were used in the calculation performed | [optional] | | **result** | **String** | String value representing the result of a calculation | [optional] | -| **error** | **Boolean** | | [optional] | -| **isError** | **Boolean** | | [optional] | + + +### Enum: IsErrorEnum + +| Name | Value | +|---- | -----| +| FALSE | "false" | +| TRUE | "true" | ### Enum: EntityTypeEnum diff --git a/ce/docs/CalculatedFieldInfo.md b/ce/docs/CalculatedFieldInfo.md index 5477bbac..1996771b 100644 --- a/ce/docs/CalculatedFieldInfo.md +++ b/ce/docs/CalculatedFieldInfo.md @@ -18,6 +18,7 @@ | **configurationVersion** | **Integer** | Version of calculated field configuration. | [optional] | | **_configuration** | **CalculatedFieldConfiguration** | | | | **version** | **Long** | | [optional] | +| **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the calculated field | [optional] | | **entityName** | **String** | | [optional] | diff --git a/ce/docs/Dashboard.md b/ce/docs/Dashboard.md index 31fea1ad..689b1919 100644 --- a/ce/docs/Dashboard.md +++ b/ce/docs/Dashboard.md @@ -7,17 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **id** | **DashboardId** | JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. | [optional] | +| **createdTime** | **Long** | Timestamp of the dashboard creation, in milliseconds | [optional] [readonly] | +| **tenantId** | **TenantId** | JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. | [optional] [readonly] | | **title** | **String** | Title of the dashboard. | | +| **name** | **String** | Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. | [optional] [readonly] | | **image** | **String** | Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. | [optional] [readonly] | | **mobileHide** | **Boolean** | Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. | [optional] [readonly] | | **mobileOrder** | **Integer** | Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications | [optional] [readonly] | +| **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON. | [optional] | -| **name** | **String** | Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. | [optional] [readonly] | | **resources** | **List\** | | [optional] | -| **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | -| **createdTime** | **Long** | Timestamp of the dashboard creation, in milliseconds | [optional] [readonly] | -| **id** | **DashboardId** | JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. | [optional] | -| **tenantId** | **TenantId** | JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. | [optional] [readonly] | | **version** | **Long** | | [optional] | diff --git a/ce/docs/DeviceControllerApi.md b/ce/docs/DeviceControllerApi.md index edd6c273..fce6ed2a 100644 --- a/ce/docs/DeviceControllerApi.md +++ b/ce/docs/DeviceControllerApi.md @@ -608,7 +608,7 @@ Device saveDeviceWithCredentials(@Nonnull SaveDeviceWithCredentialsRequest saveD Create Device (saveDevice) with credentials -Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: \"Access token\" with device profile ID below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: \"Access token\" with device profile default below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: \"X509\" with device profile ID below: Note: credentialsId - format Sha3Hash, certificateValue - format PEM (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: \"MQTT_BASIC\" with device profile ID below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of LwM2M device and RPK credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. +Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: **\"Access token\"** with **device profile default** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. ### Parameters @@ -684,7 +684,7 @@ DeviceCredentials updateDeviceCredentials(@Nonnull DeviceCredentials deviceCrede Update device credentials (updateDeviceCredentials) -During device creation, platform generates random 'ACCESS_TOKEN' credentials. \" + Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: \"Access token\" with device ID and with device ID below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: \"X509\" with device profile ID below: Note: credentialsId - format Sha3Hash, certificateValue - format PEM (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: \"MQTT_BASIC\" with device profile ID below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of LwM2M device and RPK credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. +During device creation, platform generates random 'ACCESS_TOKEN' credentials. \" + Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. ### Parameters diff --git a/ce/docs/EdgeEventType.md b/ce/docs/EdgeEventType.md index 9e14fbb5..44f114dc 100644 --- a/ce/docs/EdgeEventType.md +++ b/ce/docs/EdgeEventType.md @@ -64,6 +64,8 @@ * `AI_MODEL` (value: `"AI_MODEL"`) +* `API_KEY` (value: `"API_KEY"`) + --- diff --git a/ce/docs/EntitiesVersionControlControllerApi.md b/ce/docs/EntitiesVersionControlControllerApi.md index 8e5b281f..a7630f06 100644 --- a/ce/docs/EntitiesVersionControlControllerApi.md +++ b/ce/docs/EntitiesVersionControlControllerApi.md @@ -224,7 +224,7 @@ PageDataEntityVersion listEntityVersions(@Nonnull EntityType entityType, @Nonnul List entity versions (listEntityVersions) -Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe \" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe \" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe \" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. +Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe (johndoe@gmail.com)\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. ### Parameters diff --git a/ce/docs/EventInfo.md b/ce/docs/EventInfo.md index f9940f61..2af98e01 100644 --- a/ce/docs/EventInfo.md +++ b/ce/docs/EventInfo.md @@ -12,7 +12,7 @@ | **tenantId** | **TenantId** | JSON object with Tenant Id. | [optional] [readonly] | | **type** | **String** | Event type | [optional] | | **uid** | **String** | string | [optional] | -| **entityId** | **EntityId** | JSON object with Entity Id for which event is created. | [optional] | +| **entityId** | **EntityId** | JSON object with Entity Id for which event is created. | [optional] [readonly] | | **body** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | diff --git a/ce/docs/OtaPackage.md b/ce/docs/OtaPackage.md index cc8265e1..170f261a 100644 --- a/ce/docs/OtaPackage.md +++ b/ce/docs/OtaPackage.md @@ -22,7 +22,7 @@ | **checksumAlgorithm** | **ChecksumAlgorithm** | OTA Package checksum algorithm. | [optional] [readonly] | | **checksum** | **String** | OTA Package checksum. | [optional] [readonly] | | **dataSize** | **Long** | OTA Package data size. | [optional] [readonly] | -| **data** | **OtaPackageData** | | [optional] | +| **data** | **byte[]** | | [optional] | | **name** | **String** | | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | OTA Package description. | [optional] | diff --git a/ce/docs/OtaPackageData.md b/ce/docs/OtaPackageData.md deleted file mode 100644 index 1acf91c1..00000000 --- a/ce/docs/OtaPackageData.md +++ /dev/null @@ -1,29 +0,0 @@ - -# OtaPackageData - -`org.thingsboard.client.model.OtaPackageData` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **_char** | **String** | | [optional] | -| **direct** | **Boolean** | | [optional] | -| **_double** | **Double** | | [optional] | -| **_float** | **Float** | | [optional] | -| **_int** | **Integer** | | [optional] | -| **_long** | **Long** | | [optional] | -| **readOnly** | **Boolean** | | [optional] | -| **_short** | **Integer** | | [optional] | - - - ---- - -### Conventions - -- **Package:** `org.thingsboard.client.model` -- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` -- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` -- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions - diff --git a/ce/docs/RuleChainDebugEventFilter.md b/ce/docs/RuleChainDebugEventFilter.md index 9ace52e2..3c5d9cd3 100644 --- a/ce/docs/RuleChainDebugEventFilter.md +++ b/ce/docs/RuleChainDebugEventFilter.md @@ -10,10 +10,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **server** | **String** | String value representing the server name, identifier or ip address where the platform is running | [optional] | +| **isError** | **IsErrorEnum** | Boolean value to filter the errors | [optional] | | **errorStr** | **String** | The case insensitive 'contains' filter based on error message | [optional] | | **message** | **String** | String value representing the message | [optional] | -| **error** | **Boolean** | | [optional] | -| **isError** | **Boolean** | | [optional] | + + +### Enum: IsErrorEnum + +| Name | Value | +|---- | -----| +| FALSE | "false" | +| TRUE | "true" | diff --git a/ce/docs/RuleNodeDebugEventFilter.md b/ce/docs/RuleNodeDebugEventFilter.md index 6791375f..84b36f06 100644 --- a/ce/docs/RuleNodeDebugEventFilter.md +++ b/ce/docs/RuleNodeDebugEventFilter.md @@ -10,6 +10,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **server** | **String** | String value representing the server name, identifier or ip address where the platform is running | [optional] | +| **isError** | **IsErrorEnum** | Boolean value to filter the errors | [optional] | | **errorStr** | **String** | The case insensitive 'contains' filter based on error message | [optional] | | **msgDirectionType** | **MsgDirectionTypeEnum** | String value representing msg direction type (incoming to entity or outcoming from entity) | [optional] | | **entityId** | **String** | String value representing the entity id in the event body (originator of the message) | [optional] | @@ -19,8 +20,14 @@ | **relationType** | **String** | String value representing the type of message routing | [optional] | | **dataSearch** | **String** | The case insensitive 'contains' filter based on data (key and value) for the message. | [optional] | | **metadataSearch** | **String** | The case insensitive 'contains' filter based on metadata (key and value) for the message. | [optional] | -| **error** | **Boolean** | | [optional] | -| **isError** | **Boolean** | | [optional] | + + +### Enum: IsErrorEnum + +| Name | Value | +|---- | -----| +| FALSE | "false" | +| TRUE | "true" | ### Enum: MsgDirectionTypeEnum diff --git a/ce/spec/openapi.json b/ce/spec/openapi.json index 26eb736d..30b87b0a 100644 --- a/ce/spec/openapi.json +++ b/ce/spec/openapi.json @@ -7498,7 +7498,7 @@ "api-key-controller" ], "summary": "Save API key for user (saveApiKey)", - "description": "Creates an API key for the given user and returns the token ONCE as 'ApiKey \u003Cvalue\u003E'.\n\nAvailable for any authorized user. ", + "description": "Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'.\n\nAvailable for any authorized user. ", "operationId": "saveApiKey", "requestBody": { "content": { @@ -25551,7 +25551,7 @@ "device-controller" ], "summary": "Create Device (saveDevice) with credentials ", - "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile default\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"X509\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\nNote: \u003Cb\u003EcredentialsId\u003C/b\u003E - format \u003Cb\u003ESha3Hash\u003C/b\u003E, \u003Cb\u003EcertificateValue\u003C/b\u003E - format \u003Cb\u003EPEM\u003C/b\u003E (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"MQTT_BASIC\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of \u003Cb\u003ELwM2M\u003C/b\u003E device and \u003Cb\u003ERPK\u003C/b\u003E credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: **\"Access token\"** with **device profile ID** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: **\"Access token\"** with **device profile default** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: **\"X509\"** with **device profile ID** below: \n\nNote: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of **LwM2M** device and **RPK** credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", "operationId": "saveDeviceWithCredentials", "parameters": [ { @@ -25873,7 +25873,7 @@ "device-controller" ], "summary": "Update device credentials (updateDeviceCredentials)", - "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials. \" +\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice ID\u003C/b\u003E and with \u003Cb\u003Edevice ID\u003C/b\u003E below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: \u003Cb\u003E\"X509\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\nNote: \u003Cb\u003EcredentialsId\u003C/b\u003E - format \u003Cb\u003ESha3Hash\u003C/b\u003E, \u003Cb\u003EcertificateValue\u003C/b\u003E - format \u003Cb\u003EPEM\u003C/b\u003E (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: \u003Cb\u003E\"MQTT_BASIC\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of \u003Cb\u003ELwM2M\u003C/b\u003E device and \u003Cb\u003ERPK\u003C/b\u003E credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -\u003E \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials. \" +\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: **\"X509\"** with **device profile ID** below: \n\nNote: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of **LwM2M** device and **RPK** credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -\u003E \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", "operationId": "updateDeviceCredentials", "requestBody": { "content": { @@ -36799,7 +36799,7 @@ "entities-version-control-controller" ], "summary": "List entity versions (listEntityVersions)", - "description": "Returns list of versions for a specific entity in a concrete branch. \nYou need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. \nIf specified branch does not exist - empty page data will be returned. \n\nEach version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "description": "Returns list of versions for a specific entity in a concrete branch. \nYou need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. \nIf specified branch does not exist - empty page data will be returned. \n\nEach version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", "operationId": "listEntityVersions", "parameters": [ { @@ -82560,7 +82560,8 @@ "example": 1634115928465 }, "details": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with alarm details" }, "propagate": { "type": "boolean", @@ -83249,6 +83250,10 @@ "description": "Timestamp of the alarm assignment, in milliseconds", "example": 1634115928465 }, + "details": { + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with alarm details" + }, "propagate": { "type": "boolean", "description": "Propagation flag to specify if alarm should be propagated to parent entities of alarm originator", @@ -83301,9 +83306,6 @@ "description": "status of the Alarm", "example": "ACTIVE_UNACK", "readOnly": true - }, - "details": { - "$ref": "#/components/schemas/JsonNode" } }, "required": [ @@ -83503,6 +83505,10 @@ "description": "Timestamp of the alarm assignment, in milliseconds", "example": 1634115928465 }, + "details": { + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with alarm details" + }, "propagate": { "type": "boolean", "description": "Propagation flag to specify if alarm should be propagated to parent entities of alarm originator", @@ -83555,9 +83561,6 @@ "description": "status of the Alarm", "example": "ACTIVE_UNACK", "readOnly": true - }, - "details": { - "$ref": "#/components/schemas/JsonNode" } }, "required": [ @@ -85057,7 +85060,8 @@ }, "entityId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Entity id" + "description": "JSON object with Entity id", + "readOnly": true }, "entityName": { "type": "string", @@ -85682,6 +85686,10 @@ "version": { "type": "integer", "format": "int64" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the calculated field" } }, "required": [ @@ -85727,6 +85735,14 @@ "description": "String value representing the server name, identifier or ip address where the platform is running", "example": "ip-172-31-24-152" }, + "isError": { + "type": "boolean", + "description": "Boolean value to filter the errors", + "enum": [ + "false", + "true" + ] + }, "errorStr": { "type": "string", "description": "The case insensitive 'contains' filter based on error message", @@ -85774,13 +85790,6 @@ "example": { "x + y": 32 } - }, - "error": { - "type": "boolean" - }, - "isError": { - "type": "boolean", - "writeOnly": true } } } @@ -85846,6 +85855,10 @@ "type": "integer", "format": "int64" }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the calculated field" + }, "entityName": { "type": "string" } @@ -86456,10 +86469,31 @@ "Dashboard": { "type": "object", "properties": { + "id": { + "$ref": "#/components/schemas/DashboardId", + "description": "JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the dashboard creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id. Tenant Id of the dashboard can't be changed.", + "readOnly": true + }, "title": { "type": "string", "description": "Title of the dashboard." }, + "name": { + "type": "string", + "description": "Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", + "readOnly": true + }, "image": { "type": "string", "description": "Thumbnail picture for rendering of the dashboards in a grid view on mobile devices.", @@ -86476,21 +86510,6 @@ "description": "Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications", "readOnly": true }, - "configuration": { - "$ref": "#/components/schemas/JsonNode", - "description": "JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON." - }, - "name": { - "type": "string", - "description": "Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", - "readOnly": true - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceExportData" - } - }, "assignedCustomers": { "type": "array", "description": "List of assigned customers with their info.", @@ -86500,21 +86519,15 @@ "readOnly": true, "uniqueItems": true }, - "createdTime": { - "type": "integer", - "format": "int64", - "description": "Timestamp of the dashboard creation, in milliseconds", - "example": 1609459200000, - "readOnly": true - }, - "id": { - "$ref": "#/components/schemas/DashboardId", - "description": "JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard." + "configuration": { + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON." }, - "tenantId": { - "$ref": "#/components/schemas/TenantId", - "description": "JSON object with Tenant Id. Tenant Id of the dashboard can't be changed.", - "readOnly": true + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceExportData" + } }, "version": { "type": "integer", @@ -88520,7 +88533,8 @@ "OAUTH2_CLIENT", "DOMAIN", "CALCULATED_FIELD", - "AI_MODEL" + "AI_MODEL", + "API_KEY" ] }, "EdgeId": { @@ -90037,7 +90051,8 @@ }, "entityId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Entity Id for which event is created." + "description": "JSON object with Entity Id for which event is created.", + "readOnly": true }, "body": { "$ref": "#/components/schemas/JsonNode" @@ -93614,38 +93629,8 @@ "readOnly": true }, "data": { - "type": "object", - "properties": { - "char": { - "type": "string" - }, - "direct": { - "type": "boolean" - }, - "double": { - "type": "number", - "format": "double" - }, - "float": { - "type": "number", - "format": "float" - }, - "int": { - "type": "integer", - "format": "int32" - }, - "long": { - "type": "integer", - "format": "int64" - }, - "readOnly": { - "type": "boolean" - }, - "short": { - "type": "integer", - "format": "int32" - } - } + "type": "string", + "format": "byte" }, "name": { "type": "string", @@ -96648,6 +96633,14 @@ "description": "String value representing the server name, identifier or ip address where the platform is running", "example": "ip-172-31-24-152" }, + "isError": { + "type": "boolean", + "description": "Boolean value to filter the errors", + "enum": [ + "false", + "true" + ] + }, "errorStr": { "type": "string", "description": "The case insensitive 'contains' filter based on error message", @@ -96656,13 +96649,6 @@ "message": { "type": "string", "description": "String value representing the message" - }, - "error": { - "type": "boolean" - }, - "isError": { - "type": "boolean", - "writeOnly": true } } } @@ -96959,6 +96945,14 @@ "description": "String value representing the server name, identifier or ip address where the platform is running", "example": "ip-172-31-24-152" }, + "isError": { + "type": "boolean", + "description": "Boolean value to filter the errors", + "enum": [ + "false", + "true" + ] + }, "errorStr": { "type": "string", "description": "The case insensitive 'contains' filter based on error message", @@ -97008,13 +97002,6 @@ "type": "string", "description": "The case insensitive 'contains' filter based on metadata (key and value) for the message.", "example": "deviceName" - }, - "error": { - "type": "boolean" - }, - "isError": { - "type": "boolean", - "writeOnly": true } } } diff --git a/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java b/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java index 7d9b3418..5a0c3157 100644 --- a/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java +++ b/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java @@ -51226,7 +51226,7 @@ private HttpRequest.Builder listEntityTypeVersionsRequestBuilder(@javax.annotati /** * List entity versions (listEntityVersions) - * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe <johndoe@gmail.com>\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. + * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe (johndoe@gmail.com)\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param externalEntityUuid A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. (required) * @param branch The name of the working branch, for example 'master' (required) @@ -51244,7 +51244,7 @@ public PageDataEntityVersion listEntityVersions(@javax.annotation.Nonnull Entity /** * List entity versions (listEntityVersions) - * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe <johndoe@gmail.com>\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. + * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe (johndoe@gmail.com)\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param externalEntityUuid A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. (required) * @param branch The name of the working branch, for example 'master' (required) @@ -51264,7 +51264,7 @@ public PageDataEntityVersion listEntityVersions(@javax.annotation.Nonnull Entity /** * List entity versions (listEntityVersions) - * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe <johndoe@gmail.com>\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. + * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe (johndoe@gmail.com)\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param externalEntityUuid A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. (required) * @param branch The name of the working branch, for example 'master' (required) @@ -51282,7 +51282,7 @@ public ApiResponse listEntityVersionsWithHttpInfo(@javax. /** * List entity versions (listEntityVersions) - * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe <johndoe@gmail.com>\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. + * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe (johndoe@gmail.com)\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param externalEntityUuid A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. (required) * @param branch The name of the working branch, for example 'master' (required) @@ -55269,7 +55269,7 @@ private HttpRequest.Builder saveAlarmCommentRequestBuilder(@javax.annotation.Non /** * Save API key for user (saveApiKey) - * Creates an API key for the given user and returns the token ONCE as 'ApiKey <value>'. Available for any authorized user. + * Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'. Available for any authorized user. * @param apiKeyInfo (required) * @return ApiKey * @throws ApiException if fails to make API call @@ -55280,7 +55280,7 @@ public ApiKey saveApiKey(@javax.annotation.Nonnull ApiKeyInfo apiKeyInfo) throws /** * Save API key for user (saveApiKey) - * Creates an API key for the given user and returns the token ONCE as 'ApiKey <value>'. Available for any authorized user. + * Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'. Available for any authorized user. * @param apiKeyInfo (required) * @param headers Optional headers to include in the request * @return ApiKey @@ -55293,7 +55293,7 @@ public ApiKey saveApiKey(@javax.annotation.Nonnull ApiKeyInfo apiKeyInfo, Map saveApiKeyWithHttpInfo(@javax.annotation.Nonnull ApiK /** * Save API key for user (saveApiKey) - * Creates an API key for the given user and returns the token ONCE as 'ApiKey <value>'. Available for any authorized user. + * Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'. Available for any authorized user. * @param apiKeyInfo (required) * @param headers Optional headers to include in the request * @return ApiResponse<ApiKey> @@ -56864,7 +56864,7 @@ private HttpRequest.Builder saveDeviceProfileRequestBuilder(@javax.annotation.No /** * Create Device (saveDevice) with credentials - * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: <b>\"Access token\"</b> with <b>device profile default</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: **\"Access token\"** with **device profile default** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param saveDeviceWithCredentialsRequest (required) * @param nameConflictPolicy Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs. (optional, default to FAIL) * @param uniquifySeparator Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'. (optional, default to _) @@ -56878,7 +56878,7 @@ public Device saveDeviceWithCredentials(@javax.annotation.Nonnull SaveDeviceWith /** * Create Device (saveDevice) with credentials - * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: <b>\"Access token\"</b> with <b>device profile default</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: **\"Access token\"** with **device profile default** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param saveDeviceWithCredentialsRequest (required) * @param nameConflictPolicy Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs. (optional, default to FAIL) * @param uniquifySeparator Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'. (optional, default to _) @@ -56894,7 +56894,7 @@ public Device saveDeviceWithCredentials(@javax.annotation.Nonnull SaveDeviceWith /** * Create Device (saveDevice) with credentials - * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: <b>\"Access token\"</b> with <b>device profile default</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: **\"Access token\"** with **device profile default** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param saveDeviceWithCredentialsRequest (required) * @param nameConflictPolicy Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs. (optional, default to FAIL) * @param uniquifySeparator Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'. (optional, default to _) @@ -56908,7 +56908,7 @@ public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotati /** * Create Device (saveDevice) with credentials - * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: <b>\"Access token\"</b> with <b>device profile default</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: **\"Access token\"** with **device profile default** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param saveDeviceWithCredentialsRequest (required) * @param nameConflictPolicy Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs. (optional, default to FAIL) * @param uniquifySeparator Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'. (optional, default to _) @@ -66244,7 +66244,7 @@ private HttpRequest.Builder updateDashboardCustomersRequestBuilder(@javax.annota /** * Update device credentials (updateDeviceCredentials) - * During device creation, platform generates random 'ACCESS_TOKEN' credentials. \" + Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device ID</b> and with <b>device ID</b> below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. + * During device creation, platform generates random 'ACCESS_TOKEN' credentials. \" + Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. * @param deviceCredentials (required) * @return DeviceCredentials * @throws ApiException if fails to make API call @@ -66255,7 +66255,7 @@ public DeviceCredentials updateDeviceCredentials(@javax.annotation.Nonnull Devic /** * Update device credentials (updateDeviceCredentials) - * During device creation, platform generates random 'ACCESS_TOKEN' credentials. \" + Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device ID</b> and with <b>device ID</b> below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. + * During device creation, platform generates random 'ACCESS_TOKEN' credentials. \" + Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. * @param deviceCredentials (required) * @param headers Optional headers to include in the request * @return DeviceCredentials @@ -66268,7 +66268,7 @@ public DeviceCredentials updateDeviceCredentials(@javax.annotation.Nonnull Devic /** * Update device credentials (updateDeviceCredentials) - * During device creation, platform generates random 'ACCESS_TOKEN' credentials. \" + Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device ID</b> and with <b>device ID</b> below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. + * During device creation, platform generates random 'ACCESS_TOKEN' credentials. \" + Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. * @param deviceCredentials (required) * @return ApiResponse<DeviceCredentials> * @throws ApiException if fails to make API call @@ -66279,7 +66279,7 @@ public ApiResponse updateDeviceCredentialsWithHttpInfo(@javax /** * Update device credentials (updateDeviceCredentials) - * During device creation, platform generates random 'ACCESS_TOKEN' credentials. \" + Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device ID</b> and with <b>device ID</b> below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. + * During device creation, platform generates random 'ACCESS_TOKEN' credentials. \" + Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. * @param deviceCredentials (required) * @param headers Optional headers to include in the request * @return ApiResponse<DeviceCredentials> diff --git a/ce/src/main/java/org/thingsboard/client/model/Alarm.java b/ce/src/main/java/org/thingsboard/client/model/Alarm.java index 6f665ca7..b744ddff 100644 --- a/ce/src/main/java/org/thingsboard/client/model/Alarm.java +++ b/ce/src/main/java/org/thingsboard/client/model/Alarm.java @@ -123,7 +123,7 @@ public class Alarm { public static final String JSON_PROPERTY_DETAILS = "details"; @javax.annotation.Nullable - private com.fasterxml.jackson.databind.JsonNode details = null; + private com.fasterxml.jackson.databind.JsonNode details; public static final String JSON_PROPERTY_PROPAGATE = "propagate"; @javax.annotation.Nullable @@ -474,7 +474,7 @@ public Alarm details(@javax.annotation.Nullable com.fasterxml.jackson.databind.J } /** - * Get details + * JSON object with alarm details * @return details */ @javax.annotation.Nullable diff --git a/ce/src/main/java/org/thingsboard/client/model/AlarmData.java b/ce/src/main/java/org/thingsboard/client/model/AlarmData.java index 2ebfab1e..47f9bb49 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AlarmData.java +++ b/ce/src/main/java/org/thingsboard/client/model/AlarmData.java @@ -65,6 +65,7 @@ AlarmData.JSON_PROPERTY_ACK_TS, AlarmData.JSON_PROPERTY_CLEAR_TS, AlarmData.JSON_PROPERTY_ASSIGN_TS, + AlarmData.JSON_PROPERTY_DETAILS, AlarmData.JSON_PROPERTY_PROPAGATE, AlarmData.JSON_PROPERTY_PROPAGATE_TO_OWNER, AlarmData.JSON_PROPERTY_PROPAGATE_TO_TENANT, @@ -74,8 +75,7 @@ AlarmData.JSON_PROPERTY_ORIGINATOR_DISPLAY_NAME, AlarmData.JSON_PROPERTY_ASSIGNEE, AlarmData.JSON_PROPERTY_NAME, - AlarmData.JSON_PROPERTY_STATUS, - AlarmData.JSON_PROPERTY_DETAILS + AlarmData.JSON_PROPERTY_STATUS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class AlarmData { @@ -147,6 +147,10 @@ public class AlarmData { @javax.annotation.Nullable private Long assignTs; + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private com.fasterxml.jackson.databind.JsonNode details; + public static final String JSON_PROPERTY_PROPAGATE = "propagate"; @javax.annotation.Nullable private Boolean propagate; @@ -187,10 +191,6 @@ public class AlarmData { @javax.annotation.Nonnull private AlarmStatus status; - public static final String JSON_PROPERTY_DETAILS = "details"; - @javax.annotation.Nullable - private com.fasterxml.jackson.databind.JsonNode details = null; - public AlarmData() { } @@ -596,6 +596,30 @@ public void setAssignTs(@javax.annotation.Nullable Long assignTs) { } + public AlarmData details(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { + this.details = details; + return this; + } + + /** + * JSON object with alarm details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public com.fasterxml.jackson.databind.JsonNode getDetails() { + return details; + } + + + @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { + this.details = details; + } + + public AlarmData propagate(@javax.annotation.Nullable Boolean propagate) { this.propagate = propagate; return this; @@ -824,30 +848,6 @@ public AlarmStatus getStatus() { - public AlarmData details(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { - this.details = details; - return this; - } - - /** - * Get details - * @return details - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public com.fasterxml.jackson.databind.JsonNode getDetails() { - return details; - } - - - @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDetails(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { - this.details = details; - } - - /** * Return true if this AlarmData object is equal to o. */ @@ -877,6 +877,7 @@ public boolean equals(Object o) { Objects.equals(this.ackTs, alarmData.ackTs) && Objects.equals(this.clearTs, alarmData.clearTs) && Objects.equals(this.assignTs, alarmData.assignTs) && + Objects.equals(this.details, alarmData.details) && Objects.equals(this.propagate, alarmData.propagate) && Objects.equals(this.propagateToOwner, alarmData.propagateToOwner) && Objects.equals(this.propagateToTenant, alarmData.propagateToTenant) && @@ -886,13 +887,12 @@ public boolean equals(Object o) { Objects.equals(this.originatorDisplayName, alarmData.originatorDisplayName) && Objects.equals(this.assignee, alarmData.assignee) && Objects.equals(this.name, alarmData.name) && - Objects.equals(this.status, alarmData.status) && - Objects.equals(this.details, alarmData.details); + Objects.equals(this.status, alarmData.status); } @Override public int hashCode() { - return Objects.hash(entityId, latest, id, createdTime, tenantId, customerId, type, originator, severity, acknowledged, cleared, assigneeId, startTs, endTs, ackTs, clearTs, assignTs, propagate, propagateToOwner, propagateToTenant, propagateRelationTypes, originatorName, originatorLabel, originatorDisplayName, assignee, name, status, details); + return Objects.hash(entityId, latest, id, createdTime, tenantId, customerId, type, originator, severity, acknowledged, cleared, assigneeId, startTs, endTs, ackTs, clearTs, assignTs, details, propagate, propagateToOwner, propagateToTenant, propagateRelationTypes, originatorName, originatorLabel, originatorDisplayName, assignee, name, status); } @Override @@ -916,6 +916,7 @@ public String toString() { sb.append(" ackTs: ").append(toIndentedString(ackTs)).append("\n"); sb.append(" clearTs: ").append(toIndentedString(clearTs)).append("\n"); sb.append(" assignTs: ").append(toIndentedString(assignTs)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); sb.append(" propagate: ").append(toIndentedString(propagate)).append("\n"); sb.append(" propagateToOwner: ").append(toIndentedString(propagateToOwner)).append("\n"); sb.append(" propagateToTenant: ").append(toIndentedString(propagateToTenant)).append("\n"); @@ -926,7 +927,6 @@ public String toString() { sb.append(" assignee: ").append(toIndentedString(assignee)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" details: ").append(toIndentedString(details)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1063,6 +1063,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sassignTs%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAssignTs())))); } + // add `details` to the URL query string + if (getDetails() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sdetails%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetails())))); + } + // add `propagate` to the URL query string if (getPropagate() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%spropagate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPropagate())))); @@ -1117,11 +1122,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); } - // add `details` to the URL query string - if (getDetails() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdetails%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetails())))); - } - return joiner.toString(); } } diff --git a/ce/src/main/java/org/thingsboard/client/model/AlarmInfo.java b/ce/src/main/java/org/thingsboard/client/model/AlarmInfo.java index b33e9593..eb66edf6 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AlarmInfo.java +++ b/ce/src/main/java/org/thingsboard/client/model/AlarmInfo.java @@ -60,6 +60,7 @@ AlarmInfo.JSON_PROPERTY_ACK_TS, AlarmInfo.JSON_PROPERTY_CLEAR_TS, AlarmInfo.JSON_PROPERTY_ASSIGN_TS, + AlarmInfo.JSON_PROPERTY_DETAILS, AlarmInfo.JSON_PROPERTY_PROPAGATE, AlarmInfo.JSON_PROPERTY_PROPAGATE_TO_OWNER, AlarmInfo.JSON_PROPERTY_PROPAGATE_TO_TENANT, @@ -69,8 +70,7 @@ AlarmInfo.JSON_PROPERTY_ORIGINATOR_DISPLAY_NAME, AlarmInfo.JSON_PROPERTY_ASSIGNEE, AlarmInfo.JSON_PROPERTY_NAME, - AlarmInfo.JSON_PROPERTY_STATUS, - AlarmInfo.JSON_PROPERTY_DETAILS + AlarmInfo.JSON_PROPERTY_STATUS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class AlarmInfo { @@ -134,6 +134,10 @@ public class AlarmInfo { @javax.annotation.Nullable private Long assignTs; + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private com.fasterxml.jackson.databind.JsonNode details; + public static final String JSON_PROPERTY_PROPAGATE = "propagate"; @javax.annotation.Nullable private Boolean propagate; @@ -174,10 +178,6 @@ public class AlarmInfo { @javax.annotation.Nonnull private AlarmStatus status; - public static final String JSON_PROPERTY_DETAILS = "details"; - @javax.annotation.Nullable - private com.fasterxml.jackson.databind.JsonNode details = null; - public AlarmInfo() { } @@ -527,6 +527,30 @@ public void setAssignTs(@javax.annotation.Nullable Long assignTs) { } + public AlarmInfo details(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { + this.details = details; + return this; + } + + /** + * JSON object with alarm details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public com.fasterxml.jackson.databind.JsonNode getDetails() { + return details; + } + + + @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { + this.details = details; + } + + public AlarmInfo propagate(@javax.annotation.Nullable Boolean propagate) { this.propagate = propagate; return this; @@ -755,30 +779,6 @@ public AlarmStatus getStatus() { - public AlarmInfo details(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { - this.details = details; - return this; - } - - /** - * Get details - * @return details - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public com.fasterxml.jackson.databind.JsonNode getDetails() { - return details; - } - - - @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDetails(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { - this.details = details; - } - - /** * Return true if this AlarmInfo object is equal to o. */ @@ -806,6 +806,7 @@ public boolean equals(Object o) { Objects.equals(this.ackTs, alarmInfo.ackTs) && Objects.equals(this.clearTs, alarmInfo.clearTs) && Objects.equals(this.assignTs, alarmInfo.assignTs) && + Objects.equals(this.details, alarmInfo.details) && Objects.equals(this.propagate, alarmInfo.propagate) && Objects.equals(this.propagateToOwner, alarmInfo.propagateToOwner) && Objects.equals(this.propagateToTenant, alarmInfo.propagateToTenant) && @@ -815,13 +816,12 @@ public boolean equals(Object o) { Objects.equals(this.originatorDisplayName, alarmInfo.originatorDisplayName) && Objects.equals(this.assignee, alarmInfo.assignee) && Objects.equals(this.name, alarmInfo.name) && - Objects.equals(this.status, alarmInfo.status) && - Objects.equals(this.details, alarmInfo.details); + Objects.equals(this.status, alarmInfo.status); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, customerId, type, originator, severity, acknowledged, cleared, assigneeId, startTs, endTs, ackTs, clearTs, assignTs, propagate, propagateToOwner, propagateToTenant, propagateRelationTypes, originatorName, originatorLabel, originatorDisplayName, assignee, name, status, details); + return Objects.hash(id, createdTime, tenantId, customerId, type, originator, severity, acknowledged, cleared, assigneeId, startTs, endTs, ackTs, clearTs, assignTs, details, propagate, propagateToOwner, propagateToTenant, propagateRelationTypes, originatorName, originatorLabel, originatorDisplayName, assignee, name, status); } @Override @@ -843,6 +843,7 @@ public String toString() { sb.append(" ackTs: ").append(toIndentedString(ackTs)).append("\n"); sb.append(" clearTs: ").append(toIndentedString(clearTs)).append("\n"); sb.append(" assignTs: ").append(toIndentedString(assignTs)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); sb.append(" propagate: ").append(toIndentedString(propagate)).append("\n"); sb.append(" propagateToOwner: ").append(toIndentedString(propagateToOwner)).append("\n"); sb.append(" propagateToTenant: ").append(toIndentedString(propagateToTenant)).append("\n"); @@ -853,7 +854,6 @@ public String toString() { sb.append(" assignee: ").append(toIndentedString(assignee)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" details: ").append(toIndentedString(details)).append("\n"); sb.append("}"); return sb.toString(); } @@ -976,6 +976,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sassignTs%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAssignTs())))); } + // add `details` to the URL query string + if (getDetails() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sdetails%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetails())))); + } + // add `propagate` to the URL query string if (getPropagate() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%spropagate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPropagate())))); @@ -1030,11 +1035,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); } - // add `details` to the URL query string - if (getDetails() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdetails%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetails())))); - } - return joiner.toString(); } } diff --git a/ce/src/main/java/org/thingsboard/client/model/AuditLog.java b/ce/src/main/java/org/thingsboard/client/model/AuditLog.java index 4bc53623..1ff6864f 100644 --- a/ce/src/main/java/org/thingsboard/client/model/AuditLog.java +++ b/ce/src/main/java/org/thingsboard/client/model/AuditLog.java @@ -113,6 +113,7 @@ public AuditLog( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_ENTITY_ID) EntityId entityId, @JsonProperty(JSON_PROPERTY_ENTITY_NAME) String entityName, @JsonProperty(JSON_PROPERTY_USER_ID) UserId userId, @JsonProperty(JSON_PROPERTY_USER_NAME) String userName, @@ -125,6 +126,7 @@ public AuditLog( this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; + this.entityId = entityId; this.entityName = entityName; this.userId = userId; this.userName = userName; @@ -200,11 +202,6 @@ public CustomerId getCustomerId() { - public AuditLog entityId(@javax.annotation.Nullable EntityId entityId) { - this.entityId = entityId; - return this; - } - /** * JSON object with Entity id * @return entityId @@ -217,11 +214,6 @@ public EntityId getEntityId() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEntityId(@javax.annotation.Nullable EntityId entityId) { - this.entityId = entityId; - } /** diff --git a/ce/src/main/java/org/thingsboard/client/model/CalculatedField.java b/ce/src/main/java/org/thingsboard/client/model/CalculatedField.java index b17f4688..2800ba59 100644 --- a/ce/src/main/java/org/thingsboard/client/model/CalculatedField.java +++ b/ce/src/main/java/org/thingsboard/client/model/CalculatedField.java @@ -51,7 +51,8 @@ CalculatedField.JSON_PROPERTY_DEBUG_SETTINGS, CalculatedField.JSON_PROPERTY_CONFIGURATION_VERSION, CalculatedField.JSON_PROPERTY_CONFIGURATION, - CalculatedField.JSON_PROPERTY_VERSION + CalculatedField.JSON_PROPERTY_VERSION, + CalculatedField.JSON_PROPERTY_ADDITIONAL_INFO }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class CalculatedField { @@ -99,6 +100,10 @@ public class CalculatedField { @javax.annotation.Nullable private Long version; + public static final String JSON_PROPERTY_ADDITIONAL_INFO = "additionalInfo"; + @javax.annotation.Nullable + private com.fasterxml.jackson.databind.JsonNode additionalInfo; + public CalculatedField() { } @@ -366,6 +371,30 @@ public void setVersion(@javax.annotation.Nullable Long version) { } + public CalculatedField additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { + this.additionalInfo = additionalInfo; + return this; + } + + /** + * Additional parameters of the calculated field + * @return additionalInfo + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ADDITIONAL_INFO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public com.fasterxml.jackson.databind.JsonNode getAdditionalInfo() { + return additionalInfo; + } + + + @JsonProperty(value = JSON_PROPERTY_ADDITIONAL_INFO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdditionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { + this.additionalInfo = additionalInfo; + } + + /** * Return true if this CalculatedField object is equal to o. */ @@ -388,12 +417,13 @@ public boolean equals(Object o) { Objects.equals(this.debugSettings, calculatedField.debugSettings) && Objects.equals(this.configurationVersion, calculatedField.configurationVersion) && Objects.equals(this._configuration, calculatedField._configuration) && - Objects.equals(this.version, calculatedField.version); + Objects.equals(this.version, calculatedField.version) && + Objects.equals(this.additionalInfo, calculatedField.additionalInfo); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, entityId, type, name, debugMode, debugSettings, configurationVersion, _configuration, version); + return Objects.hash(id, createdTime, tenantId, entityId, type, name, debugMode, debugSettings, configurationVersion, _configuration, version, additionalInfo); } @Override @@ -411,6 +441,7 @@ public String toString() { sb.append(" configurationVersion: ").append(toIndentedString(configurationVersion)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); sb.append("}"); return sb.toString(); } @@ -513,6 +544,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); } + // add `additionalInfo` to the URL query string + if (getAdditionalInfo() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sadditionalInfo%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInfo())))); + } + return joiner.toString(); } } diff --git a/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java b/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java index 8891973e..825bc7c1 100644 --- a/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java +++ b/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java @@ -42,15 +42,14 @@ */ @JsonPropertyOrder({ CalculatedFieldDebugEventFilter.JSON_PROPERTY_SERVER, + CalculatedFieldDebugEventFilter.JSON_PROPERTY_IS_ERROR, CalculatedFieldDebugEventFilter.JSON_PROPERTY_ERROR_STR, CalculatedFieldDebugEventFilter.JSON_PROPERTY_ENTITY_ID, CalculatedFieldDebugEventFilter.JSON_PROPERTY_ENTITY_TYPE, CalculatedFieldDebugEventFilter.JSON_PROPERTY_MSG_ID, CalculatedFieldDebugEventFilter.JSON_PROPERTY_MSG_TYPE, CalculatedFieldDebugEventFilter.JSON_PROPERTY_ARGUMENTS, - CalculatedFieldDebugEventFilter.JSON_PROPERTY_RESULT, - CalculatedFieldDebugEventFilter.JSON_PROPERTY_ERROR, - CalculatedFieldDebugEventFilter.JSON_PROPERTY_IS_ERROR + CalculatedFieldDebugEventFilter.JSON_PROPERTY_RESULT }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -64,6 +63,45 @@ public class CalculatedFieldDebugEventFilter extends EventFilter { @javax.annotation.Nullable private String server; + /** + * Boolean value to filter the errors + */ + public enum IsErrorEnum { + FALSE(Boolean.valueOf("false")), + + TRUE(Boolean.valueOf("true")); + + private Boolean value; + + IsErrorEnum(Boolean value) { + this.value = value; + } + + @JsonValue + public Boolean getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IsErrorEnum fromValue(Boolean value) { + for (IsErrorEnum b : IsErrorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private IsErrorEnum isError; + public static final String JSON_PROPERTY_ERROR_STR = "errorStr"; @javax.annotation.Nullable private String errorStr; @@ -125,14 +163,6 @@ public static EntityTypeEnum fromValue(String value) { @javax.annotation.Nullable private String result; - public static final String JSON_PROPERTY_ERROR = "error"; - @javax.annotation.Nullable - private Boolean error; - - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public CalculatedFieldDebugEventFilter() { } @@ -160,6 +190,30 @@ public void setServer(@javax.annotation.Nullable String server) { } + public CalculatedFieldDebugEventFilter isError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + return this; + } + + /** + * Boolean value to filter the errors + * @return isError + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IsErrorEnum getIsError() { + return isError; + } + + + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + } + + public CalculatedFieldDebugEventFilter errorStr(@javax.annotation.Nullable String errorStr) { this.errorStr = errorStr; return this; @@ -328,54 +382,6 @@ public void setResult(@javax.annotation.Nullable String result) { } - public CalculatedFieldDebugEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; - return this; - } - - /** - * Get error - * @return error - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; - } - - - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; - } - - - public CalculatedFieldDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - return this; - } - - /** - * Get isError - * @return isError - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; - } - - - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - } - - @Override public CalculatedFieldDebugEventFilter eventType(@javax.annotation.Nonnull EventType eventType) { this.setEventType(eventType); @@ -401,6 +407,7 @@ public boolean equals(Object o) { } CalculatedFieldDebugEventFilter calculatedFieldDebugEventFilter = (CalculatedFieldDebugEventFilter) o; return Objects.equals(this.server, calculatedFieldDebugEventFilter.server) && + Objects.equals(this.isError, calculatedFieldDebugEventFilter.isError) && Objects.equals(this.errorStr, calculatedFieldDebugEventFilter.errorStr) && Objects.equals(this.entityId, calculatedFieldDebugEventFilter.entityId) && Objects.equals(this.entityType, calculatedFieldDebugEventFilter.entityType) && @@ -408,14 +415,12 @@ public boolean equals(Object o) { Objects.equals(this.msgType, calculatedFieldDebugEventFilter.msgType) && Objects.equals(this.arguments, calculatedFieldDebugEventFilter.arguments) && Objects.equals(this.result, calculatedFieldDebugEventFilter.result) && - Objects.equals(this.error, calculatedFieldDebugEventFilter.error) && - Objects.equals(this.isError, calculatedFieldDebugEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, entityId, entityType, msgId, msgType, arguments, result, error, isError, super.hashCode()); + return Objects.hash(server, isError, errorStr, entityId, entityType, msgId, msgType, arguments, result, super.hashCode()); } @Override @@ -424,6 +429,7 @@ public String toString() { sb.append("class CalculatedFieldDebugEventFilter {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" server: ").append(toIndentedString(server)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" errorStr: ").append(toIndentedString(errorStr)).append("\n"); sb.append(" entityId: ").append(toIndentedString(entityId)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); @@ -431,8 +437,6 @@ public String toString() { sb.append(" msgType: ").append(toIndentedString(msgType)).append("\n"); sb.append(" arguments: ").append(toIndentedString(arguments)).append("\n"); sb.append(" result: ").append(toIndentedString(result)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -495,6 +499,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sserver%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getServer())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + // add `errorStr` to the URL query string if (getErrorStr() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serrorStr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorStr())))); @@ -530,16 +539,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); } - // add `error` to the URL query string - if (getError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); - } - - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldInfo.java b/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldInfo.java index 3134bf8a..76329673 100644 --- a/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldInfo.java +++ b/ce/src/main/java/org/thingsboard/client/model/CalculatedFieldInfo.java @@ -52,6 +52,7 @@ CalculatedFieldInfo.JSON_PROPERTY_CONFIGURATION_VERSION, CalculatedFieldInfo.JSON_PROPERTY_CONFIGURATION, CalculatedFieldInfo.JSON_PROPERTY_VERSION, + CalculatedFieldInfo.JSON_PROPERTY_ADDITIONAL_INFO, CalculatedFieldInfo.JSON_PROPERTY_ENTITY_NAME }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @@ -100,6 +101,10 @@ public class CalculatedFieldInfo { @javax.annotation.Nullable private Long version; + public static final String JSON_PROPERTY_ADDITIONAL_INFO = "additionalInfo"; + @javax.annotation.Nullable + private com.fasterxml.jackson.databind.JsonNode additionalInfo; + public static final String JSON_PROPERTY_ENTITY_NAME = "entityName"; @javax.annotation.Nullable private String entityName; @@ -371,6 +376,30 @@ public void setVersion(@javax.annotation.Nullable Long version) { } + public CalculatedFieldInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { + this.additionalInfo = additionalInfo; + return this; + } + + /** + * Additional parameters of the calculated field + * @return additionalInfo + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ADDITIONAL_INFO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public com.fasterxml.jackson.databind.JsonNode getAdditionalInfo() { + return additionalInfo; + } + + + @JsonProperty(value = JSON_PROPERTY_ADDITIONAL_INFO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdditionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { + this.additionalInfo = additionalInfo; + } + + public CalculatedFieldInfo entityName(@javax.annotation.Nullable String entityName) { this.entityName = entityName; return this; @@ -418,12 +447,13 @@ public boolean equals(Object o) { Objects.equals(this.configurationVersion, calculatedFieldInfo.configurationVersion) && Objects.equals(this._configuration, calculatedFieldInfo._configuration) && Objects.equals(this.version, calculatedFieldInfo.version) && + Objects.equals(this.additionalInfo, calculatedFieldInfo.additionalInfo) && Objects.equals(this.entityName, calculatedFieldInfo.entityName); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, entityId, type, name, debugMode, debugSettings, configurationVersion, _configuration, version, entityName); + return Objects.hash(id, createdTime, tenantId, entityId, type, name, debugMode, debugSettings, configurationVersion, _configuration, version, additionalInfo, entityName); } @Override @@ -441,6 +471,7 @@ public String toString() { sb.append(" configurationVersion: ").append(toIndentedString(configurationVersion)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); sb.append(" entityName: ").append(toIndentedString(entityName)).append("\n"); sb.append("}"); return sb.toString(); @@ -544,6 +575,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); } + // add `additionalInfo` to the URL query string + if (getAdditionalInfo() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sadditionalInfo%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInfo())))); + } + // add `entityName` to the URL query string if (getEntityName() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityName%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityName())))); diff --git a/ce/src/main/java/org/thingsboard/client/model/Dashboard.java b/ce/src/main/java/org/thingsboard/client/model/Dashboard.java index 85c75a2c..f43b5931 100644 --- a/ce/src/main/java/org/thingsboard/client/model/Dashboard.java +++ b/ce/src/main/java/org/thingsboard/client/model/Dashboard.java @@ -44,25 +44,41 @@ * Dashboard */ @JsonPropertyOrder({ + Dashboard.JSON_PROPERTY_ID, + Dashboard.JSON_PROPERTY_CREATED_TIME, + Dashboard.JSON_PROPERTY_TENANT_ID, Dashboard.JSON_PROPERTY_TITLE, + Dashboard.JSON_PROPERTY_NAME, Dashboard.JSON_PROPERTY_IMAGE, Dashboard.JSON_PROPERTY_MOBILE_HIDE, Dashboard.JSON_PROPERTY_MOBILE_ORDER, + Dashboard.JSON_PROPERTY_ASSIGNED_CUSTOMERS, Dashboard.JSON_PROPERTY_CONFIGURATION, - Dashboard.JSON_PROPERTY_NAME, Dashboard.JSON_PROPERTY_RESOURCES, - Dashboard.JSON_PROPERTY_ASSIGNED_CUSTOMERS, - Dashboard.JSON_PROPERTY_CREATED_TIME, - Dashboard.JSON_PROPERTY_ID, - Dashboard.JSON_PROPERTY_TENANT_ID, Dashboard.JSON_PROPERTY_VERSION }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class Dashboard { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private DashboardId id; + + public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; + @javax.annotation.Nullable + private Long createdTime; + + public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; + @javax.annotation.Nullable + private TenantId tenantId; + public static final String JSON_PROPERTY_TITLE = "title"; @javax.annotation.Nonnull private String title; + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + public static final String JSON_PROPERTY_IMAGE = "image"; @javax.annotation.Nullable private String image; @@ -75,33 +91,17 @@ public class Dashboard { @javax.annotation.Nullable private Integer mobileOrder; - public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; - @javax.annotation.Nullable - private com.fasterxml.jackson.databind.JsonNode _configuration; - - public static final String JSON_PROPERTY_NAME = "name"; - @javax.annotation.Nullable - private String name; - - public static final String JSON_PROPERTY_RESOURCES = "resources"; - @javax.annotation.Nullable - private List resources = new ArrayList<>(); - public static final String JSON_PROPERTY_ASSIGNED_CUSTOMERS = "assignedCustomers"; @javax.annotation.Nullable private Set assignedCustomers = new LinkedHashSet<>(); - public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; - @javax.annotation.Nullable - private Long createdTime; - - public static final String JSON_PROPERTY_ID = "id"; + public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; @javax.annotation.Nullable - private DashboardId id; + private com.fasterxml.jackson.databind.JsonNode _configuration; - public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; + public static final String JSON_PROPERTY_RESOURCES = "resources"; @javax.annotation.Nullable - private TenantId tenantId; + private List resources = new ArrayList<>(); public static final String JSON_PROPERTY_VERSION = "version"; @javax.annotation.Nullable @@ -112,109 +112,95 @@ public Dashboard() { @JsonCreator public Dashboard( + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, + @JsonProperty(JSON_PROPERTY_NAME) String name, @JsonProperty(JSON_PROPERTY_IMAGE) String image, @JsonProperty(JSON_PROPERTY_MOBILE_HIDE) Boolean mobileHide, - @JsonProperty(JSON_PROPERTY_MOBILE_ORDER) Integer mobileOrder, - @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId + @JsonProperty(JSON_PROPERTY_MOBILE_ORDER) Integer mobileOrder ) { this(); + this.createdTime = createdTime; + this.tenantId = tenantId; + this.name = name; this.image = image; this.mobileHide = mobileHide; this.mobileOrder = mobileOrder; - this.name = name; - this.createdTime = createdTime; - this.tenantId = tenantId; } - public Dashboard title(@javax.annotation.Nonnull String title) { - this.title = title; + public Dashboard id(@javax.annotation.Nullable DashboardId id) { + this.id = id; return this; } /** - * Title of the dashboard. - * @return title - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_TITLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTitle() { - return title; - } - - - @JsonProperty(value = JSON_PROPERTY_TITLE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTitle(@javax.annotation.Nonnull String title) { - this.title = title; - } - - - /** - * Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. - * @return image + * JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. + * @return id */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IMAGE, required = false) + @JsonProperty(value = JSON_PROPERTY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getImage() { - return image; + public DashboardId getId() { + return id; } + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(@javax.annotation.Nullable DashboardId id) { + this.id = id; + } /** - * Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. - * @return mobileHide + * Timestamp of the dashboard creation, in milliseconds + * @return createdTime */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_MOBILE_HIDE, required = false) + @JsonProperty(value = JSON_PROPERTY_CREATED_TIME, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMobileHide() { - return mobileHide; + public Long getCreatedTime() { + return createdTime; } /** - * Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications - * @return mobileOrder + * JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. + * @return tenantId */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_MOBILE_ORDER, required = false) + @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getMobileOrder() { - return mobileOrder; + public TenantId getTenantId() { + return tenantId; } - public Dashboard _configuration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { - this._configuration = _configuration; + public Dashboard title(@javax.annotation.Nonnull String title) { + this.title = title; return this; } /** - * JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON. - * @return _configuration + * Title of the dashboard. + * @return title */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public com.fasterxml.jackson.databind.JsonNode getConfiguration() { - return _configuration; + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TITLE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; } - @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setConfiguration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { - this._configuration = _configuration; + @JsonProperty(value = JSON_PROPERTY_TITLE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTitle(@javax.annotation.Nonnull String title) { + this.title = title; } @@ -232,38 +218,48 @@ public String getName() { - public Dashboard resources(@javax.annotation.Nullable List resources) { - this.resources = resources; - return this; + /** + * Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. + * @return image + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IMAGE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getImage() { + return image; } - public Dashboard addResourcesItem(ResourceExportData resourcesItem) { - if (this.resources == null) { - this.resources = new ArrayList<>(); - } - this.resources.add(resourcesItem); - return this; - } + + /** - * Get resources - * @return resources + * Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. + * @return mobileHide */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) + @JsonProperty(value = JSON_PROPERTY_MOBILE_HIDE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getResources() { - return resources; + public Boolean getMobileHide() { + return mobileHide; } - @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) + + + /** + * Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications + * @return mobileOrder + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_MOBILE_ORDER, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResources(@javax.annotation.Nullable List resources) { - this.resources = resources; + public Integer getMobileOrder() { + return mobileOrder; } + + public Dashboard assignedCustomers(@javax.annotation.Nullable Set assignedCustomers) { this.assignedCustomers = assignedCustomers; return this; @@ -297,56 +293,60 @@ public void setAssignedCustomers(@javax.annotation.Nullable Set resources) { + this.resources = resources; + return this; + } + + public Dashboard addResourcesItem(ResourceExportData resourcesItem) { + if (this.resources == null) { + this.resources = new ArrayList<>(); + } + this.resources.add(resourcesItem); + return this; + } + /** - * JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. - * @return tenantId + * Get resources + * @return resources */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TenantId getTenantId() { - return tenantId; + public List getResources() { + return resources; } + @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResources(@javax.annotation.Nullable List resources) { + this.resources = resources; + } public Dashboard version(@javax.annotation.Nullable Long version) { @@ -385,40 +385,40 @@ public boolean equals(Object o) { return false; } Dashboard dashboard = (Dashboard) o; - return Objects.equals(this.title, dashboard.title) && + return Objects.equals(this.id, dashboard.id) && + Objects.equals(this.createdTime, dashboard.createdTime) && + Objects.equals(this.tenantId, dashboard.tenantId) && + Objects.equals(this.title, dashboard.title) && + Objects.equals(this.name, dashboard.name) && Objects.equals(this.image, dashboard.image) && Objects.equals(this.mobileHide, dashboard.mobileHide) && Objects.equals(this.mobileOrder, dashboard.mobileOrder) && + Objects.equals(this.assignedCustomers, dashboard.assignedCustomers) && Objects.equals(this._configuration, dashboard._configuration) && - Objects.equals(this.name, dashboard.name) && Objects.equals(this.resources, dashboard.resources) && - Objects.equals(this.assignedCustomers, dashboard.assignedCustomers) && - Objects.equals(this.createdTime, dashboard.createdTime) && - Objects.equals(this.id, dashboard.id) && - Objects.equals(this.tenantId, dashboard.tenantId) && Objects.equals(this.version, dashboard.version); } @Override public int hashCode() { - return Objects.hash(title, image, mobileHide, mobileOrder, _configuration, name, resources, assignedCustomers, createdTime, id, tenantId, version); + return Objects.hash(id, createdTime, tenantId, title, name, image, mobileHide, mobileOrder, assignedCustomers, _configuration, resources, version); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Dashboard {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" image: ").append(toIndentedString(image)).append("\n"); sb.append(" mobileHide: ").append(toIndentedString(mobileHide)).append("\n"); sb.append(" mobileOrder: ").append(toIndentedString(mobileOrder)).append("\n"); + sb.append(" assignedCustomers: ").append(toIndentedString(assignedCustomers)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); - sb.append(" assignedCustomers: ").append(toIndentedString(assignedCustomers)).append("\n"); - sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append("}"); return sb.toString(); @@ -467,11 +467,31 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); + // add `id` to the URL query string + if (getId() != null) { + joiner.add(getId().toUrlQueryString(prefix + "id" + suffix)); + } + + // add `createdTime` to the URL query string + if (getCreatedTime() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%screatedTime%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedTime())))); + } + + // add `tenantId` to the URL query string + if (getTenantId() != null) { + joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix)); + } + // add `title` to the URL query string if (getTitle() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); } + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + // add `image` to the URL query string if (getImage() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%simage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getImage())))); @@ -487,26 +507,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smobileOrder%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMobileOrder())))); } - // add `configuration` to the URL query string - if (getConfiguration() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sconfiguration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfiguration())))); - } - - // add `name` to the URL query string - if (getName() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); - } - - // add `resources` to the URL query string - if (getResources() != null) { - for (int i = 0; i < getResources().size(); i++) { - if (getResources().get(i) != null) { - joiner.add(getResources().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sresources%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - // add `assignedCustomers` to the URL query string if (getAssignedCustomers() != null) { int i = 0; @@ -519,19 +519,19 @@ public String toUrlQueryString(String prefix) { i++; } - // add `createdTime` to the URL query string - if (getCreatedTime() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%screatedTime%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedTime())))); - } - - // add `id` to the URL query string - if (getId() != null) { - joiner.add(getId().toUrlQueryString(prefix + "id" + suffix)); + // add `configuration` to the URL query string + if (getConfiguration() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sconfiguration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfiguration())))); } - // add `tenantId` to the URL query string - if (getTenantId() != null) { - joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix)); + // add `resources` to the URL query string + if (getResources() != null) { + for (int i = 0; i < getResources().size(); i++) { + if (getResources().get(i) != null) { + joiner.add(getResources().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sresources%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } } // add `version` to the URL query string diff --git a/ce/src/main/java/org/thingsboard/client/model/EdgeEventType.java b/ce/src/main/java/org/thingsboard/client/model/EdgeEventType.java index a49dc6e4..5477d360 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EdgeEventType.java +++ b/ce/src/main/java/org/thingsboard/client/model/EdgeEventType.java @@ -88,7 +88,9 @@ public enum EdgeEventType { CALCULATED_FIELD("CALCULATED_FIELD"), - AI_MODEL("AI_MODEL"); + AI_MODEL("AI_MODEL"), + + API_KEY("API_KEY"); private String value; diff --git a/ce/src/main/java/org/thingsboard/client/model/EventInfo.java b/ce/src/main/java/org/thingsboard/client/model/EventInfo.java index 1cbe3f86..e367fdbf 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EventInfo.java +++ b/ce/src/main/java/org/thingsboard/client/model/EventInfo.java @@ -82,11 +82,13 @@ public EventInfo() { @JsonCreator public EventInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId + @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, + @JsonProperty(JSON_PROPERTY_ENTITY_ID) EntityId entityId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; + this.entityId = entityId; } public EventInfo id(@javax.annotation.Nullable EventId id) { @@ -189,11 +191,6 @@ public void setUid(@javax.annotation.Nullable String uid) { } - public EventInfo entityId(@javax.annotation.Nullable EntityId entityId) { - this.entityId = entityId; - return this; - } - /** * JSON object with Entity Id for which event is created. * @return entityId @@ -206,11 +203,6 @@ public EntityId getEntityId() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEntityId(@javax.annotation.Nullable EntityId entityId) { - this.entityId = entityId; - } public EventInfo body(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode body) { diff --git a/ce/src/main/java/org/thingsboard/client/model/OtaPackage.java b/ce/src/main/java/org/thingsboard/client/model/OtaPackage.java index c5a77cdf..edd82ee0 100644 --- a/ce/src/main/java/org/thingsboard/client/model/OtaPackage.java +++ b/ce/src/main/java/org/thingsboard/client/model/OtaPackage.java @@ -29,7 +29,6 @@ import java.util.Arrays; import org.thingsboard.client.model.ChecksumAlgorithm; import org.thingsboard.client.model.DeviceProfileId; -import org.thingsboard.client.model.OtaPackageData; import org.thingsboard.client.model.OtaPackageId; import org.thingsboard.client.model.OtaPackageType; import org.thingsboard.client.model.TenantId; @@ -124,7 +123,7 @@ public class OtaPackage { public static final String JSON_PROPERTY_DATA = "data"; @javax.annotation.Nullable - private OtaPackageData data; + private byte[] data; public static final String JSON_PROPERTY_NAME = "name"; @javax.annotation.Nullable @@ -433,7 +432,7 @@ public Long getDataSize() { - public OtaPackage data(@javax.annotation.Nullable OtaPackageData data) { + public OtaPackage data(@javax.annotation.Nullable byte[] data) { this.data = data; return this; } @@ -445,14 +444,14 @@ public OtaPackage data(@javax.annotation.Nullable OtaPackageData data) { @javax.annotation.Nullable @JsonProperty(value = JSON_PROPERTY_DATA, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OtaPackageData getData() { + public byte[] getData() { return data; } @JsonProperty(value = JSON_PROPERTY_DATA, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setData(@javax.annotation.Nullable OtaPackageData data) { + public void setData(@javax.annotation.Nullable byte[] data) { this.data = data; } @@ -522,14 +521,14 @@ public boolean equals(Object o) { Objects.equals(this.checksumAlgorithm, otaPackage.checksumAlgorithm) && Objects.equals(this.checksum, otaPackage.checksum) && Objects.equals(this.dataSize, otaPackage.dataSize) && - Objects.equals(this.data, otaPackage.data) && + Arrays.equals(this.data, otaPackage.data) && Objects.equals(this.name, otaPackage.name) && Objects.equals(this.additionalInfo, otaPackage.additionalInfo); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, deviceProfileId, type, title, version, tag, url, hasData, fileName, contentType, checksumAlgorithm, checksum, dataSize, data, name, additionalInfo); + return Objects.hash(id, createdTime, tenantId, deviceProfileId, type, title, version, tag, url, hasData, fileName, contentType, checksumAlgorithm, checksum, dataSize, Arrays.hashCode(data), name, additionalInfo); } @Override @@ -678,7 +677,7 @@ public String toUrlQueryString(String prefix) { // add `data` to the URL query string if (getData() != null) { - joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + joiner.add(String.format(java.util.Locale.ROOT, "%sdata%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getData())))); } // add `name` to the URL query string diff --git a/ce/src/main/java/org/thingsboard/client/model/OtaPackageData.java b/ce/src/main/java/org/thingsboard/client/model/OtaPackageData.java deleted file mode 100644 index 8cb07905..00000000 --- a/ce/src/main/java/org/thingsboard/client/model/OtaPackageData.java +++ /dev/null @@ -1,405 +0,0 @@ -/** - * Copyright © 2026-2026 ThingsBoard, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.thingsboard.client.model; - -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.StringJoiner; -import java.util.Objects; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.ApiClient; -/** - * OtaPackageData - */ -@JsonPropertyOrder({ - OtaPackageData.JSON_PROPERTY_CHAR, - OtaPackageData.JSON_PROPERTY_DIRECT, - OtaPackageData.JSON_PROPERTY_DOUBLE, - OtaPackageData.JSON_PROPERTY_FLOAT, - OtaPackageData.JSON_PROPERTY_INT, - OtaPackageData.JSON_PROPERTY_LONG, - OtaPackageData.JSON_PROPERTY_READ_ONLY, - OtaPackageData.JSON_PROPERTY_SHORT -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class OtaPackageData { - public static final String JSON_PROPERTY_CHAR = "char"; - @javax.annotation.Nullable - private String _char; - - public static final String JSON_PROPERTY_DIRECT = "direct"; - @javax.annotation.Nullable - private Boolean direct; - - public static final String JSON_PROPERTY_DOUBLE = "double"; - @javax.annotation.Nullable - private Double _double; - - public static final String JSON_PROPERTY_FLOAT = "float"; - @javax.annotation.Nullable - private Float _float; - - public static final String JSON_PROPERTY_INT = "int"; - @javax.annotation.Nullable - private Integer _int; - - public static final String JSON_PROPERTY_LONG = "long"; - @javax.annotation.Nullable - private Long _long; - - public static final String JSON_PROPERTY_READ_ONLY = "readOnly"; - @javax.annotation.Nullable - private Boolean readOnly; - - public static final String JSON_PROPERTY_SHORT = "short"; - @javax.annotation.Nullable - private Integer _short; - - public OtaPackageData() { - } - - public OtaPackageData _char(@javax.annotation.Nullable String _char) { - this._char = _char; - return this; - } - - /** - * Get _char - * @return _char - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CHAR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getChar() { - return _char; - } - - - @JsonProperty(value = JSON_PROPERTY_CHAR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setChar(@javax.annotation.Nullable String _char) { - this._char = _char; - } - - - public OtaPackageData direct(@javax.annotation.Nullable Boolean direct) { - this.direct = direct; - return this; - } - - /** - * Get direct - * @return direct - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DIRECT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDirect() { - return direct; - } - - - @JsonProperty(value = JSON_PROPERTY_DIRECT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDirect(@javax.annotation.Nullable Boolean direct) { - this.direct = direct; - } - - - public OtaPackageData _double(@javax.annotation.Nullable Double _double) { - this._double = _double; - return this; - } - - /** - * Get _double - * @return _double - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DOUBLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDouble() { - return _double; - } - - - @JsonProperty(value = JSON_PROPERTY_DOUBLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDouble(@javax.annotation.Nullable Double _double) { - this._double = _double; - } - - - public OtaPackageData _float(@javax.annotation.Nullable Float _float) { - this._float = _float; - return this; - } - - /** - * Get _float - * @return _float - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_FLOAT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Float getFloat() { - return _float; - } - - - @JsonProperty(value = JSON_PROPERTY_FLOAT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFloat(@javax.annotation.Nullable Float _float) { - this._float = _float; - } - - - public OtaPackageData _int(@javax.annotation.Nullable Integer _int) { - this._int = _int; - return this; - } - - /** - * Get _int - * @return _int - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_INT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getInt() { - return _int; - } - - - @JsonProperty(value = JSON_PROPERTY_INT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInt(@javax.annotation.Nullable Integer _int) { - this._int = _int; - } - - - public OtaPackageData _long(@javax.annotation.Nullable Long _long) { - this._long = _long; - return this; - } - - /** - * Get _long - * @return _long - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LONG, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLong() { - return _long; - } - - - @JsonProperty(value = JSON_PROPERTY_LONG, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLong(@javax.annotation.Nullable Long _long) { - this._long = _long; - } - - - public OtaPackageData readOnly(@javax.annotation.Nullable Boolean readOnly) { - this.readOnly = readOnly; - return this; - } - - /** - * Get readOnly - * @return readOnly - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_READ_ONLY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getReadOnly() { - return readOnly; - } - - - @JsonProperty(value = JSON_PROPERTY_READ_ONLY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReadOnly(@javax.annotation.Nullable Boolean readOnly) { - this.readOnly = readOnly; - } - - - public OtaPackageData _short(@javax.annotation.Nullable Integer _short) { - this._short = _short; - return this; - } - - /** - * Get _short - * @return _short - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SHORT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getShort() { - return _short; - } - - - @JsonProperty(value = JSON_PROPERTY_SHORT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShort(@javax.annotation.Nullable Integer _short) { - this._short = _short; - } - - - /** - * Return true if this OtaPackage_data object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OtaPackageData otaPackageData = (OtaPackageData) o; - return Objects.equals(this._char, otaPackageData._char) && - Objects.equals(this.direct, otaPackageData.direct) && - Objects.equals(this._double, otaPackageData._double) && - Objects.equals(this._float, otaPackageData._float) && - Objects.equals(this._int, otaPackageData._int) && - Objects.equals(this._long, otaPackageData._long) && - Objects.equals(this.readOnly, otaPackageData.readOnly) && - Objects.equals(this._short, otaPackageData._short); - } - - @Override - public int hashCode() { - return Objects.hash(_char, direct, _double, _float, _int, _long, readOnly, _short); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OtaPackageData {\n"); - sb.append(" _char: ").append(toIndentedString(_char)).append("\n"); - sb.append(" direct: ").append(toIndentedString(direct)).append("\n"); - sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); - sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); - sb.append(" _int: ").append(toIndentedString(_int)).append("\n"); - sb.append(" _long: ").append(toIndentedString(_long)).append("\n"); - sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); - sb.append(" _short: ").append(toIndentedString(_short)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Convert the instance into URL query string. - * - * @return URL query string - */ - public String toUrlQueryString() { - return toUrlQueryString(null); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - String suffix = ""; - String containerSuffix = ""; - String containerPrefix = ""; - if (prefix == null) { - // style=form, explode=true, e.g. /pet?name=cat&type=manx - prefix = ""; - } else { - // deepObject style e.g. /pet?id[name]=cat&id[type]=manx - prefix = prefix + "["; - suffix = "]"; - containerSuffix = "]"; - containerPrefix = "["; - } - - StringJoiner joiner = new StringJoiner("&"); - - // add `char` to the URL query string - if (getChar() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%schar%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getChar())))); - } - - // add `direct` to the URL query string - if (getDirect() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdirect%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDirect())))); - } - - // add `double` to the URL query string - if (getDouble() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdouble%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDouble())))); - } - - // add `float` to the URL query string - if (getFloat() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sfloat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFloat())))); - } - - // add `int` to the URL query string - if (getInt() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sint%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInt())))); - } - - // add `long` to the URL query string - if (getLong() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%slong%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLong())))); - } - - // add `readOnly` to the URL query string - if (getReadOnly() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sreadOnly%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReadOnly())))); - } - - // add `short` to the URL query string - if (getShort() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sshort%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShort())))); - } - - return joiner.toString(); - } -} - diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java b/ce/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java index fb6e8069..cff4291a 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java +++ b/ce/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java @@ -42,10 +42,9 @@ */ @JsonPropertyOrder({ RuleChainDebugEventFilter.JSON_PROPERTY_SERVER, + RuleChainDebugEventFilter.JSON_PROPERTY_IS_ERROR, RuleChainDebugEventFilter.JSON_PROPERTY_ERROR_STR, - RuleChainDebugEventFilter.JSON_PROPERTY_MESSAGE, - RuleChainDebugEventFilter.JSON_PROPERTY_ERROR, - RuleChainDebugEventFilter.JSON_PROPERTY_IS_ERROR + RuleChainDebugEventFilter.JSON_PROPERTY_MESSAGE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -59,6 +58,45 @@ public class RuleChainDebugEventFilter extends EventFilter { @javax.annotation.Nullable private String server; + /** + * Boolean value to filter the errors + */ + public enum IsErrorEnum { + FALSE(Boolean.valueOf("false")), + + TRUE(Boolean.valueOf("true")); + + private Boolean value; + + IsErrorEnum(Boolean value) { + this.value = value; + } + + @JsonValue + public Boolean getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IsErrorEnum fromValue(Boolean value) { + for (IsErrorEnum b : IsErrorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private IsErrorEnum isError; + public static final String JSON_PROPERTY_ERROR_STR = "errorStr"; @javax.annotation.Nullable private String errorStr; @@ -67,14 +105,6 @@ public class RuleChainDebugEventFilter extends EventFilter { @javax.annotation.Nullable private String message; - public static final String JSON_PROPERTY_ERROR = "error"; - @javax.annotation.Nullable - private Boolean error; - - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public RuleChainDebugEventFilter() { } @@ -102,6 +132,30 @@ public void setServer(@javax.annotation.Nullable String server) { } + public RuleChainDebugEventFilter isError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + return this; + } + + /** + * Boolean value to filter the errors + * @return isError + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IsErrorEnum getIsError() { + return isError; + } + + + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + } + + public RuleChainDebugEventFilter errorStr(@javax.annotation.Nullable String errorStr) { this.errorStr = errorStr; return this; @@ -150,54 +204,6 @@ public void setMessage(@javax.annotation.Nullable String message) { } - public RuleChainDebugEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; - return this; - } - - /** - * Get error - * @return error - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; - } - - - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; - } - - - public RuleChainDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - return this; - } - - /** - * Get isError - * @return isError - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; - } - - - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - } - - @Override public RuleChainDebugEventFilter eventType(@javax.annotation.Nonnull EventType eventType) { this.setEventType(eventType); @@ -223,16 +229,15 @@ public boolean equals(Object o) { } RuleChainDebugEventFilter ruleChainDebugEventFilter = (RuleChainDebugEventFilter) o; return Objects.equals(this.server, ruleChainDebugEventFilter.server) && + Objects.equals(this.isError, ruleChainDebugEventFilter.isError) && Objects.equals(this.errorStr, ruleChainDebugEventFilter.errorStr) && Objects.equals(this.message, ruleChainDebugEventFilter.message) && - Objects.equals(this.error, ruleChainDebugEventFilter.error) && - Objects.equals(this.isError, ruleChainDebugEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, message, error, isError, super.hashCode()); + return Objects.hash(server, isError, errorStr, message, super.hashCode()); } @Override @@ -241,10 +246,9 @@ public String toString() { sb.append("class RuleChainDebugEventFilter {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" server: ").append(toIndentedString(server)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" errorStr: ").append(toIndentedString(errorStr)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -307,6 +311,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sserver%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getServer())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + // add `errorStr` to the URL query string if (getErrorStr() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serrorStr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorStr())))); @@ -317,16 +326,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); } - // add `error` to the URL query string - if (getError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); - } - - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - return joiner.toString(); } static { diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java b/ce/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java index 3ce2fe1f..f7418e50 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java +++ b/ce/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java @@ -42,6 +42,7 @@ */ @JsonPropertyOrder({ RuleNodeDebugEventFilter.JSON_PROPERTY_SERVER, + RuleNodeDebugEventFilter.JSON_PROPERTY_IS_ERROR, RuleNodeDebugEventFilter.JSON_PROPERTY_ERROR_STR, RuleNodeDebugEventFilter.JSON_PROPERTY_MSG_DIRECTION_TYPE, RuleNodeDebugEventFilter.JSON_PROPERTY_ENTITY_ID, @@ -50,9 +51,7 @@ RuleNodeDebugEventFilter.JSON_PROPERTY_MSG_TYPE, RuleNodeDebugEventFilter.JSON_PROPERTY_RELATION_TYPE, RuleNodeDebugEventFilter.JSON_PROPERTY_DATA_SEARCH, - RuleNodeDebugEventFilter.JSON_PROPERTY_METADATA_SEARCH, - RuleNodeDebugEventFilter.JSON_PROPERTY_ERROR, - RuleNodeDebugEventFilter.JSON_PROPERTY_IS_ERROR + RuleNodeDebugEventFilter.JSON_PROPERTY_METADATA_SEARCH }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -66,6 +65,45 @@ public class RuleNodeDebugEventFilter extends EventFilter { @javax.annotation.Nullable private String server; + /** + * Boolean value to filter the errors + */ + public enum IsErrorEnum { + FALSE(Boolean.valueOf("false")), + + TRUE(Boolean.valueOf("true")); + + private Boolean value; + + IsErrorEnum(Boolean value) { + this.value = value; + } + + @JsonValue + public Boolean getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IsErrorEnum fromValue(Boolean value) { + for (IsErrorEnum b : IsErrorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private IsErrorEnum isError; + public static final String JSON_PROPERTY_ERROR_STR = "errorStr"; @javax.annotation.Nullable private String errorStr; @@ -170,14 +208,6 @@ public static EntityTypeEnum fromValue(String value) { @javax.annotation.Nullable private String metadataSearch; - public static final String JSON_PROPERTY_ERROR = "error"; - @javax.annotation.Nullable - private Boolean error; - - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public RuleNodeDebugEventFilter() { } @@ -205,6 +235,30 @@ public void setServer(@javax.annotation.Nullable String server) { } + public RuleNodeDebugEventFilter isError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + return this; + } + + /** + * Boolean value to filter the errors + * @return isError + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IsErrorEnum getIsError() { + return isError; + } + + + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + } + + public RuleNodeDebugEventFilter errorStr(@javax.annotation.Nullable String errorStr) { this.errorStr = errorStr; return this; @@ -421,54 +475,6 @@ public void setMetadataSearch(@javax.annotation.Nullable String metadataSearch) } - public RuleNodeDebugEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; - return this; - } - - /** - * Get error - * @return error - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; - } - - - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; - } - - - public RuleNodeDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - return this; - } - - /** - * Get isError - * @return isError - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; - } - - - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - } - - @Override public RuleNodeDebugEventFilter eventType(@javax.annotation.Nonnull EventType eventType) { this.setEventType(eventType); @@ -494,6 +500,7 @@ public boolean equals(Object o) { } RuleNodeDebugEventFilter ruleNodeDebugEventFilter = (RuleNodeDebugEventFilter) o; return Objects.equals(this.server, ruleNodeDebugEventFilter.server) && + Objects.equals(this.isError, ruleNodeDebugEventFilter.isError) && Objects.equals(this.errorStr, ruleNodeDebugEventFilter.errorStr) && Objects.equals(this.msgDirectionType, ruleNodeDebugEventFilter.msgDirectionType) && Objects.equals(this.entityId, ruleNodeDebugEventFilter.entityId) && @@ -503,14 +510,12 @@ public boolean equals(Object o) { Objects.equals(this.relationType, ruleNodeDebugEventFilter.relationType) && Objects.equals(this.dataSearch, ruleNodeDebugEventFilter.dataSearch) && Objects.equals(this.metadataSearch, ruleNodeDebugEventFilter.metadataSearch) && - Objects.equals(this.error, ruleNodeDebugEventFilter.error) && - Objects.equals(this.isError, ruleNodeDebugEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, msgDirectionType, entityId, entityType, msgId, msgType, relationType, dataSearch, metadataSearch, error, isError, super.hashCode()); + return Objects.hash(server, isError, errorStr, msgDirectionType, entityId, entityType, msgId, msgType, relationType, dataSearch, metadataSearch, super.hashCode()); } @Override @@ -519,6 +524,7 @@ public String toString() { sb.append("class RuleNodeDebugEventFilter {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" server: ").append(toIndentedString(server)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" errorStr: ").append(toIndentedString(errorStr)).append("\n"); sb.append(" msgDirectionType: ").append(toIndentedString(msgDirectionType)).append("\n"); sb.append(" entityId: ").append(toIndentedString(entityId)).append("\n"); @@ -528,8 +534,6 @@ public String toString() { sb.append(" relationType: ").append(toIndentedString(relationType)).append("\n"); sb.append(" dataSearch: ").append(toIndentedString(dataSearch)).append("\n"); sb.append(" metadataSearch: ").append(toIndentedString(metadataSearch)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -592,6 +596,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sserver%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getServer())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + // add `errorStr` to the URL query string if (getErrorStr() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serrorStr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorStr())))); @@ -637,16 +646,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smetadataSearch%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMetadataSearch())))); } - // add `error` to the URL query string - if (getError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); - } - - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - return joiner.toString(); } static { diff --git a/paas/docs/Alarm.md b/paas/docs/Alarm.md index f2576477..714be0f6 100644 --- a/paas/docs/Alarm.md +++ b/paas/docs/Alarm.md @@ -20,7 +20,7 @@ | **ackTs** | **Long** | Timestamp of the alarm acknowledgement, in milliseconds | [optional] | | **clearTs** | **Long** | Timestamp of the alarm clearing, in milliseconds | [optional] | | **assignTs** | **Long** | Timestamp of the alarm assignment, in milliseconds | [optional] | -| **details** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | +| **details** | **com.fasterxml.jackson.databind.JsonNode** | JSON object with alarm details | [optional] | | **propagate** | **Boolean** | Propagation flag to specify if alarm should be propagated to parent entities of alarm originator | [optional] | | **propagateToOwner** | **Boolean** | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator | [optional] | | **propagateToOwnerHierarchy** | **Boolean** | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy | [optional] | diff --git a/paas/docs/AlarmData.md b/paas/docs/AlarmData.md index 34fa7727..ce0fbda5 100644 --- a/paas/docs/AlarmData.md +++ b/paas/docs/AlarmData.md @@ -24,6 +24,7 @@ | **ackTs** | **Long** | Timestamp of the alarm acknowledgement, in milliseconds | [optional] | | **clearTs** | **Long** | Timestamp of the alarm clearing, in milliseconds | [optional] | | **assignTs** | **Long** | Timestamp of the alarm assignment, in milliseconds | [optional] | +| **details** | **com.fasterxml.jackson.databind.JsonNode** | JSON object with alarm details | [optional] | | **propagate** | **Boolean** | Propagation flag to specify if alarm should be propagated to parent entities of alarm originator | [optional] | | **propagateToOwner** | **Boolean** | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator | [optional] | | **propagateToOwnerHierarchy** | **Boolean** | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy | [optional] | @@ -35,7 +36,6 @@ | **assignee** | **AlarmAssignee** | Alarm assignee | [optional] | | **name** | **String** | representing type of the Alarm | [readonly] | | **status** | **AlarmStatus** | status of the Alarm | [readonly] | -| **details** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | diff --git a/paas/docs/AlarmInfo.md b/paas/docs/AlarmInfo.md index bdb5104d..12d6c899 100644 --- a/paas/docs/AlarmInfo.md +++ b/paas/docs/AlarmInfo.md @@ -22,6 +22,7 @@ | **ackTs** | **Long** | Timestamp of the alarm acknowledgement, in milliseconds | [optional] | | **clearTs** | **Long** | Timestamp of the alarm clearing, in milliseconds | [optional] | | **assignTs** | **Long** | Timestamp of the alarm assignment, in milliseconds | [optional] | +| **details** | **com.fasterxml.jackson.databind.JsonNode** | JSON object with alarm details | [optional] | | **propagate** | **Boolean** | Propagation flag to specify if alarm should be propagated to parent entities of alarm originator | [optional] | | **propagateToOwner** | **Boolean** | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator | [optional] | | **propagateToOwnerHierarchy** | **Boolean** | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy | [optional] | @@ -33,7 +34,6 @@ | **assignee** | **AlarmAssignee** | Alarm assignee | [optional] | | **name** | **String** | representing type of the Alarm | [readonly] | | **status** | **AlarmStatus** | status of the Alarm | [readonly] | -| **details** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | diff --git a/paas/docs/ApiKeyControllerApi.md b/paas/docs/ApiKeyControllerApi.md index e3405f9f..92b3a76c 100644 --- a/paas/docs/ApiKeyControllerApi.md +++ b/paas/docs/ApiKeyControllerApi.md @@ -99,7 +99,7 @@ ApiKey saveApiKey(@Nonnull ApiKeyInfo apiKeyInfo) Save API key for user (saveApiKey) -Creates an API key for the given user and returns the token ONCE as 'ApiKey '. Available for any authorized user. +Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'. Available for any authorized user. ### Parameters diff --git a/paas/docs/Asset.md b/paas/docs/Asset.md index 6cd508e0..4428f683 100644 --- a/paas/docs/Asset.md +++ b/paas/docs/Asset.md @@ -16,7 +16,7 @@ | **label** | **String** | Label that may be used in widgets | [optional] | | **assetProfileId** | **AssetProfileId** | JSON object with Asset Profile Id. | [optional] | | **version** | **Long** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the asset. May include: 'description' (string). | [optional] | diff --git a/paas/docs/AssetInfo.md b/paas/docs/AssetInfo.md index 0b74d04f..7ca3bde2 100644 --- a/paas/docs/AssetInfo.md +++ b/paas/docs/AssetInfo.md @@ -18,7 +18,7 @@ | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the asset. May include: 'description' (string). | [optional] | diff --git a/paas/docs/AuditLog.md b/paas/docs/AuditLog.md index 27d4f603..06d9da33 100644 --- a/paas/docs/AuditLog.md +++ b/paas/docs/AuditLog.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the auditLog creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **entityId** | **EntityId** | JSON object with Entity id | [optional] | +| **entityId** | **EntityId** | JSON object with Entity id | [optional] [readonly] | | **entityName** | **String** | Name of the logged entity | [optional] [readonly] | | **userId** | **UserId** | JSON object with User id. | [optional] [readonly] | | **userName** | **String** | Unique user name(email) of the user that performed some action on logged entity | [optional] [readonly] | diff --git a/paas/docs/BlobEntityInfo.md b/paas/docs/BlobEntityInfo.md index 095cb632..c22a2b18 100644 --- a/paas/docs/BlobEntityInfo.md +++ b/paas/docs/BlobEntityInfo.md @@ -14,7 +14,7 @@ | **name** | **String** | blob entity name | [optional] [readonly] | | **type** | **String** | blob entity type | [optional] [readonly] | | **contentType** | **ContentTypeEnum** | blob content type | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the blob entity | [optional] | diff --git a/paas/docs/BlobEntityWithCustomerInfo.md b/paas/docs/BlobEntityWithCustomerInfo.md index 54bcd2a7..69a842e9 100644 --- a/paas/docs/BlobEntityWithCustomerInfo.md +++ b/paas/docs/BlobEntityWithCustomerInfo.md @@ -16,7 +16,7 @@ | **contentType** | **ContentTypeEnum** | blob content type | [optional] [readonly] | | **customerTitle** | **String** | Title of the customer | [optional] | | **customerIsPublic** | **Boolean** | Parameter that specifies if customer is public | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the blob entity | [optional] | diff --git a/paas/docs/CalculatedField.md b/paas/docs/CalculatedField.md index 8a87b153..9241417f 100644 --- a/paas/docs/CalculatedField.md +++ b/paas/docs/CalculatedField.md @@ -18,6 +18,7 @@ | **configurationVersion** | **Integer** | Version of calculated field configuration. | [optional] | | **_configuration** | **CalculatedFieldConfiguration** | | | | **version** | **Long** | | [optional] | +| **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the calculated field | [optional] | diff --git a/paas/docs/CalculatedFieldDebugEventFilter.md b/paas/docs/CalculatedFieldDebugEventFilter.md index 4654cee1..23b34fed 100644 --- a/paas/docs/CalculatedFieldDebugEventFilter.md +++ b/paas/docs/CalculatedFieldDebugEventFilter.md @@ -10,6 +10,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **server** | **String** | String value representing the server name, identifier or ip address where the platform is running | [optional] | +| **isError** | **IsErrorEnum** | Boolean value to filter the errors | [optional] | | **errorStr** | **String** | The case insensitive 'contains' filter based on error message | [optional] | | **entityId** | **String** | String value representing the entity id in the event body | [optional] | | **entityType** | **EntityTypeEnum** | String value representing the entity type | [optional] | @@ -17,8 +18,14 @@ | **msgType** | **String** | String value representing the message type | [optional] | | **arguments** | **String** | String value representing the arguments that were used in the calculation performed | [optional] | | **result** | **String** | String value representing the result of a calculation | [optional] | -| **error** | **Boolean** | | [optional] | -| **isError** | **Boolean** | | [optional] | + + +### Enum: IsErrorEnum + +| Name | Value | +|---- | -----| +| FALSE | "false" | +| TRUE | "true" | ### Enum: EntityTypeEnum diff --git a/paas/docs/CalculatedFieldInfo.md b/paas/docs/CalculatedFieldInfo.md index 5477bbac..1996771b 100644 --- a/paas/docs/CalculatedFieldInfo.md +++ b/paas/docs/CalculatedFieldInfo.md @@ -18,6 +18,7 @@ | **configurationVersion** | **Integer** | Version of calculated field configuration. | [optional] | | **_configuration** | **CalculatedFieldConfiguration** | | | | **version** | **Long** | | [optional] | +| **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the calculated field | [optional] | | **entityName** | **String** | | [optional] | diff --git a/paas/docs/Customer.md b/paas/docs/Customer.md index f95d97e1..c14dd4b5 100644 --- a/paas/docs/Customer.md +++ b/paas/docs/Customer.md @@ -24,7 +24,7 @@ | **customMenuId** | **CustomMenuId** | | [optional] | | **name** | **String** | Name of the customer. Read-only, duplicated from title for backward compatibility | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with parent Customer Id | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the customer. May include: 'description' (string), 'homeDashboardId' (string, UUID of the home dashboard), 'homeDashboardHideToolbar' (boolean, whether to hide the dashboard toolbar), 'isPublic' (boolean, whether this is a public customer). | [optional] | diff --git a/paas/docs/CustomerInfo.md b/paas/docs/CustomerInfo.md index f69f84df..24c2bf3d 100644 --- a/paas/docs/CustomerInfo.md +++ b/paas/docs/CustomerInfo.md @@ -26,7 +26,7 @@ | **groups** | **List\** | Groups | [optional] | | **name** | **String** | Name of the customer. Read-only, duplicated from title for backward compatibility | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with parent Customer Id | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the customer. May include: 'description' (string), 'homeDashboardId' (string, UUID of the home dashboard), 'homeDashboardHideToolbar' (boolean, whether to hide the dashboard toolbar), 'isPublic' (boolean, whether this is a public customer). | [optional] | diff --git a/paas/docs/Dashboard.md b/paas/docs/Dashboard.md index 76572b33..cbe45eb4 100644 --- a/paas/docs/Dashboard.md +++ b/paas/docs/Dashboard.md @@ -7,19 +7,19 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **id** | **DashboardId** | JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. | [optional] | +| **createdTime** | **Long** | Timestamp of the dashboard creation, in milliseconds | [optional] [readonly] | +| **tenantId** | **TenantId** | JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **title** | **String** | Title of the dashboard. | [optional] | +| **name** | **String** | Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. | [optional] [readonly] | | **image** | **String** | Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. | [optional] [readonly] | +| **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | | **mobileHide** | **Boolean** | Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. | [optional] [readonly] | | **mobileOrder** | **Integer** | Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications | [optional] [readonly] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | -| **name** | **String** | Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. | [optional] [readonly] | | **resources** | **List\** | | [optional] | -| **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | -| **createdTime** | **Long** | Timestamp of the dashboard creation, in milliseconds | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id. | [optional] | -| **id** | **DashboardId** | JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | -| **tenantId** | **TenantId** | JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. | [optional] [readonly] | | **version** | **Long** | | [optional] | diff --git a/paas/docs/DashboardInfo.md b/paas/docs/DashboardInfo.md index e11ce9cf..0f17a72a 100644 --- a/paas/docs/DashboardInfo.md +++ b/paas/docs/DashboardInfo.md @@ -7,22 +7,22 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **id** | **DashboardId** | JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. | [optional] | +| **createdTime** | **Long** | Timestamp of the dashboard creation, in milliseconds | [optional] [readonly] | +| **tenantId** | **TenantId** | JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **title** | **String** | Title of the dashboard. | [optional] | +| **name** | **String** | Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. | [optional] [readonly] | | **image** | **String** | Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. | [optional] [readonly] | +| **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | | **mobileHide** | **Boolean** | Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. | [optional] [readonly] | | **mobileOrder** | **Integer** | Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications | [optional] [readonly] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | -| **name** | **String** | Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. | [optional] [readonly] | | **resources** | **List\** | | [optional] | -| **id** | **DashboardId** | JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. | [optional] | -| **createdTime** | **Long** | Timestamp of the dashboard creation, in milliseconds | [optional] [readonly] | -| **tenantId** | **TenantId** | JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id. | [optional] | -| **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | diff --git a/paas/docs/DebugConverterEventFilter.md b/paas/docs/DebugConverterEventFilter.md index abf7db4a..835f516d 100644 --- a/paas/docs/DebugConverterEventFilter.md +++ b/paas/docs/DebugConverterEventFilter.md @@ -10,13 +10,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **server** | **String** | String value representing the server name, identifier or ip address where the platform is running | [optional] | +| **isError** | **IsErrorEnum** | Boolean value to filter the errors | [optional] | | **errorStr** | **String** | The case insensitive 'contains' filter based on error message | [optional] | | **type** | **String** | | [optional] | | **in** | **String** | | [optional] | | **out** | **String** | | [optional] | | **metadata** | **String** | | [optional] | -| **error** | **Boolean** | | [optional] | -| **isError** | **Boolean** | | [optional] | + + +### Enum: IsErrorEnum + +| Name | Value | +|---- | -----| +| FALSE | "false" | +| TRUE | "true" | diff --git a/paas/docs/DebugIntegrationEventFilter.md b/paas/docs/DebugIntegrationEventFilter.md index c9b6d8d6..e86ff935 100644 --- a/paas/docs/DebugIntegrationEventFilter.md +++ b/paas/docs/DebugIntegrationEventFilter.md @@ -10,12 +10,19 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **server** | **String** | String value representing the server name, identifier or ip address where the platform is running | [optional] | +| **isError** | **IsErrorEnum** | Boolean value to filter the errors | [optional] | | **errorStr** | **String** | The case insensitive 'contains' filter based on error message | [optional] | | **type** | **String** | | [optional] | | **message** | **String** | | [optional] | | **statusIntegration** | **String** | | [optional] | -| **error** | **Boolean** | | [optional] | -| **isError** | **Boolean** | | [optional] | + + +### Enum: IsErrorEnum + +| Name | Value | +|---- | -----| +| FALSE | "false" | +| TRUE | "true" | diff --git a/paas/docs/Device.md b/paas/docs/Device.md index a3dbab50..0b00f936 100644 --- a/paas/docs/Device.md +++ b/paas/docs/Device.md @@ -19,7 +19,7 @@ | **softwareId** | **OtaPackageId** | JSON object with Ota Package Id. | [optional] | | **version** | **Long** | | [optional] | | **deviceData** | **DeviceData** | JSON object with content specific to type of transport in the device profile. | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | 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] | diff --git a/paas/docs/DeviceControllerApi.md b/paas/docs/DeviceControllerApi.md index 21291036..e0b283f4 100644 --- a/paas/docs/DeviceControllerApi.md +++ b/paas/docs/DeviceControllerApi.md @@ -584,7 +584,7 @@ Device saveDeviceWithCredentials(@Nonnull SaveDeviceWithCredentialsRequest saveD Create Device (saveDevice) with credentials -Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: \"Access token\" with device profile ID below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: \"Access token\" with device profile default below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: \"X509\" with device profile ID below: Note: credentialsId - format Sha3Hash, certificateValue - format PEM (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: \"MQTT_BASIC\" with device profile ID below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of LwM2M device and RPK credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). +Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: **\"Access token\"** with **device profile default** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). ### Parameters @@ -613,7 +613,7 @@ DeviceCredentials updateDeviceCredentials(@Nonnull DeviceCredentials deviceCrede Update device credentials (updateDeviceCredentials) -During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: \"Access token\" with device ID and with device ID below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: \"X509\" with device profile ID below: Note: credentialsId - format Sha3Hash, certificateValue - format PEM (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: \"MQTT_BASIC\" with device profile ID below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of LwM2M device and RPK credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. +During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. ### Parameters diff --git a/paas/docs/DeviceInfo.md b/paas/docs/DeviceInfo.md index 7f772f34..9db5a77e 100644 --- a/paas/docs/DeviceInfo.md +++ b/paas/docs/DeviceInfo.md @@ -22,7 +22,7 @@ | **groups** | **List\** | Groups | [optional] | | **active** | **Boolean** | Device active flag. | [optional] [readonly] | | **deviceData** | **DeviceData** | JSON object with content specific to type of transport in the device profile. | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | 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] | diff --git a/paas/docs/Domain.md b/paas/docs/Domain.md index 646bed33..07c5e8de 100644 --- a/paas/docs/Domain.md +++ b/paas/docs/Domain.md @@ -16,7 +16,7 @@ A JSON value representing the Domain. | **name** | **String** | Domain name. Cannot be empty | | | **oauth2Enabled** | **Boolean** | Whether OAuth2 settings are enabled or not | [optional] | | **propagateToEdge** | **Boolean** | Whether OAuth2 settings are enabled on Edge or not | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/paas/docs/DomainInfo.md b/paas/docs/DomainInfo.md index 72168f73..c6c36df6 100644 --- a/paas/docs/DomainInfo.md +++ b/paas/docs/DomainInfo.md @@ -15,7 +15,7 @@ | **oauth2Enabled** | **Boolean** | Whether OAuth2 settings are enabled or not | [optional] | | **propagateToEdge** | **Boolean** | Whether OAuth2 settings are enabled on Edge or not | [optional] | | **oauth2ClientInfos** | **List\** | List of available oauth2 clients | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/paas/docs/Edge.md b/paas/docs/Edge.md index 68d4ae39..a701d20f 100644 --- a/paas/docs/Edge.md +++ b/paas/docs/Edge.md @@ -23,7 +23,7 @@ A JSON value representing the edge. | **cloudEndpoint** | **String** | Edge uses this cloud URL to activate and periodically check it's license | | | **edgeLicenseType** | **EdgeLicenseType** | | [optional] | | **version** | **Long** | | [optional] | -| **ownerId** | **EntityId** | | [optional] | +| **ownerId** | **EntityId** | | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the edge. May include: 'description' (string). | [optional] | diff --git a/paas/docs/EdgeEventType.md b/paas/docs/EdgeEventType.md index 449278ea..c1e59953 100644 --- a/paas/docs/EdgeEventType.md +++ b/paas/docs/EdgeEventType.md @@ -94,6 +94,8 @@ * `AI_MODEL` (value: `"AI_MODEL"`) +* `API_KEY` (value: `"API_KEY"`) + --- diff --git a/paas/docs/EdgeInfo.md b/paas/docs/EdgeInfo.md index 18742074..a0e7115d 100644 --- a/paas/docs/EdgeInfo.md +++ b/paas/docs/EdgeInfo.md @@ -23,7 +23,7 @@ | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | -| **ownerId** | **EntityId** | | [optional] | +| **ownerId** | **EntityId** | | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the edge. May include: 'description' (string). | [optional] | diff --git a/paas/docs/EntitiesVersionControlControllerApi.md b/paas/docs/EntitiesVersionControlControllerApi.md index d1fdf2a8..f5a33ba3 100644 --- a/paas/docs/EntitiesVersionControlControllerApi.md +++ b/paas/docs/EntitiesVersionControlControllerApi.md @@ -225,7 +225,7 @@ PageDataEntityVersion listEntityVersions(@Nonnull EntityType entityType, @Nonnul List entity versions (listEntityVersions) -Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe \" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe \" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe \" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. +Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe (johndoe@gmail.com)\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. ### Parameters diff --git a/paas/docs/EntityView.md b/paas/docs/EntityView.md index c6b98988..986d862e 100644 --- a/paas/docs/EntityView.md +++ b/paas/docs/EntityView.md @@ -20,7 +20,7 @@ A JSON object representing the entity view. | **version** | **Long** | | [optional] | | **id** | **EntityViewId** | JSON object with the Entity View Id. Specify this field to update the Entity View. Referencing non-existing Entity View Id will cause error. Omit this field to create new Entity View. | [optional] | | **createdTime** | **Long** | Timestamp of the Entity View creation, in milliseconds | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the entity view. May include: 'description' (string). | [optional] | diff --git a/paas/docs/EntityViewInfo.md b/paas/docs/EntityViewInfo.md index ee0cec48..05a6f669 100644 --- a/paas/docs/EntityViewInfo.md +++ b/paas/docs/EntityViewInfo.md @@ -20,7 +20,7 @@ | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the entity view. May include: 'description' (string). | [optional] | diff --git a/paas/docs/EventInfo.md b/paas/docs/EventInfo.md index f9940f61..2af98e01 100644 --- a/paas/docs/EventInfo.md +++ b/paas/docs/EventInfo.md @@ -12,7 +12,7 @@ | **tenantId** | **TenantId** | JSON object with Tenant Id. | [optional] [readonly] | | **type** | **String** | Event type | [optional] | | **uid** | **String** | string | [optional] | -| **entityId** | **EntityId** | JSON object with Entity Id for which event is created. | [optional] | +| **entityId** | **EntityId** | JSON object with Entity Id for which event is created. | [optional] [readonly] | | **body** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | diff --git a/paas/docs/OAuth2Client.md b/paas/docs/OAuth2Client.md index 6d5f3b9b..e910032b 100644 --- a/paas/docs/OAuth2Client.md +++ b/paas/docs/OAuth2Client.md @@ -27,7 +27,7 @@ | **loginButtonIcon** | **String** | Log in button icon for OAuth2 provider | [optional] | | **platforms** | **List\** | List of platforms for which usage of the OAuth2 client is allowed (empty for all allowed) | [optional] | | **name** | **String** | | [optional] [readonly] | -| **ownerId** | **EntityId** | | [optional] | +| **ownerId** | **EntityId** | | [optional] [readonly] | diff --git a/paas/docs/OtaPackage.md b/paas/docs/OtaPackage.md index cc8265e1..170f261a 100644 --- a/paas/docs/OtaPackage.md +++ b/paas/docs/OtaPackage.md @@ -22,7 +22,7 @@ | **checksumAlgorithm** | **ChecksumAlgorithm** | OTA Package checksum algorithm. | [optional] [readonly] | | **checksum** | **String** | OTA Package checksum. | [optional] [readonly] | | **dataSize** | **Long** | OTA Package data size. | [optional] [readonly] | -| **data** | **OtaPackageData** | | [optional] | +| **data** | **byte[]** | | [optional] | | **name** | **String** | | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | OTA Package description. | [optional] | diff --git a/paas/docs/OtaPackageData.md b/paas/docs/OtaPackageData.md deleted file mode 100644 index 1acf91c1..00000000 --- a/paas/docs/OtaPackageData.md +++ /dev/null @@ -1,29 +0,0 @@ - -# OtaPackageData - -`org.thingsboard.client.model.OtaPackageData` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **_char** | **String** | | [optional] | -| **direct** | **Boolean** | | [optional] | -| **_double** | **Double** | | [optional] | -| **_float** | **Float** | | [optional] | -| **_int** | **Integer** | | [optional] | -| **_long** | **Long** | | [optional] | -| **readOnly** | **Boolean** | | [optional] | -| **_short** | **Integer** | | [optional] | - - - ---- - -### Conventions - -- **Package:** `org.thingsboard.client.model` -- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` -- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` -- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions - diff --git a/paas/docs/Report.md b/paas/docs/Report.md index ccd6f3c4..8b087b5e 100644 --- a/paas/docs/Report.md +++ b/paas/docs/Report.md @@ -15,7 +15,7 @@ | **format** | **TbReportFormat** | | | | **name** | **String** | | | | **userId** | **UserId** | | | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/paas/docs/ReportInfo.md b/paas/docs/ReportInfo.md index 989831f3..ab63b44b 100644 --- a/paas/docs/ReportInfo.md +++ b/paas/docs/ReportInfo.md @@ -18,7 +18,7 @@ | **templateInfo** | **EntityInfo** | | [optional] | | **customerTitle** | **String** | | [optional] | | **userName** | **String** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/paas/docs/ReportTemplate.md b/paas/docs/ReportTemplate.md index 12ea7594..ddb4f161 100644 --- a/paas/docs/ReportTemplate.md +++ b/paas/docs/ReportTemplate.md @@ -19,7 +19,7 @@ A JSON value representing the Report Template. | **description** | **String** | Description | [optional] | | **version** | **Long** | | [optional] | | **_configuration** | **ReportTemplateConfig** | a JSON value with report template configuration | | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/paas/docs/ReportTemplateInfo.md b/paas/docs/ReportTemplateInfo.md index 00b4fbe3..a0c905a5 100644 --- a/paas/docs/ReportTemplateInfo.md +++ b/paas/docs/ReportTemplateInfo.md @@ -17,7 +17,7 @@ | **description** | **String** | Description | [optional] | | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/paas/docs/Role.md b/paas/docs/Role.md index 45734ca7..6f6976df 100644 --- a/paas/docs/Role.md +++ b/paas/docs/Role.md @@ -17,7 +17,7 @@ A JSON value representing the role. | **version** | **Long** | | [optional] | | **id** | **RoleId** | JSON object with the Role Id. Specify this field to update the Role. Referencing non-existing Role Id will cause error. Omit this field to create new Role. | [optional] | | **createdTime** | **Long** | Timestamp of the role creation, in milliseconds | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the role. May include: 'description' (string). | [optional] | diff --git a/paas/docs/RuleChainDebugEventFilter.md b/paas/docs/RuleChainDebugEventFilter.md index 9ace52e2..3c5d9cd3 100644 --- a/paas/docs/RuleChainDebugEventFilter.md +++ b/paas/docs/RuleChainDebugEventFilter.md @@ -10,10 +10,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **server** | **String** | String value representing the server name, identifier or ip address where the platform is running | [optional] | +| **isError** | **IsErrorEnum** | Boolean value to filter the errors | [optional] | | **errorStr** | **String** | The case insensitive 'contains' filter based on error message | [optional] | | **message** | **String** | String value representing the message | [optional] | -| **error** | **Boolean** | | [optional] | -| **isError** | **Boolean** | | [optional] | + + +### Enum: IsErrorEnum + +| Name | Value | +|---- | -----| +| FALSE | "false" | +| TRUE | "true" | diff --git a/paas/docs/RuleNodeDebugEventFilter.md b/paas/docs/RuleNodeDebugEventFilter.md index 6791375f..84b36f06 100644 --- a/paas/docs/RuleNodeDebugEventFilter.md +++ b/paas/docs/RuleNodeDebugEventFilter.md @@ -10,6 +10,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **server** | **String** | String value representing the server name, identifier or ip address where the platform is running | [optional] | +| **isError** | **IsErrorEnum** | Boolean value to filter the errors | [optional] | | **errorStr** | **String** | The case insensitive 'contains' filter based on error message | [optional] | | **msgDirectionType** | **MsgDirectionTypeEnum** | String value representing msg direction type (incoming to entity or outcoming from entity) | [optional] | | **entityId** | **String** | String value representing the entity id in the event body (originator of the message) | [optional] | @@ -19,8 +20,14 @@ | **relationType** | **String** | String value representing the type of message routing | [optional] | | **dataSearch** | **String** | The case insensitive 'contains' filter based on data (key and value) for the message. | [optional] | | **metadataSearch** | **String** | The case insensitive 'contains' filter based on metadata (key and value) for the message. | [optional] | -| **error** | **Boolean** | | [optional] | -| **isError** | **Boolean** | | [optional] | + + +### Enum: IsErrorEnum + +| Name | Value | +|---- | -----| +| FALSE | "false" | +| TRUE | "true" | ### Enum: MsgDirectionTypeEnum diff --git a/paas/docs/ScheduledReportInfo.md b/paas/docs/ScheduledReportInfo.md index 8bfedc8b..b7d81e9f 100644 --- a/paas/docs/ScheduledReportInfo.md +++ b/paas/docs/ScheduledReportInfo.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] | +| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | | **schedule** | **com.fasterxml.jackson.databind.JsonNode** | a JSON value with schedule time configuration | [optional] | @@ -20,7 +20,7 @@ | **templateInfo** | **EntityInfo** | Report template info | [optional] [readonly] | | **customerTitle** | **String** | Customer title | [optional] [readonly] | | **userName** | **String** | Report user name | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | diff --git a/paas/docs/SchedulerEvent.md b/paas/docs/SchedulerEvent.md index e35ec3a1..528b1b11 100644 --- a/paas/docs/SchedulerEvent.md +++ b/paas/docs/SchedulerEvent.md @@ -13,14 +13,14 @@ A JSON value representing the Scheduler Event. | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] | +| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | | **schedule** | **com.fasterxml.jackson.databind.JsonNode** | a JSON value with schedule time configuration | [optional] | | **enabled** | **Boolean** | Enable/disable scheduler | [optional] | | **version** | **Long** | | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | diff --git a/paas/docs/SchedulerEventInfo.md b/paas/docs/SchedulerEventInfo.md index 8ddc8760..24ac6c4c 100644 --- a/paas/docs/SchedulerEventInfo.md +++ b/paas/docs/SchedulerEventInfo.md @@ -11,13 +11,13 @@ | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] | +| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | | **schedule** | **com.fasterxml.jackson.databind.JsonNode** | a JSON value with schedule time configuration | [optional] | | **enabled** | **Boolean** | Enable/disable scheduler | [optional] | | **version** | **Long** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | diff --git a/paas/docs/SchedulerEventWithCustomerInfo.md b/paas/docs/SchedulerEventWithCustomerInfo.md index ba679df0..84b5295b 100644 --- a/paas/docs/SchedulerEventWithCustomerInfo.md +++ b/paas/docs/SchedulerEventWithCustomerInfo.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] | +| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | | **schedule** | **com.fasterxml.jackson.databind.JsonNode** | a JSON value with schedule time configuration | [optional] | @@ -20,7 +20,7 @@ | **customerTitle** | **String** | Title of the customer | [optional] | | **customerIsPublic** | **Boolean** | Parameter that specifies if customer is public | [optional] [readonly] | | **timestamps** | **List\** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | diff --git a/paas/docs/ShortEntityView.md b/paas/docs/ShortEntityView.md index 6a69e94f..d4b7e211 100644 --- a/paas/docs/ShortEntityView.md +++ b/paas/docs/ShortEntityView.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **EntityId** | Entity Id object | | +| **id** | **EntityId** | Entity Id object | [readonly] | | **name** | **String** | Name of the entity | [readonly] | diff --git a/paas/docs/User.md b/paas/docs/User.md index 749c3a6f..bf29719b 100644 --- a/paas/docs/User.md +++ b/paas/docs/User.md @@ -21,7 +21,7 @@ A JSON value representing the User. | **customMenuId** | **CustomMenuId** | | [optional] | | **version** | **Long** | | [optional] | | **name** | **String** | Duplicates the email of the user, readonly | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the user. May include: 'defaultDashboardId' (string, UUID of the default dashboard), 'defaultDashboardFullscreen' (boolean), 'homeDashboardId' (string, UUID of the home dashboard), 'homeDashboardHideToolbar' (boolean), 'lang' (string, user locale, e.g. 'en_US'), 'authProviderName' (string, name of the authentication provider). | [optional] | diff --git a/paas/docs/UserInfo.md b/paas/docs/UserInfo.md index 85a5b5a3..05343c56 100644 --- a/paas/docs/UserInfo.md +++ b/paas/docs/UserInfo.md @@ -21,7 +21,7 @@ | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | | **name** | **String** | Duplicates the email of the user, readonly | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the user. May include: 'defaultDashboardId' (string, UUID of the default dashboard), 'defaultDashboardFullscreen' (boolean), 'homeDashboardId' (string, UUID of the home dashboard), 'homeDashboardHideToolbar' (boolean), 'lang' (string, user locale, e.g. 'en_US'), 'authProviderName' (string, name of the authentication provider). | [optional] | diff --git a/paas/spec/openapi.json b/paas/spec/openapi.json index 721b5fc5..a859aa6d 100644 --- a/paas/spec/openapi.json +++ b/paas/spec/openapi.json @@ -9579,7 +9579,7 @@ "api-key-controller" ], "summary": "Save API key for user (saveApiKey)", - "description": "Creates an API key for the given user and returns the token ONCE as 'ApiKey \u003Cvalue\u003E'.\n\nAvailable for any authorized user. ", + "description": "Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'.\n\nAvailable for any authorized user. ", "operationId": "saveApiKey", "requestBody": { "content": { @@ -39145,7 +39145,7 @@ "device-controller" ], "summary": "Create Device (saveDevice) with credentials ", - "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile default\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"X509\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\nNote: \u003Cb\u003EcredentialsId\u003C/b\u003E - format \u003Cb\u003ESha3Hash\u003C/b\u003E, \u003Cb\u003EcertificateValue\u003C/b\u003E - format \u003Cb\u003EPEM\u003C/b\u003E (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"MQTT_BASIC\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of \u003Cb\u003ELwM2M\u003C/b\u003E device and \u003Cb\u003ERPK\u003C/b\u003E credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: **\"Access token\"** with **device profile ID** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: **\"Access token\"** with **device profile default** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: **\"X509\"** with **device profile ID** below: \n\nNote: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of **LwM2M** device and **RPK** credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", "operationId": "saveDeviceWithCredentials", "parameters": [ { @@ -39517,7 +39517,7 @@ "device-controller" ], "summary": "Update device credentials (updateDeviceCredentials)", - "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials.\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice ID\u003C/b\u003E and with \u003Cb\u003Edevice ID\u003C/b\u003E below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: \u003Cb\u003E\"X509\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\nNote: \u003Cb\u003EcredentialsId\u003C/b\u003E - format \u003Cb\u003ESha3Hash\u003C/b\u003E, \u003Cb\u003EcertificateValue\u003C/b\u003E - format \u003Cb\u003EPEM\u003C/b\u003E (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: \u003Cb\u003E\"MQTT_BASIC\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of \u003Cb\u003ELwM2M\u003C/b\u003E device and \u003Cb\u003ERPK\u003C/b\u003E credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -\u003E \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials.\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: **\"X509\"** with **device profile ID** below: \n\nNote: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of **LwM2M** device and **RPK** credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -\u003E \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", "operationId": "updateDeviceCredentials", "requestBody": { "content": { @@ -52442,7 +52442,7 @@ "entities-version-control-controller" ], "summary": "List entity versions (listEntityVersions)", - "description": "Returns list of versions for a specific entity in a concrete branch. \nYou need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. \nIf specified branch does not exist - empty page data will be returned. \n\nEach version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "description": "Returns list of versions for a specific entity in a concrete branch. \nYou need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. \nIf specified branch does not exist - empty page data will be returned. \n\nEach version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", "operationId": "listEntityVersions", "parameters": [ { @@ -132844,7 +132844,8 @@ "example": 1634115928465 }, "details": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with alarm details" }, "propagate": { "type": "boolean", @@ -133541,6 +133542,10 @@ "description": "Timestamp of the alarm assignment, in milliseconds", "example": 1634115928465 }, + "details": { + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with alarm details" + }, "propagate": { "type": "boolean", "description": "Propagation flag to specify if alarm should be propagated to parent entities of alarm originator", @@ -133598,9 +133603,6 @@ "description": "status of the Alarm", "example": "ACTIVE_UNACK", "readOnly": true - }, - "details": { - "$ref": "#/components/schemas/JsonNode" } }, "required": [ @@ -133829,6 +133831,10 @@ "description": "Timestamp of the alarm assignment, in milliseconds", "example": 1634115928465 }, + "details": { + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with alarm details" + }, "propagate": { "type": "boolean", "description": "Propagation flag to specify if alarm should be propagated to parent entities of alarm originator", @@ -133886,9 +133892,6 @@ "description": "status of the Alarm", "example": "ACTIVE_UNACK", "readOnly": true - }, - "details": { - "$ref": "#/components/schemas/JsonNode" } }, "required": [ @@ -135019,7 +135022,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -135113,7 +135117,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -135502,7 +135507,8 @@ }, "entityId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Entity id" + "description": "JSON object with Entity id", + "readOnly": true }, "entityName": { "type": "string", @@ -136069,7 +136075,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -136136,7 +136143,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -136426,6 +136434,10 @@ "version": { "type": "integer", "format": "int64" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the calculated field" } }, "required": [ @@ -136474,6 +136486,14 @@ "description": "String value representing the server name, identifier or ip address where the platform is running", "example": "ip-172-31-24-152" }, + "isError": { + "type": "boolean", + "description": "Boolean value to filter the errors", + "enum": [ + "false", + "true" + ] + }, "errorStr": { "type": "string", "description": "The case insensitive 'contains' filter based on error message", @@ -136521,13 +136541,6 @@ "example": { "x + y": 32 } - }, - "error": { - "type": "boolean" - }, - "isError": { - "type": "boolean", - "writeOnly": true } } } @@ -136593,6 +136606,10 @@ "type": "integer", "format": "int64" }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the calculated field" + }, "entityName": { "type": "string" } @@ -137856,7 +137873,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -137991,7 +138009,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -138031,15 +138050,54 @@ "Dashboard": { "type": "object", "properties": { + "id": { + "$ref": "#/components/schemas/DashboardId", + "description": "JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the dashboard creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id. Tenant Id of the dashboard can't be changed.", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id. " + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + }, "title": { "type": "string", "description": "Title of the dashboard." }, + "name": { + "type": "string", + "description": "Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", + "readOnly": true + }, "image": { "type": "string", "description": "Thumbnail picture for rendering of the dashboards in a grid view on mobile devices.", "readOnly": true }, + "assignedCustomers": { + "type": "array", + "description": "List of assigned customers with their info.", + "items": { + "$ref": "#/components/schemas/ShortCustomerInfo" + }, + "readOnly": true, + "uniqueItems": true + }, "mobileHide": { "type": "boolean", "description": "Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens.", @@ -138054,50 +138112,12 @@ "configuration": { "$ref": "#/components/schemas/JsonNode" }, - "name": { - "type": "string", - "description": "Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", - "readOnly": true - }, "resources": { "type": "array", "items": { "$ref": "#/components/schemas/ResourceExportData" } }, - "assignedCustomers": { - "type": "array", - "description": "List of assigned customers with their info.", - "items": { - "$ref": "#/components/schemas/ShortCustomerInfo" - }, - "readOnly": true, - "uniqueItems": true - }, - "createdTime": { - "type": "integer", - "format": "int64", - "description": "Timestamp of the dashboard creation, in milliseconds", - "example": 1609459200000, - "readOnly": true - }, - "customerId": { - "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. " - }, - "id": { - "$ref": "#/components/schemas/DashboardId", - "description": "JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard." - }, - "ownerId": { - "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" - }, - "tenantId": { - "$ref": "#/components/schemas/TenantId", - "description": "JSON object with Tenant Id. Tenant Id of the dashboard can't be changed.", - "readOnly": true - }, "version": { "type": "integer", "format": "int64" @@ -138180,40 +138200,6 @@ "DashboardInfo": { "type": "object", "properties": { - "title": { - "type": "string", - "description": "Title of the dashboard." - }, - "image": { - "type": "string", - "description": "Thumbnail picture for rendering of the dashboards in a grid view on mobile devices.", - "readOnly": true - }, - "mobileHide": { - "type": "boolean", - "description": "Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens.", - "readOnly": true - }, - "mobileOrder": { - "type": "integer", - "format": "int32", - "description": "Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications", - "readOnly": true - }, - "configuration": { - "$ref": "#/components/schemas/JsonNode" - }, - "name": { - "type": "string", - "description": "Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", - "readOnly": true - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceExportData" - } - }, "id": { "$ref": "#/components/schemas/DashboardId", "description": "JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard." @@ -138234,6 +138220,25 @@ "$ref": "#/components/schemas/CustomerId", "description": "JSON object with Customer Id. " }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + }, + "title": { + "type": "string", + "description": "Title of the dashboard." + }, + "name": { + "type": "string", + "description": "Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", + "readOnly": true + }, + "image": { + "type": "string", + "description": "Thumbnail picture for rendering of the dashboards in a grid view on mobile devices.", + "readOnly": true + }, "assignedCustomers": { "type": "array", "description": "List of assigned customers with their info.", @@ -138243,6 +138248,26 @@ "readOnly": true, "uniqueItems": true }, + "mobileHide": { + "type": "boolean", + "description": "Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens.", + "readOnly": true + }, + "mobileOrder": { + "type": "integer", + "format": "int32", + "description": "Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications", + "readOnly": true + }, + "configuration": { + "$ref": "#/components/schemas/JsonNode" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceExportData" + } + }, "version": { "type": "integer", "format": "int64" @@ -138259,10 +138284,6 @@ "$ref": "#/components/schemas/EntityInfo" }, "readOnly": true - }, - "ownerId": { - "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" } } }, @@ -138521,6 +138542,14 @@ "description": "String value representing the server name, identifier or ip address where the platform is running", "example": "ip-172-31-24-152" }, + "isError": { + "type": "boolean", + "description": "Boolean value to filter the errors", + "enum": [ + "false", + "true" + ] + }, "errorStr": { "type": "string", "description": "The case insensitive 'contains' filter based on error message", @@ -138537,13 +138566,6 @@ }, "metadata": { "type": "string" - }, - "error": { - "type": "boolean" - }, - "isError": { - "type": "boolean", - "writeOnly": true } } } @@ -138562,6 +138584,14 @@ "description": "String value representing the server name, identifier or ip address where the platform is running", "example": "ip-172-31-24-152" }, + "isError": { + "type": "boolean", + "description": "Boolean value to filter the errors", + "enum": [ + "false", + "true" + ] + }, "errorStr": { "type": "string", "description": "The case insensitive 'contains' filter based on error message", @@ -138575,13 +138605,6 @@ }, "statusIntegration": { "type": "string" - }, - "error": { - "type": "boolean" - }, - "isError": { - "type": "boolean", - "writeOnly": true } } } @@ -139256,7 +139279,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -139574,7 +139598,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -140133,7 +140158,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true } }, "required": [ @@ -140194,7 +140220,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true } }, "required": [ @@ -140484,7 +140511,8 @@ "format": "int64" }, "ownerId": { - "$ref": "#/components/schemas/EntityId" + "$ref": "#/components/schemas/EntityId", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -140739,7 +140767,8 @@ "ENCRYPTION_KEY", "SECRET", "REPORT_TEMPLATE", - "AI_MODEL" + "AI_MODEL", + "API_KEY" ] }, "EdgeId": { @@ -140836,7 +140865,8 @@ "readOnly": true }, "ownerId": { - "$ref": "#/components/schemas/EntityId" + "$ref": "#/components/schemas/EntityId", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -142576,7 +142606,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -142681,7 +142712,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -143063,7 +143095,8 @@ }, "entityId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Entity Id for which event is created." + "description": "JSON object with Entity Id for which event is created.", + "readOnly": true }, "body": { "$ref": "#/components/schemas/JsonNode" @@ -147349,7 +147382,8 @@ "readOnly": true }, "ownerId": { - "$ref": "#/components/schemas/EntityId" + "$ref": "#/components/schemas/EntityId", + "readOnly": true } }, "required": [ @@ -148030,38 +148064,8 @@ "readOnly": true }, "data": { - "type": "object", - "properties": { - "char": { - "type": "string" - }, - "direct": { - "type": "boolean" - }, - "double": { - "type": "number", - "format": "double" - }, - "float": { - "type": "number", - "format": "float" - }, - "int": { - "type": "integer", - "format": "int32" - }, - "long": { - "type": "integer", - "format": "int64" - }, - "readOnly": { - "type": "boolean" - }, - "short": { - "type": "integer", - "format": "int32" - } - } + "type": "string", + "format": "byte" }, "name": { "type": "string", @@ -151459,7 +151463,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true } }, "required": [ @@ -151697,7 +151702,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true } }, "required": [ @@ -152033,7 +152039,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true } }, "required": [ @@ -152162,7 +152169,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true } }, "required": [ @@ -152623,7 +152631,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -152865,6 +152874,14 @@ "description": "String value representing the server name, identifier or ip address where the platform is running", "example": "ip-172-31-24-152" }, + "isError": { + "type": "boolean", + "description": "Boolean value to filter the errors", + "enum": [ + "false", + "true" + ] + }, "errorStr": { "type": "string", "description": "The case insensitive 'contains' filter based on error message", @@ -152873,13 +152890,6 @@ "message": { "type": "string", "description": "String value representing the message" - }, - "error": { - "type": "boolean" - }, - "isError": { - "type": "boolean", - "writeOnly": true } } } @@ -153176,6 +153186,14 @@ "description": "String value representing the server name, identifier or ip address where the platform is running", "example": "ip-172-31-24-152" }, + "isError": { + "type": "boolean", + "description": "Boolean value to filter the errors", + "enum": [ + "false", + "true" + ] + }, "errorStr": { "type": "string", "description": "The case insensitive 'contains' filter based on error message", @@ -153225,13 +153243,6 @@ "type": "string", "description": "The case insensitive 'contains' filter based on metadata (key and value) for the message.", "example": "deviceName" - }, - "error": { - "type": "boolean" - }, - "isError": { - "type": "boolean", - "writeOnly": true } } } @@ -153396,7 +153407,8 @@ }, "originatorId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Originator Id" + "description": "JSON object with Originator Id", + "readOnly": true }, "name": { "type": "string", @@ -153438,7 +153450,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -153473,7 +153486,8 @@ }, "originatorId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Originator Id" + "description": "JSON object with Originator Id", + "readOnly": true }, "name": { "type": "string", @@ -153503,7 +153517,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -153579,7 +153594,8 @@ }, "originatorId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Originator Id" + "description": "JSON object with Originator Id", + "readOnly": true }, "name": { "type": "string", @@ -153606,7 +153622,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -153640,7 +153657,8 @@ }, "originatorId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Originator Id" + "description": "JSON object with Originator Id", + "readOnly": true }, "name": { "type": "string", @@ -153684,7 +153702,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -154018,7 +154037,8 @@ "properties": { "id": { "$ref": "#/components/schemas/EntityId", - "description": "Entity Id object" + "description": "Entity Id object", + "readOnly": true }, "name": { "type": "string", @@ -157871,7 +157891,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -158056,7 +158077,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", diff --git a/paas/src/main/java/org/thingsboard/client/api/ThingsboardApi.java b/paas/src/main/java/org/thingsboard/client/api/ThingsboardApi.java index 6aa0e7da..cb5996de 100644 --- a/paas/src/main/java/org/thingsboard/client/api/ThingsboardApi.java +++ b/paas/src/main/java/org/thingsboard/client/api/ThingsboardApi.java @@ -76070,7 +76070,7 @@ private HttpRequest.Builder listEntityTypeVersionsRequestBuilder(@javax.annotati /** * List entity versions (listEntityVersions) - * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe <johndoe@gmail.com>\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. + * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe (johndoe@gmail.com)\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param externalEntityUuid A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. (required) * @param branch The name of the working branch, for example 'master' (required) @@ -76089,7 +76089,7 @@ public PageDataEntityVersion listEntityVersions(@javax.annotation.Nonnull Entity /** * List entity versions (listEntityVersions) - * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe <johndoe@gmail.com>\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. + * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe (johndoe@gmail.com)\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param externalEntityUuid A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. (required) * @param branch The name of the working branch, for example 'master' (required) @@ -76110,7 +76110,7 @@ public PageDataEntityVersion listEntityVersions(@javax.annotation.Nonnull Entity /** * List entity versions (listEntityVersions) - * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe <johndoe@gmail.com>\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. + * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe (johndoe@gmail.com)\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param externalEntityUuid A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. (required) * @param branch The name of the working branch, for example 'master' (required) @@ -76129,7 +76129,7 @@ public ApiResponse listEntityVersionsWithHttpInfo(@javax. /** * List entity versions (listEntityVersions) - * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe <johndoe@gmail.com>\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. + * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe (johndoe@gmail.com)\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param externalEntityUuid A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. (required) * @param branch The name of the working branch, for example 'master' (required) @@ -82253,7 +82253,7 @@ private HttpRequest.Builder saveAlarmCommentRequestBuilder(@javax.annotation.Non /** * Save API key for user (saveApiKey) - * Creates an API key for the given user and returns the token ONCE as 'ApiKey <value>'. Available for any authorized user. + * Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'. Available for any authorized user. * @param apiKeyInfo (required) * @return ApiKey * @throws ApiException if fails to make API call @@ -82264,7 +82264,7 @@ public ApiKey saveApiKey(@javax.annotation.Nonnull ApiKeyInfo apiKeyInfo) throws /** * Save API key for user (saveApiKey) - * Creates an API key for the given user and returns the token ONCE as 'ApiKey <value>'. Available for any authorized user. + * Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'. Available for any authorized user. * @param apiKeyInfo (required) * @param headers Optional headers to include in the request * @return ApiKey @@ -82277,7 +82277,7 @@ public ApiKey saveApiKey(@javax.annotation.Nonnull ApiKeyInfo apiKeyInfo, Map saveApiKeyWithHttpInfo(@javax.annotation.Nonnull ApiK /** * Save API key for user (saveApiKey) - * Creates an API key for the given user and returns the token ONCE as 'ApiKey <value>'. Available for any authorized user. + * Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'. Available for any authorized user. * @param apiKeyInfo (required) * @param headers Optional headers to include in the request * @return ApiResponse<ApiKey> @@ -84273,7 +84273,7 @@ private HttpRequest.Builder saveDeviceProfileRequestBuilder(@javax.annotation.No /** * Create Device (saveDevice) with credentials - * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: <b>\"Access token\"</b> with <b>device profile default</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: **\"Access token\"** with **device profile default** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param saveDeviceWithCredentialsRequest (required) * @param entityGroupId (optional) * @param entityGroupIds A list of entity group ids, separated by comma ',' (optional) @@ -84289,7 +84289,7 @@ public Device saveDeviceWithCredentials(@javax.annotation.Nonnull SaveDeviceWith /** * Create Device (saveDevice) with credentials - * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: <b>\"Access token\"</b> with <b>device profile default</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: **\"Access token\"** with **device profile default** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param saveDeviceWithCredentialsRequest (required) * @param entityGroupId (optional) * @param entityGroupIds A list of entity group ids, separated by comma ',' (optional) @@ -84307,7 +84307,7 @@ public Device saveDeviceWithCredentials(@javax.annotation.Nonnull SaveDeviceWith /** * Create Device (saveDevice) with credentials - * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: <b>\"Access token\"</b> with <b>device profile default</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: **\"Access token\"** with **device profile default** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param saveDeviceWithCredentialsRequest (required) * @param entityGroupId (optional) * @param entityGroupIds A list of entity group ids, separated by comma ',' (optional) @@ -84323,7 +84323,7 @@ public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotati /** * Create Device (saveDevice) with credentials - * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: <b>\"Access token\"</b> with <b>device profile default</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: **\"Access token\"** with **device profile default** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param saveDeviceWithCredentialsRequest (required) * @param entityGroupId (optional) * @param entityGroupIds A list of entity group ids, separated by comma ',' (optional) @@ -97619,7 +97619,7 @@ private HttpRequest.Builder updateCustomMenuNameRequestBuilder(@javax.annotation /** * Update device credentials (updateDeviceCredentials) - * During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device ID</b> and with <b>device ID</b> below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. + * During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. * @param deviceCredentials (required) * @return DeviceCredentials * @throws ApiException if fails to make API call @@ -97630,7 +97630,7 @@ public DeviceCredentials updateDeviceCredentials(@javax.annotation.Nonnull Devic /** * Update device credentials (updateDeviceCredentials) - * During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device ID</b> and with <b>device ID</b> below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. + * During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. * @param deviceCredentials (required) * @param headers Optional headers to include in the request * @return DeviceCredentials @@ -97643,7 +97643,7 @@ public DeviceCredentials updateDeviceCredentials(@javax.annotation.Nonnull Devic /** * Update device credentials (updateDeviceCredentials) - * During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device ID</b> and with <b>device ID</b> below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. + * During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. * @param deviceCredentials (required) * @return ApiResponse<DeviceCredentials> * @throws ApiException if fails to make API call @@ -97654,7 +97654,7 @@ public ApiResponse updateDeviceCredentialsWithHttpInfo(@javax /** * Update device credentials (updateDeviceCredentials) - * During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device ID</b> and with <b>device ID</b> below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. + * During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. * @param deviceCredentials (required) * @param headers Optional headers to include in the request * @return ApiResponse<DeviceCredentials> diff --git a/paas/src/main/java/org/thingsboard/client/model/Alarm.java b/paas/src/main/java/org/thingsboard/client/model/Alarm.java index fc3da55a..a12398bd 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Alarm.java +++ b/paas/src/main/java/org/thingsboard/client/model/Alarm.java @@ -124,7 +124,7 @@ public class Alarm { public static final String JSON_PROPERTY_DETAILS = "details"; @javax.annotation.Nullable - private com.fasterxml.jackson.databind.JsonNode details = null; + private com.fasterxml.jackson.databind.JsonNode details; public static final String JSON_PROPERTY_PROPAGATE = "propagate"; @javax.annotation.Nullable @@ -479,7 +479,7 @@ public Alarm details(@javax.annotation.Nullable com.fasterxml.jackson.databind.J } /** - * Get details + * JSON object with alarm details * @return details */ @javax.annotation.Nullable diff --git a/paas/src/main/java/org/thingsboard/client/model/AlarmData.java b/paas/src/main/java/org/thingsboard/client/model/AlarmData.java index 83574697..6c5d4053 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AlarmData.java +++ b/paas/src/main/java/org/thingsboard/client/model/AlarmData.java @@ -65,6 +65,7 @@ AlarmData.JSON_PROPERTY_ACK_TS, AlarmData.JSON_PROPERTY_CLEAR_TS, AlarmData.JSON_PROPERTY_ASSIGN_TS, + AlarmData.JSON_PROPERTY_DETAILS, AlarmData.JSON_PROPERTY_PROPAGATE, AlarmData.JSON_PROPERTY_PROPAGATE_TO_OWNER, AlarmData.JSON_PROPERTY_PROPAGATE_TO_OWNER_HIERARCHY, @@ -75,8 +76,7 @@ AlarmData.JSON_PROPERTY_ORIGINATOR_DISPLAY_NAME, AlarmData.JSON_PROPERTY_ASSIGNEE, AlarmData.JSON_PROPERTY_NAME, - AlarmData.JSON_PROPERTY_STATUS, - AlarmData.JSON_PROPERTY_DETAILS + AlarmData.JSON_PROPERTY_STATUS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class AlarmData { @@ -148,6 +148,10 @@ public class AlarmData { @javax.annotation.Nullable private Long assignTs; + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private com.fasterxml.jackson.databind.JsonNode details; + public static final String JSON_PROPERTY_PROPAGATE = "propagate"; @javax.annotation.Nullable private Boolean propagate; @@ -192,10 +196,6 @@ public class AlarmData { @javax.annotation.Nonnull private AlarmStatus status; - public static final String JSON_PROPERTY_DETAILS = "details"; - @javax.annotation.Nullable - private com.fasterxml.jackson.databind.JsonNode details = null; - public AlarmData() { } @@ -601,6 +601,30 @@ public void setAssignTs(@javax.annotation.Nullable Long assignTs) { } + public AlarmData details(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { + this.details = details; + return this; + } + + /** + * JSON object with alarm details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public com.fasterxml.jackson.databind.JsonNode getDetails() { + return details; + } + + + @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { + this.details = details; + } + + public AlarmData propagate(@javax.annotation.Nullable Boolean propagate) { this.propagate = propagate; return this; @@ -853,30 +877,6 @@ public AlarmStatus getStatus() { - public AlarmData details(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { - this.details = details; - return this; - } - - /** - * Get details - * @return details - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public com.fasterxml.jackson.databind.JsonNode getDetails() { - return details; - } - - - @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDetails(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { - this.details = details; - } - - /** * Return true if this AlarmData object is equal to o. */ @@ -906,6 +906,7 @@ public boolean equals(Object o) { Objects.equals(this.ackTs, alarmData.ackTs) && Objects.equals(this.clearTs, alarmData.clearTs) && Objects.equals(this.assignTs, alarmData.assignTs) && + Objects.equals(this.details, alarmData.details) && Objects.equals(this.propagate, alarmData.propagate) && Objects.equals(this.propagateToOwner, alarmData.propagateToOwner) && Objects.equals(this.propagateToOwnerHierarchy, alarmData.propagateToOwnerHierarchy) && @@ -916,13 +917,12 @@ public boolean equals(Object o) { Objects.equals(this.originatorDisplayName, alarmData.originatorDisplayName) && Objects.equals(this.assignee, alarmData.assignee) && Objects.equals(this.name, alarmData.name) && - Objects.equals(this.status, alarmData.status) && - Objects.equals(this.details, alarmData.details); + Objects.equals(this.status, alarmData.status); } @Override public int hashCode() { - return Objects.hash(entityId, latest, id, createdTime, tenantId, customerId, type, originator, severity, acknowledged, cleared, assigneeId, startTs, endTs, ackTs, clearTs, assignTs, propagate, propagateToOwner, propagateToOwnerHierarchy, propagateToTenant, propagateRelationTypes, originatorName, originatorLabel, originatorDisplayName, assignee, name, status, details); + return Objects.hash(entityId, latest, id, createdTime, tenantId, customerId, type, originator, severity, acknowledged, cleared, assigneeId, startTs, endTs, ackTs, clearTs, assignTs, details, propagate, propagateToOwner, propagateToOwnerHierarchy, propagateToTenant, propagateRelationTypes, originatorName, originatorLabel, originatorDisplayName, assignee, name, status); } @Override @@ -946,6 +946,7 @@ public String toString() { sb.append(" ackTs: ").append(toIndentedString(ackTs)).append("\n"); sb.append(" clearTs: ").append(toIndentedString(clearTs)).append("\n"); sb.append(" assignTs: ").append(toIndentedString(assignTs)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); sb.append(" propagate: ").append(toIndentedString(propagate)).append("\n"); sb.append(" propagateToOwner: ").append(toIndentedString(propagateToOwner)).append("\n"); sb.append(" propagateToOwnerHierarchy: ").append(toIndentedString(propagateToOwnerHierarchy)).append("\n"); @@ -957,7 +958,6 @@ public String toString() { sb.append(" assignee: ").append(toIndentedString(assignee)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" details: ").append(toIndentedString(details)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1094,6 +1094,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sassignTs%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAssignTs())))); } + // add `details` to the URL query string + if (getDetails() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sdetails%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetails())))); + } + // add `propagate` to the URL query string if (getPropagate() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%spropagate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPropagate())))); @@ -1153,11 +1158,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); } - // add `details` to the URL query string - if (getDetails() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdetails%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetails())))); - } - return joiner.toString(); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/AlarmInfo.java b/paas/src/main/java/org/thingsboard/client/model/AlarmInfo.java index ac853604..d33176c3 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AlarmInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/AlarmInfo.java @@ -60,6 +60,7 @@ AlarmInfo.JSON_PROPERTY_ACK_TS, AlarmInfo.JSON_PROPERTY_CLEAR_TS, AlarmInfo.JSON_PROPERTY_ASSIGN_TS, + AlarmInfo.JSON_PROPERTY_DETAILS, AlarmInfo.JSON_PROPERTY_PROPAGATE, AlarmInfo.JSON_PROPERTY_PROPAGATE_TO_OWNER, AlarmInfo.JSON_PROPERTY_PROPAGATE_TO_OWNER_HIERARCHY, @@ -70,8 +71,7 @@ AlarmInfo.JSON_PROPERTY_ORIGINATOR_DISPLAY_NAME, AlarmInfo.JSON_PROPERTY_ASSIGNEE, AlarmInfo.JSON_PROPERTY_NAME, - AlarmInfo.JSON_PROPERTY_STATUS, - AlarmInfo.JSON_PROPERTY_DETAILS + AlarmInfo.JSON_PROPERTY_STATUS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class AlarmInfo { @@ -135,6 +135,10 @@ public class AlarmInfo { @javax.annotation.Nullable private Long assignTs; + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private com.fasterxml.jackson.databind.JsonNode details; + public static final String JSON_PROPERTY_PROPAGATE = "propagate"; @javax.annotation.Nullable private Boolean propagate; @@ -179,10 +183,6 @@ public class AlarmInfo { @javax.annotation.Nonnull private AlarmStatus status; - public static final String JSON_PROPERTY_DETAILS = "details"; - @javax.annotation.Nullable - private com.fasterxml.jackson.databind.JsonNode details = null; - public AlarmInfo() { } @@ -532,6 +532,30 @@ public void setAssignTs(@javax.annotation.Nullable Long assignTs) { } + public AlarmInfo details(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { + this.details = details; + return this; + } + + /** + * JSON object with alarm details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public com.fasterxml.jackson.databind.JsonNode getDetails() { + return details; + } + + + @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { + this.details = details; + } + + public AlarmInfo propagate(@javax.annotation.Nullable Boolean propagate) { this.propagate = propagate; return this; @@ -784,30 +808,6 @@ public AlarmStatus getStatus() { - public AlarmInfo details(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { - this.details = details; - return this; - } - - /** - * Get details - * @return details - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public com.fasterxml.jackson.databind.JsonNode getDetails() { - return details; - } - - - @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDetails(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { - this.details = details; - } - - /** * Return true if this AlarmInfo object is equal to o. */ @@ -835,6 +835,7 @@ public boolean equals(Object o) { Objects.equals(this.ackTs, alarmInfo.ackTs) && Objects.equals(this.clearTs, alarmInfo.clearTs) && Objects.equals(this.assignTs, alarmInfo.assignTs) && + Objects.equals(this.details, alarmInfo.details) && Objects.equals(this.propagate, alarmInfo.propagate) && Objects.equals(this.propagateToOwner, alarmInfo.propagateToOwner) && Objects.equals(this.propagateToOwnerHierarchy, alarmInfo.propagateToOwnerHierarchy) && @@ -845,13 +846,12 @@ public boolean equals(Object o) { Objects.equals(this.originatorDisplayName, alarmInfo.originatorDisplayName) && Objects.equals(this.assignee, alarmInfo.assignee) && Objects.equals(this.name, alarmInfo.name) && - Objects.equals(this.status, alarmInfo.status) && - Objects.equals(this.details, alarmInfo.details); + Objects.equals(this.status, alarmInfo.status); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, customerId, type, originator, severity, acknowledged, cleared, assigneeId, startTs, endTs, ackTs, clearTs, assignTs, propagate, propagateToOwner, propagateToOwnerHierarchy, propagateToTenant, propagateRelationTypes, originatorName, originatorLabel, originatorDisplayName, assignee, name, status, details); + return Objects.hash(id, createdTime, tenantId, customerId, type, originator, severity, acknowledged, cleared, assigneeId, startTs, endTs, ackTs, clearTs, assignTs, details, propagate, propagateToOwner, propagateToOwnerHierarchy, propagateToTenant, propagateRelationTypes, originatorName, originatorLabel, originatorDisplayName, assignee, name, status); } @Override @@ -873,6 +873,7 @@ public String toString() { sb.append(" ackTs: ").append(toIndentedString(ackTs)).append("\n"); sb.append(" clearTs: ").append(toIndentedString(clearTs)).append("\n"); sb.append(" assignTs: ").append(toIndentedString(assignTs)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); sb.append(" propagate: ").append(toIndentedString(propagate)).append("\n"); sb.append(" propagateToOwner: ").append(toIndentedString(propagateToOwner)).append("\n"); sb.append(" propagateToOwnerHierarchy: ").append(toIndentedString(propagateToOwnerHierarchy)).append("\n"); @@ -884,7 +885,6 @@ public String toString() { sb.append(" assignee: ").append(toIndentedString(assignee)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" details: ").append(toIndentedString(details)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1007,6 +1007,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sassignTs%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAssignTs())))); } + // add `details` to the URL query string + if (getDetails() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sdetails%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetails())))); + } + // add `propagate` to the URL query string if (getPropagate() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%spropagate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPropagate())))); @@ -1066,11 +1071,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); } - // add `details` to the URL query string - if (getDetails() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdetails%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetails())))); - } - return joiner.toString(); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/Asset.java b/paas/src/main/java/org/thingsboard/client/model/Asset.java index 760a904a..652c43ad 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Asset.java +++ b/paas/src/main/java/org/thingsboard/client/model/Asset.java @@ -105,12 +105,14 @@ public Asset() { public Asset( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; + this.ownerId = ownerId; } public Asset id(@javax.annotation.Nullable AssetId id) { @@ -299,11 +301,6 @@ public void setVersion(@javax.annotation.Nullable Long version) { } - public Asset ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -316,11 +313,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public Asset additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/AssetInfo.java b/paas/src/main/java/org/thingsboard/client/model/AssetInfo.java index 12e4bf59..f8b8a531 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AssetInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/AssetInfo.java @@ -119,13 +119,15 @@ public AssetInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName + @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; this.ownerName = ownerName; + this.ownerId = ownerId; } public AssetInfo id(@javax.annotation.Nullable AssetId id) { @@ -360,11 +362,6 @@ public void setGroups(@javax.annotation.Nullable List groups) { } - public AssetInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -377,11 +374,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public AssetInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/AuditLog.java b/paas/src/main/java/org/thingsboard/client/model/AuditLog.java index 4bc53623..1ff6864f 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AuditLog.java +++ b/paas/src/main/java/org/thingsboard/client/model/AuditLog.java @@ -113,6 +113,7 @@ public AuditLog( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_ENTITY_ID) EntityId entityId, @JsonProperty(JSON_PROPERTY_ENTITY_NAME) String entityName, @JsonProperty(JSON_PROPERTY_USER_ID) UserId userId, @JsonProperty(JSON_PROPERTY_USER_NAME) String userName, @@ -125,6 +126,7 @@ public AuditLog( this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; + this.entityId = entityId; this.entityName = entityName; this.userId = userId; this.userName = userName; @@ -200,11 +202,6 @@ public CustomerId getCustomerId() { - public AuditLog entityId(@javax.annotation.Nullable EntityId entityId) { - this.entityId = entityId; - return this; - } - /** * JSON object with Entity id * @return entityId @@ -217,11 +214,6 @@ public EntityId getEntityId() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEntityId(@javax.annotation.Nullable EntityId entityId) { - this.entityId = entityId; - } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/BlobEntityInfo.java b/paas/src/main/java/org/thingsboard/client/model/BlobEntityInfo.java index 34ea1c41..b6d12b5c 100644 --- a/paas/src/main/java/org/thingsboard/client/model/BlobEntityInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/BlobEntityInfo.java @@ -134,7 +134,8 @@ public BlobEntityInfo( @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_NAME) String name, @JsonProperty(JSON_PROPERTY_TYPE) String type, - @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) ContentTypeEnum contentType + @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) ContentTypeEnum contentType, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; @@ -143,6 +144,7 @@ public BlobEntityInfo( this.name = name; this.type = type; this.contentType = contentType; + this.ownerId = ownerId; } public BlobEntityInfo id(@javax.annotation.Nullable BlobEntityId id) { @@ -253,11 +255,6 @@ public ContentTypeEnum getContentType() { - public BlobEntityInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -270,11 +267,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public BlobEntityInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/BlobEntityWithCustomerInfo.java b/paas/src/main/java/org/thingsboard/client/model/BlobEntityWithCustomerInfo.java index e0f6dacd..9ea3b41f 100644 --- a/paas/src/main/java/org/thingsboard/client/model/BlobEntityWithCustomerInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/BlobEntityWithCustomerInfo.java @@ -145,7 +145,8 @@ public BlobEntityWithCustomerInfo( @JsonProperty(JSON_PROPERTY_NAME) String name, @JsonProperty(JSON_PROPERTY_TYPE) String type, @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) ContentTypeEnum contentType, - @JsonProperty(JSON_PROPERTY_CUSTOMER_IS_PUBLIC) Boolean customerIsPublic + @JsonProperty(JSON_PROPERTY_CUSTOMER_IS_PUBLIC) Boolean customerIsPublic, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; @@ -155,6 +156,7 @@ public BlobEntityWithCustomerInfo( this.type = type; this.contentType = contentType; this.customerIsPublic = customerIsPublic; + this.ownerId = ownerId; } public BlobEntityWithCustomerInfo id(@javax.annotation.Nullable BlobEntityId id) { @@ -303,11 +305,6 @@ public Boolean getCustomerIsPublic() { - public BlobEntityWithCustomerInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -320,11 +317,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public BlobEntityWithCustomerInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/CalculatedField.java b/paas/src/main/java/org/thingsboard/client/model/CalculatedField.java index b17f4688..2800ba59 100644 --- a/paas/src/main/java/org/thingsboard/client/model/CalculatedField.java +++ b/paas/src/main/java/org/thingsboard/client/model/CalculatedField.java @@ -51,7 +51,8 @@ CalculatedField.JSON_PROPERTY_DEBUG_SETTINGS, CalculatedField.JSON_PROPERTY_CONFIGURATION_VERSION, CalculatedField.JSON_PROPERTY_CONFIGURATION, - CalculatedField.JSON_PROPERTY_VERSION + CalculatedField.JSON_PROPERTY_VERSION, + CalculatedField.JSON_PROPERTY_ADDITIONAL_INFO }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class CalculatedField { @@ -99,6 +100,10 @@ public class CalculatedField { @javax.annotation.Nullable private Long version; + public static final String JSON_PROPERTY_ADDITIONAL_INFO = "additionalInfo"; + @javax.annotation.Nullable + private com.fasterxml.jackson.databind.JsonNode additionalInfo; + public CalculatedField() { } @@ -366,6 +371,30 @@ public void setVersion(@javax.annotation.Nullable Long version) { } + public CalculatedField additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { + this.additionalInfo = additionalInfo; + return this; + } + + /** + * Additional parameters of the calculated field + * @return additionalInfo + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ADDITIONAL_INFO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public com.fasterxml.jackson.databind.JsonNode getAdditionalInfo() { + return additionalInfo; + } + + + @JsonProperty(value = JSON_PROPERTY_ADDITIONAL_INFO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdditionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { + this.additionalInfo = additionalInfo; + } + + /** * Return true if this CalculatedField object is equal to o. */ @@ -388,12 +417,13 @@ public boolean equals(Object o) { Objects.equals(this.debugSettings, calculatedField.debugSettings) && Objects.equals(this.configurationVersion, calculatedField.configurationVersion) && Objects.equals(this._configuration, calculatedField._configuration) && - Objects.equals(this.version, calculatedField.version); + Objects.equals(this.version, calculatedField.version) && + Objects.equals(this.additionalInfo, calculatedField.additionalInfo); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, entityId, type, name, debugMode, debugSettings, configurationVersion, _configuration, version); + return Objects.hash(id, createdTime, tenantId, entityId, type, name, debugMode, debugSettings, configurationVersion, _configuration, version, additionalInfo); } @Override @@ -411,6 +441,7 @@ public String toString() { sb.append(" configurationVersion: ").append(toIndentedString(configurationVersion)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); sb.append("}"); return sb.toString(); } @@ -513,6 +544,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); } + // add `additionalInfo` to the URL query string + if (getAdditionalInfo() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sadditionalInfo%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInfo())))); + } + return joiner.toString(); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java b/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java index 8891973e..825bc7c1 100644 --- a/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java +++ b/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java @@ -42,15 +42,14 @@ */ @JsonPropertyOrder({ CalculatedFieldDebugEventFilter.JSON_PROPERTY_SERVER, + CalculatedFieldDebugEventFilter.JSON_PROPERTY_IS_ERROR, CalculatedFieldDebugEventFilter.JSON_PROPERTY_ERROR_STR, CalculatedFieldDebugEventFilter.JSON_PROPERTY_ENTITY_ID, CalculatedFieldDebugEventFilter.JSON_PROPERTY_ENTITY_TYPE, CalculatedFieldDebugEventFilter.JSON_PROPERTY_MSG_ID, CalculatedFieldDebugEventFilter.JSON_PROPERTY_MSG_TYPE, CalculatedFieldDebugEventFilter.JSON_PROPERTY_ARGUMENTS, - CalculatedFieldDebugEventFilter.JSON_PROPERTY_RESULT, - CalculatedFieldDebugEventFilter.JSON_PROPERTY_ERROR, - CalculatedFieldDebugEventFilter.JSON_PROPERTY_IS_ERROR + CalculatedFieldDebugEventFilter.JSON_PROPERTY_RESULT }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -64,6 +63,45 @@ public class CalculatedFieldDebugEventFilter extends EventFilter { @javax.annotation.Nullable private String server; + /** + * Boolean value to filter the errors + */ + public enum IsErrorEnum { + FALSE(Boolean.valueOf("false")), + + TRUE(Boolean.valueOf("true")); + + private Boolean value; + + IsErrorEnum(Boolean value) { + this.value = value; + } + + @JsonValue + public Boolean getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IsErrorEnum fromValue(Boolean value) { + for (IsErrorEnum b : IsErrorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private IsErrorEnum isError; + public static final String JSON_PROPERTY_ERROR_STR = "errorStr"; @javax.annotation.Nullable private String errorStr; @@ -125,14 +163,6 @@ public static EntityTypeEnum fromValue(String value) { @javax.annotation.Nullable private String result; - public static final String JSON_PROPERTY_ERROR = "error"; - @javax.annotation.Nullable - private Boolean error; - - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public CalculatedFieldDebugEventFilter() { } @@ -160,6 +190,30 @@ public void setServer(@javax.annotation.Nullable String server) { } + public CalculatedFieldDebugEventFilter isError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + return this; + } + + /** + * Boolean value to filter the errors + * @return isError + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IsErrorEnum getIsError() { + return isError; + } + + + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + } + + public CalculatedFieldDebugEventFilter errorStr(@javax.annotation.Nullable String errorStr) { this.errorStr = errorStr; return this; @@ -328,54 +382,6 @@ public void setResult(@javax.annotation.Nullable String result) { } - public CalculatedFieldDebugEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; - return this; - } - - /** - * Get error - * @return error - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; - } - - - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; - } - - - public CalculatedFieldDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - return this; - } - - /** - * Get isError - * @return isError - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; - } - - - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - } - - @Override public CalculatedFieldDebugEventFilter eventType(@javax.annotation.Nonnull EventType eventType) { this.setEventType(eventType); @@ -401,6 +407,7 @@ public boolean equals(Object o) { } CalculatedFieldDebugEventFilter calculatedFieldDebugEventFilter = (CalculatedFieldDebugEventFilter) o; return Objects.equals(this.server, calculatedFieldDebugEventFilter.server) && + Objects.equals(this.isError, calculatedFieldDebugEventFilter.isError) && Objects.equals(this.errorStr, calculatedFieldDebugEventFilter.errorStr) && Objects.equals(this.entityId, calculatedFieldDebugEventFilter.entityId) && Objects.equals(this.entityType, calculatedFieldDebugEventFilter.entityType) && @@ -408,14 +415,12 @@ public boolean equals(Object o) { Objects.equals(this.msgType, calculatedFieldDebugEventFilter.msgType) && Objects.equals(this.arguments, calculatedFieldDebugEventFilter.arguments) && Objects.equals(this.result, calculatedFieldDebugEventFilter.result) && - Objects.equals(this.error, calculatedFieldDebugEventFilter.error) && - Objects.equals(this.isError, calculatedFieldDebugEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, entityId, entityType, msgId, msgType, arguments, result, error, isError, super.hashCode()); + return Objects.hash(server, isError, errorStr, entityId, entityType, msgId, msgType, arguments, result, super.hashCode()); } @Override @@ -424,6 +429,7 @@ public String toString() { sb.append("class CalculatedFieldDebugEventFilter {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" server: ").append(toIndentedString(server)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" errorStr: ").append(toIndentedString(errorStr)).append("\n"); sb.append(" entityId: ").append(toIndentedString(entityId)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); @@ -431,8 +437,6 @@ public String toString() { sb.append(" msgType: ").append(toIndentedString(msgType)).append("\n"); sb.append(" arguments: ").append(toIndentedString(arguments)).append("\n"); sb.append(" result: ").append(toIndentedString(result)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -495,6 +499,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sserver%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getServer())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + // add `errorStr` to the URL query string if (getErrorStr() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serrorStr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorStr())))); @@ -530,16 +539,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); } - // add `error` to the URL query string - if (getError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); - } - - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldInfo.java b/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldInfo.java index 3134bf8a..76329673 100644 --- a/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/CalculatedFieldInfo.java @@ -52,6 +52,7 @@ CalculatedFieldInfo.JSON_PROPERTY_CONFIGURATION_VERSION, CalculatedFieldInfo.JSON_PROPERTY_CONFIGURATION, CalculatedFieldInfo.JSON_PROPERTY_VERSION, + CalculatedFieldInfo.JSON_PROPERTY_ADDITIONAL_INFO, CalculatedFieldInfo.JSON_PROPERTY_ENTITY_NAME }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @@ -100,6 +101,10 @@ public class CalculatedFieldInfo { @javax.annotation.Nullable private Long version; + public static final String JSON_PROPERTY_ADDITIONAL_INFO = "additionalInfo"; + @javax.annotation.Nullable + private com.fasterxml.jackson.databind.JsonNode additionalInfo; + public static final String JSON_PROPERTY_ENTITY_NAME = "entityName"; @javax.annotation.Nullable private String entityName; @@ -371,6 +376,30 @@ public void setVersion(@javax.annotation.Nullable Long version) { } + public CalculatedFieldInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { + this.additionalInfo = additionalInfo; + return this; + } + + /** + * Additional parameters of the calculated field + * @return additionalInfo + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ADDITIONAL_INFO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public com.fasterxml.jackson.databind.JsonNode getAdditionalInfo() { + return additionalInfo; + } + + + @JsonProperty(value = JSON_PROPERTY_ADDITIONAL_INFO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdditionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { + this.additionalInfo = additionalInfo; + } + + public CalculatedFieldInfo entityName(@javax.annotation.Nullable String entityName) { this.entityName = entityName; return this; @@ -418,12 +447,13 @@ public boolean equals(Object o) { Objects.equals(this.configurationVersion, calculatedFieldInfo.configurationVersion) && Objects.equals(this._configuration, calculatedFieldInfo._configuration) && Objects.equals(this.version, calculatedFieldInfo.version) && + Objects.equals(this.additionalInfo, calculatedFieldInfo.additionalInfo) && Objects.equals(this.entityName, calculatedFieldInfo.entityName); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, entityId, type, name, debugMode, debugSettings, configurationVersion, _configuration, version, entityName); + return Objects.hash(id, createdTime, tenantId, entityId, type, name, debugMode, debugSettings, configurationVersion, _configuration, version, additionalInfo, entityName); } @Override @@ -441,6 +471,7 @@ public String toString() { sb.append(" configurationVersion: ").append(toIndentedString(configurationVersion)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); sb.append(" entityName: ").append(toIndentedString(entityName)).append("\n"); sb.append("}"); return sb.toString(); @@ -544,6 +575,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); } + // add `additionalInfo` to the URL query string + if (getAdditionalInfo() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sadditionalInfo%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInfo())))); + } + // add `entityName` to the URL query string if (getEntityName() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityName%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityName())))); diff --git a/paas/src/main/java/org/thingsboard/client/model/Customer.java b/paas/src/main/java/org/thingsboard/client/model/Customer.java index a3c1d6a7..36113d1e 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Customer.java +++ b/paas/src/main/java/org/thingsboard/client/model/Customer.java @@ -144,12 +144,14 @@ public Customer() { public Customer( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.name = name; this.customerId = customerId; + this.ownerId = ownerId; } public Customer id(@javax.annotation.Nullable CustomerId id) { @@ -530,11 +532,6 @@ public CustomerId getCustomerId() { - public Customer ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -547,11 +544,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public Customer additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/CustomerInfo.java b/paas/src/main/java/org/thingsboard/client/model/CustomerInfo.java index 6973243e..4c459058 100644 --- a/paas/src/main/java/org/thingsboard/client/model/CustomerInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/CustomerInfo.java @@ -158,13 +158,15 @@ public CustomerInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.ownerName = ownerName; this.name = name; this.customerId = customerId; + this.ownerId = ownerId; } public CustomerInfo id(@javax.annotation.Nullable CustomerId id) { @@ -591,11 +593,6 @@ public CustomerId getCustomerId() { - public CustomerInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -608,11 +605,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public CustomerInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/Dashboard.java b/paas/src/main/java/org/thingsboard/client/model/Dashboard.java index d996aa87..a59d0a8c 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Dashboard.java +++ b/paas/src/main/java/org/thingsboard/client/model/Dashboard.java @@ -46,74 +46,74 @@ * Dashboard */ @JsonPropertyOrder({ + Dashboard.JSON_PROPERTY_ID, + Dashboard.JSON_PROPERTY_CREATED_TIME, + Dashboard.JSON_PROPERTY_TENANT_ID, + Dashboard.JSON_PROPERTY_CUSTOMER_ID, + Dashboard.JSON_PROPERTY_OWNER_ID, Dashboard.JSON_PROPERTY_TITLE, + Dashboard.JSON_PROPERTY_NAME, Dashboard.JSON_PROPERTY_IMAGE, + Dashboard.JSON_PROPERTY_ASSIGNED_CUSTOMERS, Dashboard.JSON_PROPERTY_MOBILE_HIDE, Dashboard.JSON_PROPERTY_MOBILE_ORDER, Dashboard.JSON_PROPERTY_CONFIGURATION, - Dashboard.JSON_PROPERTY_NAME, Dashboard.JSON_PROPERTY_RESOURCES, - Dashboard.JSON_PROPERTY_ASSIGNED_CUSTOMERS, - Dashboard.JSON_PROPERTY_CREATED_TIME, - Dashboard.JSON_PROPERTY_CUSTOMER_ID, - Dashboard.JSON_PROPERTY_ID, - Dashboard.JSON_PROPERTY_OWNER_ID, - Dashboard.JSON_PROPERTY_TENANT_ID, Dashboard.JSON_PROPERTY_VERSION }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class Dashboard { - public static final String JSON_PROPERTY_TITLE = "title"; + public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nullable - private String title; + private DashboardId id; - public static final String JSON_PROPERTY_IMAGE = "image"; + public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; @javax.annotation.Nullable - private String image; + private Long createdTime; - public static final String JSON_PROPERTY_MOBILE_HIDE = "mobileHide"; + public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; @javax.annotation.Nullable - private Boolean mobileHide; + private TenantId tenantId; - public static final String JSON_PROPERTY_MOBILE_ORDER = "mobileOrder"; + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; @javax.annotation.Nullable - private Integer mobileOrder; + private CustomerId customerId; - public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; + public static final String JSON_PROPERTY_OWNER_ID = "ownerId"; @javax.annotation.Nullable - private com.fasterxml.jackson.databind.JsonNode _configuration = null; + private EntityId ownerId; + + public static final String JSON_PROPERTY_TITLE = "title"; + @javax.annotation.Nullable + private String title; public static final String JSON_PROPERTY_NAME = "name"; @javax.annotation.Nullable private String name; - public static final String JSON_PROPERTY_RESOURCES = "resources"; + public static final String JSON_PROPERTY_IMAGE = "image"; @javax.annotation.Nullable - private List resources = new ArrayList<>(); + private String image; public static final String JSON_PROPERTY_ASSIGNED_CUSTOMERS = "assignedCustomers"; @javax.annotation.Nullable private Set assignedCustomers = new LinkedHashSet<>(); - public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; - @javax.annotation.Nullable - private Long createdTime; - - public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + public static final String JSON_PROPERTY_MOBILE_HIDE = "mobileHide"; @javax.annotation.Nullable - private CustomerId customerId; + private Boolean mobileHide; - public static final String JSON_PROPERTY_ID = "id"; + public static final String JSON_PROPERTY_MOBILE_ORDER = "mobileOrder"; @javax.annotation.Nullable - private DashboardId id; + private Integer mobileOrder; - public static final String JSON_PROPERTY_OWNER_ID = "ownerId"; + public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; @javax.annotation.Nullable - private EntityId ownerId; + private com.fasterxml.jackson.databind.JsonNode _configuration = null; - public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; + public static final String JSON_PROPERTY_RESOURCES = "resources"; @javax.annotation.Nullable - private TenantId tenantId; + private List resources = new ArrayList<>(); public static final String JSON_PROPERTY_VERSION = "version"; @javax.annotation.Nullable @@ -124,109 +124,135 @@ public Dashboard() { @JsonCreator public Dashboard( + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId, + @JsonProperty(JSON_PROPERTY_NAME) String name, @JsonProperty(JSON_PROPERTY_IMAGE) String image, @JsonProperty(JSON_PROPERTY_MOBILE_HIDE) Boolean mobileHide, - @JsonProperty(JSON_PROPERTY_MOBILE_ORDER) Integer mobileOrder, - @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId + @JsonProperty(JSON_PROPERTY_MOBILE_ORDER) Integer mobileOrder ) { this(); + this.createdTime = createdTime; + this.tenantId = tenantId; + this.ownerId = ownerId; + this.name = name; this.image = image; this.mobileHide = mobileHide; this.mobileOrder = mobileOrder; - this.name = name; - this.createdTime = createdTime; - this.tenantId = tenantId; } - public Dashboard title(@javax.annotation.Nullable String title) { - this.title = title; + public Dashboard id(@javax.annotation.Nullable DashboardId id) { + this.id = id; return this; } /** - * Title of the dashboard. - * @return title + * JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. + * @return id */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) + @JsonProperty(value = JSON_PROPERTY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; + public DashboardId getId() { + return id; } - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) + @JsonProperty(value = JSON_PROPERTY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(@javax.annotation.Nullable String title) { - this.title = title; + public void setId(@javax.annotation.Nullable DashboardId id) { + this.id = id; } /** - * Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. - * @return image + * Timestamp of the dashboard creation, in milliseconds + * @return createdTime */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IMAGE, required = false) + @JsonProperty(value = JSON_PROPERTY_CREATED_TIME, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getImage() { - return image; + public Long getCreatedTime() { + return createdTime; } /** - * Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. - * @return mobileHide + * JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. + * @return tenantId */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_MOBILE_HIDE, required = false) + @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMobileHide() { - return mobileHide; + public TenantId getTenantId() { + return tenantId; } + public Dashboard customerId(@javax.annotation.Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications - * @return mobileOrder + * JSON object with Customer Id. + * @return customerId */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_MOBILE_ORDER, required = false) + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getMobileOrder() { - return mobileOrder; + public CustomerId getCustomerId() { + return customerId; } + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@javax.annotation.Nullable CustomerId customerId) { + this.customerId = customerId; + } - public Dashboard _configuration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { - this._configuration = _configuration; + /** + * JSON object with Customer or Tenant Id + * @return ownerId + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityId getOwnerId() { + return ownerId; + } + + + + + public Dashboard title(@javax.annotation.Nullable String title) { + this.title = title; return this; } /** - * Get _configuration - * @return _configuration + * Title of the dashboard. + * @return title */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) + @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public com.fasterxml.jackson.databind.JsonNode getConfiguration() { - return _configuration; + public String getTitle() { + return title; } - @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) + @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setConfiguration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { - this._configuration = _configuration; + public void setTitle(@javax.annotation.Nullable String title) { + this.title = title; } @@ -244,36 +270,18 @@ public String getName() { - public Dashboard resources(@javax.annotation.Nullable List resources) { - this.resources = resources; - return this; - } - - public Dashboard addResourcesItem(ResourceExportData resourcesItem) { - if (this.resources == null) { - this.resources = new ArrayList<>(); - } - this.resources.add(resourcesItem); - return this; - } - /** - * Get resources - * @return resources + * Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. + * @return image */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) + @JsonProperty(value = JSON_PROPERTY_IMAGE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getResources() { - return resources; + public String getImage() { + return image; } - @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResources(@javax.annotation.Nullable List resources) { - this.resources = resources; - } public Dashboard assignedCustomers(@javax.annotation.Nullable Set assignedCustomers) { @@ -310,103 +318,87 @@ public void setAssignedCustomers(@javax.annotation.Nullable Set resources) { + this.resources = resources; return this; } - /** - * JSON object with Customer or Tenant Id - * @return ownerId - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EntityId getOwnerId() { - return ownerId; - } - - - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; + public Dashboard addResourcesItem(ResourceExportData resourcesItem) { + if (this.resources == null) { + this.resources = new ArrayList<>(); + } + this.resources.add(resourcesItem); + return this; } - /** - * JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. - * @return tenantId + * Get resources + * @return resources */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TenantId getTenantId() { - return tenantId; + public List getResources() { + return resources; } + @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResources(@javax.annotation.Nullable List resources) { + this.resources = resources; + } public Dashboard version(@javax.annotation.Nullable Long version) { @@ -445,44 +437,44 @@ public boolean equals(Object o) { return false; } Dashboard dashboard = (Dashboard) o; - return Objects.equals(this.title, dashboard.title) && + return Objects.equals(this.id, dashboard.id) && + Objects.equals(this.createdTime, dashboard.createdTime) && + Objects.equals(this.tenantId, dashboard.tenantId) && + Objects.equals(this.customerId, dashboard.customerId) && + Objects.equals(this.ownerId, dashboard.ownerId) && + Objects.equals(this.title, dashboard.title) && + Objects.equals(this.name, dashboard.name) && Objects.equals(this.image, dashboard.image) && + Objects.equals(this.assignedCustomers, dashboard.assignedCustomers) && Objects.equals(this.mobileHide, dashboard.mobileHide) && Objects.equals(this.mobileOrder, dashboard.mobileOrder) && Objects.equals(this._configuration, dashboard._configuration) && - Objects.equals(this.name, dashboard.name) && Objects.equals(this.resources, dashboard.resources) && - Objects.equals(this.assignedCustomers, dashboard.assignedCustomers) && - Objects.equals(this.createdTime, dashboard.createdTime) && - Objects.equals(this.customerId, dashboard.customerId) && - Objects.equals(this.id, dashboard.id) && - Objects.equals(this.ownerId, dashboard.ownerId) && - Objects.equals(this.tenantId, dashboard.tenantId) && Objects.equals(this.version, dashboard.version); } @Override public int hashCode() { - return Objects.hash(title, image, mobileHide, mobileOrder, _configuration, name, resources, assignedCustomers, createdTime, customerId, id, ownerId, tenantId, version); + return Objects.hash(id, createdTime, tenantId, customerId, ownerId, title, name, image, assignedCustomers, mobileHide, mobileOrder, _configuration, resources, version); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Dashboard {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" image: ").append(toIndentedString(image)).append("\n"); + sb.append(" assignedCustomers: ").append(toIndentedString(assignedCustomers)).append("\n"); sb.append(" mobileHide: ").append(toIndentedString(mobileHide)).append("\n"); sb.append(" mobileOrder: ").append(toIndentedString(mobileOrder)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); - sb.append(" assignedCustomers: ").append(toIndentedString(assignedCustomers)).append("\n"); - sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); - sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append("}"); return sb.toString(); @@ -531,29 +523,34 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `title` to the URL query string - if (getTitle() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); + // add `id` to the URL query string + if (getId() != null) { + joiner.add(getId().toUrlQueryString(prefix + "id" + suffix)); } - // add `image` to the URL query string - if (getImage() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%simage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getImage())))); + // add `createdTime` to the URL query string + if (getCreatedTime() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%screatedTime%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedTime())))); } - // add `mobileHide` to the URL query string - if (getMobileHide() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smobileHide%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMobileHide())))); + // add `tenantId` to the URL query string + if (getTenantId() != null) { + joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix)); } - // add `mobileOrder` to the URL query string - if (getMobileOrder() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smobileOrder%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMobileOrder())))); + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(getCustomerId().toUrlQueryString(prefix + "customerId" + suffix)); } - // add `configuration` to the URL query string - if (getConfiguration() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sconfiguration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfiguration())))); + // add `ownerId` to the URL query string + if (getOwnerId() != null) { + joiner.add(getOwnerId().toUrlQueryString(prefix + "ownerId" + suffix)); + } + + // add `title` to the URL query string + if (getTitle() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); } // add `name` to the URL query string @@ -561,14 +558,9 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); } - // add `resources` to the URL query string - if (getResources() != null) { - for (int i = 0; i < getResources().size(); i++) { - if (getResources().get(i) != null) { - joiner.add(getResources().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sresources%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } + // add `image` to the URL query string + if (getImage() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%simage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getImage())))); } // add `assignedCustomers` to the URL query string @@ -583,29 +575,29 @@ public String toUrlQueryString(String prefix) { i++; } - // add `createdTime` to the URL query string - if (getCreatedTime() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%screatedTime%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedTime())))); - } - - // add `customerId` to the URL query string - if (getCustomerId() != null) { - joiner.add(getCustomerId().toUrlQueryString(prefix + "customerId" + suffix)); + // add `mobileHide` to the URL query string + if (getMobileHide() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smobileHide%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMobileHide())))); } - // add `id` to the URL query string - if (getId() != null) { - joiner.add(getId().toUrlQueryString(prefix + "id" + suffix)); + // add `mobileOrder` to the URL query string + if (getMobileOrder() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smobileOrder%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMobileOrder())))); } - // add `ownerId` to the URL query string - if (getOwnerId() != null) { - joiner.add(getOwnerId().toUrlQueryString(prefix + "ownerId" + suffix)); + // add `configuration` to the URL query string + if (getConfiguration() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sconfiguration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfiguration())))); } - // add `tenantId` to the URL query string - if (getTenantId() != null) { - joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix)); + // add `resources` to the URL query string + if (getResources() != null) { + for (int i = 0; i < getResources().size(); i++) { + if (getResources().get(i) != null) { + joiner.add(getResources().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sresources%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } } // add `version` to the URL query string diff --git a/paas/src/main/java/org/thingsboard/client/model/DashboardInfo.java b/paas/src/main/java/org/thingsboard/client/model/DashboardInfo.java index 5afd133e..db0cc3fe 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DashboardInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/DashboardInfo.java @@ -47,72 +47,76 @@ * DashboardInfo */ @JsonPropertyOrder({ + DashboardInfo.JSON_PROPERTY_ID, + DashboardInfo.JSON_PROPERTY_CREATED_TIME, + DashboardInfo.JSON_PROPERTY_TENANT_ID, + DashboardInfo.JSON_PROPERTY_CUSTOMER_ID, + DashboardInfo.JSON_PROPERTY_OWNER_ID, DashboardInfo.JSON_PROPERTY_TITLE, + DashboardInfo.JSON_PROPERTY_NAME, DashboardInfo.JSON_PROPERTY_IMAGE, + DashboardInfo.JSON_PROPERTY_ASSIGNED_CUSTOMERS, DashboardInfo.JSON_PROPERTY_MOBILE_HIDE, DashboardInfo.JSON_PROPERTY_MOBILE_ORDER, DashboardInfo.JSON_PROPERTY_CONFIGURATION, - DashboardInfo.JSON_PROPERTY_NAME, DashboardInfo.JSON_PROPERTY_RESOURCES, - DashboardInfo.JSON_PROPERTY_ID, - DashboardInfo.JSON_PROPERTY_CREATED_TIME, - DashboardInfo.JSON_PROPERTY_TENANT_ID, - DashboardInfo.JSON_PROPERTY_CUSTOMER_ID, - DashboardInfo.JSON_PROPERTY_ASSIGNED_CUSTOMERS, DashboardInfo.JSON_PROPERTY_VERSION, DashboardInfo.JSON_PROPERTY_OWNER_NAME, - DashboardInfo.JSON_PROPERTY_GROUPS, - DashboardInfo.JSON_PROPERTY_OWNER_ID + DashboardInfo.JSON_PROPERTY_GROUPS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class DashboardInfo { - public static final String JSON_PROPERTY_TITLE = "title"; + public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nullable - private String title; + private DashboardId id; - public static final String JSON_PROPERTY_IMAGE = "image"; + public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; @javax.annotation.Nullable - private String image; + private Long createdTime; - public static final String JSON_PROPERTY_MOBILE_HIDE = "mobileHide"; + public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; @javax.annotation.Nullable - private Boolean mobileHide; + private TenantId tenantId; - public static final String JSON_PROPERTY_MOBILE_ORDER = "mobileOrder"; + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; @javax.annotation.Nullable - private Integer mobileOrder; + private CustomerId customerId; - public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; + public static final String JSON_PROPERTY_OWNER_ID = "ownerId"; @javax.annotation.Nullable - private com.fasterxml.jackson.databind.JsonNode _configuration = null; + private EntityId ownerId; + + public static final String JSON_PROPERTY_TITLE = "title"; + @javax.annotation.Nullable + private String title; public static final String JSON_PROPERTY_NAME = "name"; @javax.annotation.Nullable private String name; - public static final String JSON_PROPERTY_RESOURCES = "resources"; + public static final String JSON_PROPERTY_IMAGE = "image"; @javax.annotation.Nullable - private List resources = new ArrayList<>(); + private String image; - public static final String JSON_PROPERTY_ID = "id"; + public static final String JSON_PROPERTY_ASSIGNED_CUSTOMERS = "assignedCustomers"; @javax.annotation.Nullable - private DashboardId id; + private Set assignedCustomers = new LinkedHashSet<>(); - public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; + public static final String JSON_PROPERTY_MOBILE_HIDE = "mobileHide"; @javax.annotation.Nullable - private Long createdTime; + private Boolean mobileHide; - public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; + public static final String JSON_PROPERTY_MOBILE_ORDER = "mobileOrder"; @javax.annotation.Nullable - private TenantId tenantId; + private Integer mobileOrder; - public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; @javax.annotation.Nullable - private CustomerId customerId; + private com.fasterxml.jackson.databind.JsonNode _configuration = null; - public static final String JSON_PROPERTY_ASSIGNED_CUSTOMERS = "assignedCustomers"; + public static final String JSON_PROPERTY_RESOURCES = "resources"; @javax.annotation.Nullable - private Set assignedCustomers = new LinkedHashSet<>(); + private List resources = new ArrayList<>(); public static final String JSON_PROPERTY_VERSION = "version"; @javax.annotation.Nullable @@ -126,120 +130,142 @@ public class DashboardInfo { @javax.annotation.Nullable private List groups = new ArrayList<>(); - public static final String JSON_PROPERTY_OWNER_ID = "ownerId"; - @javax.annotation.Nullable - private EntityId ownerId; - public DashboardInfo() { } @JsonCreator public DashboardInfo( + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId, + @JsonProperty(JSON_PROPERTY_NAME) String name, @JsonProperty(JSON_PROPERTY_IMAGE) String image, @JsonProperty(JSON_PROPERTY_MOBILE_HIDE) Boolean mobileHide, @JsonProperty(JSON_PROPERTY_MOBILE_ORDER) Integer mobileOrder, - @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName ) { this(); + this.createdTime = createdTime; + this.tenantId = tenantId; + this.ownerId = ownerId; + this.name = name; this.image = image; this.mobileHide = mobileHide; this.mobileOrder = mobileOrder; - this.name = name; - this.createdTime = createdTime; - this.tenantId = tenantId; this.ownerName = ownerName; } - public DashboardInfo title(@javax.annotation.Nullable String title) { - this.title = title; + public DashboardInfo id(@javax.annotation.Nullable DashboardId id) { + this.id = id; return this; } /** - * Title of the dashboard. - * @return title + * JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. + * @return id */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) + @JsonProperty(value = JSON_PROPERTY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; + public DashboardId getId() { + return id; } - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) + @JsonProperty(value = JSON_PROPERTY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(@javax.annotation.Nullable String title) { - this.title = title; + public void setId(@javax.annotation.Nullable DashboardId id) { + this.id = id; } /** - * Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. - * @return image + * Timestamp of the dashboard creation, in milliseconds + * @return createdTime */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IMAGE, required = false) + @JsonProperty(value = JSON_PROPERTY_CREATED_TIME, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getImage() { - return image; + public Long getCreatedTime() { + return createdTime; } /** - * Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. - * @return mobileHide + * JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. + * @return tenantId */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_MOBILE_HIDE, required = false) + @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMobileHide() { - return mobileHide; + public TenantId getTenantId() { + return tenantId; } + public DashboardInfo customerId(@javax.annotation.Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications - * @return mobileOrder + * JSON object with Customer Id. + * @return customerId */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_MOBILE_ORDER, required = false) + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getMobileOrder() { - return mobileOrder; + public CustomerId getCustomerId() { + return customerId; + } + + + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@javax.annotation.Nullable CustomerId customerId) { + this.customerId = customerId; } + /** + * JSON object with Customer or Tenant Id + * @return ownerId + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityId getOwnerId() { + return ownerId; + } - public DashboardInfo _configuration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { - this._configuration = _configuration; + + + public DashboardInfo title(@javax.annotation.Nullable String title) { + this.title = title; return this; } /** - * Get _configuration - * @return _configuration + * Title of the dashboard. + * @return title */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) + @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public com.fasterxml.jackson.databind.JsonNode getConfiguration() { - return _configuration; + public String getTitle() { + return title; } - @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) + @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setConfiguration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { - this._configuration = _configuration; + public void setTitle(@javax.annotation.Nullable String title) { + this.title = title; } @@ -257,144 +283,134 @@ public String getName() { - public DashboardInfo resources(@javax.annotation.Nullable List resources) { - this.resources = resources; - return this; - } - - public DashboardInfo addResourcesItem(ResourceExportData resourcesItem) { - if (this.resources == null) { - this.resources = new ArrayList<>(); - } - this.resources.add(resourcesItem); - return this; - } - /** - * Get resources - * @return resources + * Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. + * @return image */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) + @JsonProperty(value = JSON_PROPERTY_IMAGE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getResources() { - return resources; + public String getImage() { + return image; } - @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResources(@javax.annotation.Nullable List resources) { - this.resources = resources; - } - public DashboardInfo id(@javax.annotation.Nullable DashboardId id) { - this.id = id; + public DashboardInfo assignedCustomers(@javax.annotation.Nullable Set assignedCustomers) { + this.assignedCustomers = assignedCustomers; + return this; + } + + public DashboardInfo addAssignedCustomersItem(ShortCustomerInfo assignedCustomersItem) { + if (this.assignedCustomers == null) { + this.assignedCustomers = new LinkedHashSet<>(); + } + this.assignedCustomers.add(assignedCustomersItem); return this; } /** - * JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. - * @return id + * List of assigned customers with their info. + * @return assignedCustomers */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_ASSIGNED_CUSTOMERS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DashboardId getId() { - return id; + public Set getAssignedCustomers() { + return assignedCustomers; } - @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonDeserialize(as = LinkedHashSet.class) + @JsonProperty(value = JSON_PROPERTY_ASSIGNED_CUSTOMERS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(@javax.annotation.Nullable DashboardId id) { - this.id = id; + public void setAssignedCustomers(@javax.annotation.Nullable Set assignedCustomers) { + this.assignedCustomers = assignedCustomers; } /** - * Timestamp of the dashboard creation, in milliseconds - * @return createdTime + * Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. + * @return mobileHide */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CREATED_TIME, required = false) + @JsonProperty(value = JSON_PROPERTY_MOBILE_HIDE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCreatedTime() { - return createdTime; + public Boolean getMobileHide() { + return mobileHide; } /** - * JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. - * @return tenantId + * Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications + * @return mobileOrder */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_MOBILE_ORDER, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TenantId getTenantId() { - return tenantId; + public Integer getMobileOrder() { + return mobileOrder; } - public DashboardInfo customerId(@javax.annotation.Nullable CustomerId customerId) { - this.customerId = customerId; + public DashboardInfo _configuration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { + this._configuration = _configuration; return this; } /** - * JSON object with Customer Id. - * @return customerId + * Get _configuration + * @return _configuration */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CustomerId getCustomerId() { - return customerId; + public com.fasterxml.jackson.databind.JsonNode getConfiguration() { + return _configuration; } - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerId(@javax.annotation.Nullable CustomerId customerId) { - this.customerId = customerId; + public void setConfiguration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { + this._configuration = _configuration; } - public DashboardInfo assignedCustomers(@javax.annotation.Nullable Set assignedCustomers) { - this.assignedCustomers = assignedCustomers; + public DashboardInfo resources(@javax.annotation.Nullable List resources) { + this.resources = resources; return this; } - public DashboardInfo addAssignedCustomersItem(ShortCustomerInfo assignedCustomersItem) { - if (this.assignedCustomers == null) { - this.assignedCustomers = new LinkedHashSet<>(); + public DashboardInfo addResourcesItem(ResourceExportData resourcesItem) { + if (this.resources == null) { + this.resources = new ArrayList<>(); } - this.assignedCustomers.add(assignedCustomersItem); + this.resources.add(resourcesItem); return this; } /** - * List of assigned customers with their info. - * @return assignedCustomers + * Get resources + * @return resources */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ASSIGNED_CUSTOMERS, required = false) + @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Set getAssignedCustomers() { - return assignedCustomers; + public List getResources() { + return resources; } - @JsonDeserialize(as = LinkedHashSet.class) - @JsonProperty(value = JSON_PROPERTY_ASSIGNED_CUSTOMERS, required = false) + @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAssignedCustomers(@javax.annotation.Nullable Set assignedCustomers) { - this.assignedCustomers = assignedCustomers; + public void setResources(@javax.annotation.Nullable List resources) { + this.resources = resources; } @@ -468,30 +484,6 @@ public void setGroups(@javax.annotation.Nullable List groups) { } - public DashboardInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - - /** - * JSON object with Customer or Tenant Id - * @return ownerId - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EntityId getOwnerId() { - return ownerId; - } - - - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } - - /** * Return true if this DashboardInfo object is equal to o. */ @@ -504,49 +496,49 @@ public boolean equals(Object o) { return false; } DashboardInfo dashboardInfo = (DashboardInfo) o; - return Objects.equals(this.title, dashboardInfo.title) && + return Objects.equals(this.id, dashboardInfo.id) && + Objects.equals(this.createdTime, dashboardInfo.createdTime) && + Objects.equals(this.tenantId, dashboardInfo.tenantId) && + Objects.equals(this.customerId, dashboardInfo.customerId) && + Objects.equals(this.ownerId, dashboardInfo.ownerId) && + Objects.equals(this.title, dashboardInfo.title) && + Objects.equals(this.name, dashboardInfo.name) && Objects.equals(this.image, dashboardInfo.image) && + Objects.equals(this.assignedCustomers, dashboardInfo.assignedCustomers) && Objects.equals(this.mobileHide, dashboardInfo.mobileHide) && Objects.equals(this.mobileOrder, dashboardInfo.mobileOrder) && Objects.equals(this._configuration, dashboardInfo._configuration) && - Objects.equals(this.name, dashboardInfo.name) && Objects.equals(this.resources, dashboardInfo.resources) && - Objects.equals(this.id, dashboardInfo.id) && - Objects.equals(this.createdTime, dashboardInfo.createdTime) && - Objects.equals(this.tenantId, dashboardInfo.tenantId) && - Objects.equals(this.customerId, dashboardInfo.customerId) && - Objects.equals(this.assignedCustomers, dashboardInfo.assignedCustomers) && Objects.equals(this.version, dashboardInfo.version) && Objects.equals(this.ownerName, dashboardInfo.ownerName) && - Objects.equals(this.groups, dashboardInfo.groups) && - Objects.equals(this.ownerId, dashboardInfo.ownerId); + Objects.equals(this.groups, dashboardInfo.groups); } @Override public int hashCode() { - return Objects.hash(title, image, mobileHide, mobileOrder, _configuration, name, resources, id, createdTime, tenantId, customerId, assignedCustomers, version, ownerName, groups, ownerId); + return Objects.hash(id, createdTime, tenantId, customerId, ownerId, title, name, image, assignedCustomers, mobileHide, mobileOrder, _configuration, resources, version, ownerName, groups); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DashboardInfo {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" image: ").append(toIndentedString(image)).append("\n"); + sb.append(" assignedCustomers: ").append(toIndentedString(assignedCustomers)).append("\n"); sb.append(" mobileHide: ").append(toIndentedString(mobileHide)).append("\n"); sb.append(" mobileOrder: ").append(toIndentedString(mobileOrder)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); - sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" assignedCustomers: ").append(toIndentedString(assignedCustomers)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" ownerName: ").append(toIndentedString(ownerName)).append("\n"); sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); - sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -594,16 +586,58 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); + // add `id` to the URL query string + if (getId() != null) { + joiner.add(getId().toUrlQueryString(prefix + "id" + suffix)); + } + + // add `createdTime` to the URL query string + if (getCreatedTime() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%screatedTime%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedTime())))); + } + + // add `tenantId` to the URL query string + if (getTenantId() != null) { + joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix)); + } + + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(getCustomerId().toUrlQueryString(prefix + "customerId" + suffix)); + } + + // add `ownerId` to the URL query string + if (getOwnerId() != null) { + joiner.add(getOwnerId().toUrlQueryString(prefix + "ownerId" + suffix)); + } + // add `title` to the URL query string if (getTitle() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); } + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + // add `image` to the URL query string if (getImage() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%simage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getImage())))); } + // add `assignedCustomers` to the URL query string + if (getAssignedCustomers() != null) { + int i = 0; + for (ShortCustomerInfo _item : getAssignedCustomers()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format(java.util.Locale.ROOT, "%sassignedCustomers%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + // add `mobileHide` to the URL query string if (getMobileHide() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%smobileHide%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMobileHide())))); @@ -619,11 +653,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sconfiguration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfiguration())))); } - // add `name` to the URL query string - if (getName() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); - } - // add `resources` to the URL query string if (getResources() != null) { for (int i = 0; i < getResources().size(); i++) { @@ -634,38 +663,6 @@ public String toUrlQueryString(String prefix) { } } - // add `id` to the URL query string - if (getId() != null) { - joiner.add(getId().toUrlQueryString(prefix + "id" + suffix)); - } - - // add `createdTime` to the URL query string - if (getCreatedTime() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%screatedTime%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedTime())))); - } - - // add `tenantId` to the URL query string - if (getTenantId() != null) { - joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix)); - } - - // add `customerId` to the URL query string - if (getCustomerId() != null) { - joiner.add(getCustomerId().toUrlQueryString(prefix + "customerId" + suffix)); - } - - // add `assignedCustomers` to the URL query string - if (getAssignedCustomers() != null) { - int i = 0; - for (ShortCustomerInfo _item : getAssignedCustomers()) { - if (_item != null) { - joiner.add(_item.toUrlQueryString(String.format(java.util.Locale.ROOT, "%sassignedCustomers%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - i++; - } - // add `version` to the URL query string if (getVersion() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); @@ -686,11 +683,6 @@ public String toUrlQueryString(String prefix) { } } - // add `ownerId` to the URL query string - if (getOwnerId() != null) { - joiner.add(getOwnerId().toUrlQueryString(prefix + "ownerId" + suffix)); - } - return joiner.toString(); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/DebugConverterEventFilter.java b/paas/src/main/java/org/thingsboard/client/model/DebugConverterEventFilter.java index 215d08da..93461983 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DebugConverterEventFilter.java +++ b/paas/src/main/java/org/thingsboard/client/model/DebugConverterEventFilter.java @@ -42,13 +42,12 @@ */ @JsonPropertyOrder({ DebugConverterEventFilter.JSON_PROPERTY_SERVER, + DebugConverterEventFilter.JSON_PROPERTY_IS_ERROR, DebugConverterEventFilter.JSON_PROPERTY_ERROR_STR, DebugConverterEventFilter.JSON_PROPERTY_TYPE, DebugConverterEventFilter.JSON_PROPERTY_IN, DebugConverterEventFilter.JSON_PROPERTY_OUT, - DebugConverterEventFilter.JSON_PROPERTY_METADATA, - DebugConverterEventFilter.JSON_PROPERTY_ERROR, - DebugConverterEventFilter.JSON_PROPERTY_IS_ERROR + DebugConverterEventFilter.JSON_PROPERTY_METADATA }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -62,6 +61,45 @@ public class DebugConverterEventFilter extends EventFilter { @javax.annotation.Nullable private String server; + /** + * Boolean value to filter the errors + */ + public enum IsErrorEnum { + FALSE(Boolean.valueOf("false")), + + TRUE(Boolean.valueOf("true")); + + private Boolean value; + + IsErrorEnum(Boolean value) { + this.value = value; + } + + @JsonValue + public Boolean getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IsErrorEnum fromValue(Boolean value) { + for (IsErrorEnum b : IsErrorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private IsErrorEnum isError; + public static final String JSON_PROPERTY_ERROR_STR = "errorStr"; @javax.annotation.Nullable private String errorStr; @@ -82,14 +120,6 @@ public class DebugConverterEventFilter extends EventFilter { @javax.annotation.Nullable private String metadata; - public static final String JSON_PROPERTY_ERROR = "error"; - @javax.annotation.Nullable - private Boolean error; - - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public DebugConverterEventFilter() { } @@ -117,6 +147,30 @@ public void setServer(@javax.annotation.Nullable String server) { } + public DebugConverterEventFilter isError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + return this; + } + + /** + * Boolean value to filter the errors + * @return isError + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IsErrorEnum getIsError() { + return isError; + } + + + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + } + + public DebugConverterEventFilter errorStr(@javax.annotation.Nullable String errorStr) { this.errorStr = errorStr; return this; @@ -237,54 +291,6 @@ public void setMetadata(@javax.annotation.Nullable String metadata) { } - public DebugConverterEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; - return this; - } - - /** - * Get error - * @return error - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; - } - - - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; - } - - - public DebugConverterEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - return this; - } - - /** - * Get isError - * @return isError - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; - } - - - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - } - - @Override public DebugConverterEventFilter eventType(@javax.annotation.Nonnull EventType eventType) { this.setEventType(eventType); @@ -310,19 +316,18 @@ public boolean equals(Object o) { } DebugConverterEventFilter debugConverterEventFilter = (DebugConverterEventFilter) o; return Objects.equals(this.server, debugConverterEventFilter.server) && + Objects.equals(this.isError, debugConverterEventFilter.isError) && Objects.equals(this.errorStr, debugConverterEventFilter.errorStr) && Objects.equals(this.type, debugConverterEventFilter.type) && Objects.equals(this.in, debugConverterEventFilter.in) && Objects.equals(this.out, debugConverterEventFilter.out) && Objects.equals(this.metadata, debugConverterEventFilter.metadata) && - Objects.equals(this.error, debugConverterEventFilter.error) && - Objects.equals(this.isError, debugConverterEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, type, in, out, metadata, error, isError, super.hashCode()); + return Objects.hash(server, isError, errorStr, type, in, out, metadata, super.hashCode()); } @Override @@ -331,13 +336,12 @@ public String toString() { sb.append("class DebugConverterEventFilter {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" server: ").append(toIndentedString(server)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" errorStr: ").append(toIndentedString(errorStr)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" in: ").append(toIndentedString(in)).append("\n"); sb.append(" out: ").append(toIndentedString(out)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -400,6 +404,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sserver%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getServer())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + // add `errorStr` to the URL query string if (getErrorStr() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serrorStr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorStr())))); @@ -425,16 +434,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smetadata%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMetadata())))); } - // add `error` to the URL query string - if (getError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); - } - - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/DebugIntegrationEventFilter.java b/paas/src/main/java/org/thingsboard/client/model/DebugIntegrationEventFilter.java index fd8c55ec..fab0b995 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DebugIntegrationEventFilter.java +++ b/paas/src/main/java/org/thingsboard/client/model/DebugIntegrationEventFilter.java @@ -42,12 +42,11 @@ */ @JsonPropertyOrder({ DebugIntegrationEventFilter.JSON_PROPERTY_SERVER, + DebugIntegrationEventFilter.JSON_PROPERTY_IS_ERROR, DebugIntegrationEventFilter.JSON_PROPERTY_ERROR_STR, DebugIntegrationEventFilter.JSON_PROPERTY_TYPE, DebugIntegrationEventFilter.JSON_PROPERTY_MESSAGE, - DebugIntegrationEventFilter.JSON_PROPERTY_STATUS_INTEGRATION, - DebugIntegrationEventFilter.JSON_PROPERTY_ERROR, - DebugIntegrationEventFilter.JSON_PROPERTY_IS_ERROR + DebugIntegrationEventFilter.JSON_PROPERTY_STATUS_INTEGRATION }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -61,6 +60,45 @@ public class DebugIntegrationEventFilter extends EventFilter { @javax.annotation.Nullable private String server; + /** + * Boolean value to filter the errors + */ + public enum IsErrorEnum { + FALSE(Boolean.valueOf("false")), + + TRUE(Boolean.valueOf("true")); + + private Boolean value; + + IsErrorEnum(Boolean value) { + this.value = value; + } + + @JsonValue + public Boolean getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IsErrorEnum fromValue(Boolean value) { + for (IsErrorEnum b : IsErrorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private IsErrorEnum isError; + public static final String JSON_PROPERTY_ERROR_STR = "errorStr"; @javax.annotation.Nullable private String errorStr; @@ -77,14 +115,6 @@ public class DebugIntegrationEventFilter extends EventFilter { @javax.annotation.Nullable private String statusIntegration; - public static final String JSON_PROPERTY_ERROR = "error"; - @javax.annotation.Nullable - private Boolean error; - - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public DebugIntegrationEventFilter() { } @@ -112,6 +142,30 @@ public void setServer(@javax.annotation.Nullable String server) { } + public DebugIntegrationEventFilter isError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + return this; + } + + /** + * Boolean value to filter the errors + * @return isError + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IsErrorEnum getIsError() { + return isError; + } + + + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + } + + public DebugIntegrationEventFilter errorStr(@javax.annotation.Nullable String errorStr) { this.errorStr = errorStr; return this; @@ -208,54 +262,6 @@ public void setStatusIntegration(@javax.annotation.Nullable String statusIntegra } - public DebugIntegrationEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; - return this; - } - - /** - * Get error - * @return error - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; - } - - - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; - } - - - public DebugIntegrationEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - return this; - } - - /** - * Get isError - * @return isError - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; - } - - - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - } - - @Override public DebugIntegrationEventFilter eventType(@javax.annotation.Nonnull EventType eventType) { this.setEventType(eventType); @@ -281,18 +287,17 @@ public boolean equals(Object o) { } DebugIntegrationEventFilter debugIntegrationEventFilter = (DebugIntegrationEventFilter) o; return Objects.equals(this.server, debugIntegrationEventFilter.server) && + Objects.equals(this.isError, debugIntegrationEventFilter.isError) && Objects.equals(this.errorStr, debugIntegrationEventFilter.errorStr) && Objects.equals(this.type, debugIntegrationEventFilter.type) && Objects.equals(this.message, debugIntegrationEventFilter.message) && Objects.equals(this.statusIntegration, debugIntegrationEventFilter.statusIntegration) && - Objects.equals(this.error, debugIntegrationEventFilter.error) && - Objects.equals(this.isError, debugIntegrationEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, type, message, statusIntegration, error, isError, super.hashCode()); + return Objects.hash(server, isError, errorStr, type, message, statusIntegration, super.hashCode()); } @Override @@ -301,12 +306,11 @@ public String toString() { sb.append("class DebugIntegrationEventFilter {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" server: ").append(toIndentedString(server)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" errorStr: ").append(toIndentedString(errorStr)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" statusIntegration: ").append(toIndentedString(statusIntegration)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -369,6 +373,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sserver%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getServer())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + // add `errorStr` to the URL query string if (getErrorStr() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serrorStr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorStr())))); @@ -389,16 +398,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstatusIntegration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatusIntegration())))); } - // add `error` to the URL query string - if (getError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); - } - - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/Device.java b/paas/src/main/java/org/thingsboard/client/model/Device.java index f0caea76..4d5c2625 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Device.java +++ b/paas/src/main/java/org/thingsboard/client/model/Device.java @@ -122,12 +122,14 @@ public Device() { public Device( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; + this.ownerId = ownerId; } public Device id(@javax.annotation.Nullable DeviceId id) { @@ -388,11 +390,6 @@ public void setDeviceData(@javax.annotation.Nullable DeviceData deviceData) { } - public Device ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -405,11 +402,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public Device additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/DeviceInfo.java b/paas/src/main/java/org/thingsboard/client/model/DeviceInfo.java index 396c94f8..854fcbbc 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DeviceInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/DeviceInfo.java @@ -142,7 +142,8 @@ public DeviceInfo( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, - @JsonProperty(JSON_PROPERTY_ACTIVE) Boolean active + @JsonProperty(JSON_PROPERTY_ACTIVE) Boolean active, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; @@ -150,6 +151,7 @@ public DeviceInfo( this.customerId = customerId; this.ownerName = ownerName; this.active = active; + this.ownerId = ownerId; } public DeviceInfo id(@javax.annotation.Nullable DeviceId id) { @@ -470,11 +472,6 @@ public void setDeviceData(@javax.annotation.Nullable DeviceData deviceData) { } - public DeviceInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -487,11 +484,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public DeviceInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/Domain.java b/paas/src/main/java/org/thingsboard/client/model/Domain.java index 39f85c01..93d706e3 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Domain.java +++ b/paas/src/main/java/org/thingsboard/client/model/Domain.java @@ -87,10 +87,12 @@ public Domain() { @JsonCreator public Domain( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; + this.ownerId = ownerId; } public Domain id(@javax.annotation.Nullable DomainId id) { @@ -251,11 +253,6 @@ public void setPropagateToEdge(@javax.annotation.Nullable Boolean propagateToEdg } - public Domain ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -268,11 +265,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/DomainInfo.java b/paas/src/main/java/org/thingsboard/client/model/DomainInfo.java index 24bd87d1..dd138d2d 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DomainInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/DomainInfo.java @@ -95,10 +95,12 @@ public DomainInfo() { @JsonCreator public DomainInfo( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; + this.ownerId = ownerId; } public DomainInfo id(@javax.annotation.Nullable DomainId id) { @@ -291,11 +293,6 @@ public void setOauth2ClientInfos(@javax.annotation.Nullable List groups) { } - public EdgeInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * Get ownerId * @return ownerId @@ -515,11 +512,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public EdgeInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityView.java b/paas/src/main/java/org/thingsboard/client/model/EntityView.java index bbed15c0..7f9479a2 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityView.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityView.java @@ -115,12 +115,14 @@ public EntityView() { public EntityView( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.tenantId = tenantId; this.customerId = customerId; this.createdTime = createdTime; + this.ownerId = ownerId; } public EntityView entityId(@javax.annotation.Nonnull EntityId entityId) { @@ -357,11 +359,6 @@ public Long getCreatedTime() { - public EntityView ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -374,11 +371,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public EntityView additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityViewInfo.java b/paas/src/main/java/org/thingsboard/client/model/EntityViewInfo.java index 75bd9bcd..74c8e402 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityViewInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityViewInfo.java @@ -129,13 +129,15 @@ public EntityViewInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName + @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; this.ownerName = ownerName; + this.ownerId = ownerId; } public EntityViewInfo id(@javax.annotation.Nullable EntityViewId id) { @@ -418,11 +420,6 @@ public void setGroups(@javax.annotation.Nullable List groups) { } - public EntityViewInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -435,11 +432,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public EntityViewInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/EventInfo.java b/paas/src/main/java/org/thingsboard/client/model/EventInfo.java index 1cbe3f86..e367fdbf 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EventInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/EventInfo.java @@ -82,11 +82,13 @@ public EventInfo() { @JsonCreator public EventInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId + @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, + @JsonProperty(JSON_PROPERTY_ENTITY_ID) EntityId entityId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; + this.entityId = entityId; } public EventInfo id(@javax.annotation.Nullable EventId id) { @@ -189,11 +191,6 @@ public void setUid(@javax.annotation.Nullable String uid) { } - public EventInfo entityId(@javax.annotation.Nullable EntityId entityId) { - this.entityId = entityId; - return this; - } - /** * JSON object with Entity Id for which event is created. * @return entityId @@ -206,11 +203,6 @@ public EntityId getEntityId() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEntityId(@javax.annotation.Nullable EntityId entityId) { - this.entityId = entityId; - } public EventInfo body(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode body) { diff --git a/paas/src/main/java/org/thingsboard/client/model/OAuth2Client.java b/paas/src/main/java/org/thingsboard/client/model/OAuth2Client.java index 75bf88b9..f67c506a 100644 --- a/paas/src/main/java/org/thingsboard/client/model/OAuth2Client.java +++ b/paas/src/main/java/org/thingsboard/client/model/OAuth2Client.java @@ -157,11 +157,13 @@ public OAuth2Client() { @JsonCreator public OAuth2Client( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_NAME) String name + @JsonProperty(JSON_PROPERTY_NAME) String name, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.name = name; + this.ownerId = ownerId; } public OAuth2Client id(@javax.annotation.Nullable OAuth2ClientId id) { @@ -640,11 +642,6 @@ public String getName() { - public OAuth2Client ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * Get ownerId * @return ownerId @@ -657,11 +654,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/OtaPackage.java b/paas/src/main/java/org/thingsboard/client/model/OtaPackage.java index c5a77cdf..edd82ee0 100644 --- a/paas/src/main/java/org/thingsboard/client/model/OtaPackage.java +++ b/paas/src/main/java/org/thingsboard/client/model/OtaPackage.java @@ -29,7 +29,6 @@ import java.util.Arrays; import org.thingsboard.client.model.ChecksumAlgorithm; import org.thingsboard.client.model.DeviceProfileId; -import org.thingsboard.client.model.OtaPackageData; import org.thingsboard.client.model.OtaPackageId; import org.thingsboard.client.model.OtaPackageType; import org.thingsboard.client.model.TenantId; @@ -124,7 +123,7 @@ public class OtaPackage { public static final String JSON_PROPERTY_DATA = "data"; @javax.annotation.Nullable - private OtaPackageData data; + private byte[] data; public static final String JSON_PROPERTY_NAME = "name"; @javax.annotation.Nullable @@ -433,7 +432,7 @@ public Long getDataSize() { - public OtaPackage data(@javax.annotation.Nullable OtaPackageData data) { + public OtaPackage data(@javax.annotation.Nullable byte[] data) { this.data = data; return this; } @@ -445,14 +444,14 @@ public OtaPackage data(@javax.annotation.Nullable OtaPackageData data) { @javax.annotation.Nullable @JsonProperty(value = JSON_PROPERTY_DATA, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OtaPackageData getData() { + public byte[] getData() { return data; } @JsonProperty(value = JSON_PROPERTY_DATA, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setData(@javax.annotation.Nullable OtaPackageData data) { + public void setData(@javax.annotation.Nullable byte[] data) { this.data = data; } @@ -522,14 +521,14 @@ public boolean equals(Object o) { Objects.equals(this.checksumAlgorithm, otaPackage.checksumAlgorithm) && Objects.equals(this.checksum, otaPackage.checksum) && Objects.equals(this.dataSize, otaPackage.dataSize) && - Objects.equals(this.data, otaPackage.data) && + Arrays.equals(this.data, otaPackage.data) && Objects.equals(this.name, otaPackage.name) && Objects.equals(this.additionalInfo, otaPackage.additionalInfo); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, deviceProfileId, type, title, version, tag, url, hasData, fileName, contentType, checksumAlgorithm, checksum, dataSize, data, name, additionalInfo); + return Objects.hash(id, createdTime, tenantId, deviceProfileId, type, title, version, tag, url, hasData, fileName, contentType, checksumAlgorithm, checksum, dataSize, Arrays.hashCode(data), name, additionalInfo); } @Override @@ -678,7 +677,7 @@ public String toUrlQueryString(String prefix) { // add `data` to the URL query string if (getData() != null) { - joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + joiner.add(String.format(java.util.Locale.ROOT, "%sdata%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getData())))); } // add `name` to the URL query string diff --git a/paas/src/main/java/org/thingsboard/client/model/OtaPackageData.java b/paas/src/main/java/org/thingsboard/client/model/OtaPackageData.java deleted file mode 100644 index 8cb07905..00000000 --- a/paas/src/main/java/org/thingsboard/client/model/OtaPackageData.java +++ /dev/null @@ -1,405 +0,0 @@ -/** - * Copyright © 2026-2026 ThingsBoard, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.thingsboard.client.model; - -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.StringJoiner; -import java.util.Objects; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.ApiClient; -/** - * OtaPackageData - */ -@JsonPropertyOrder({ - OtaPackageData.JSON_PROPERTY_CHAR, - OtaPackageData.JSON_PROPERTY_DIRECT, - OtaPackageData.JSON_PROPERTY_DOUBLE, - OtaPackageData.JSON_PROPERTY_FLOAT, - OtaPackageData.JSON_PROPERTY_INT, - OtaPackageData.JSON_PROPERTY_LONG, - OtaPackageData.JSON_PROPERTY_READ_ONLY, - OtaPackageData.JSON_PROPERTY_SHORT -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class OtaPackageData { - public static final String JSON_PROPERTY_CHAR = "char"; - @javax.annotation.Nullable - private String _char; - - public static final String JSON_PROPERTY_DIRECT = "direct"; - @javax.annotation.Nullable - private Boolean direct; - - public static final String JSON_PROPERTY_DOUBLE = "double"; - @javax.annotation.Nullable - private Double _double; - - public static final String JSON_PROPERTY_FLOAT = "float"; - @javax.annotation.Nullable - private Float _float; - - public static final String JSON_PROPERTY_INT = "int"; - @javax.annotation.Nullable - private Integer _int; - - public static final String JSON_PROPERTY_LONG = "long"; - @javax.annotation.Nullable - private Long _long; - - public static final String JSON_PROPERTY_READ_ONLY = "readOnly"; - @javax.annotation.Nullable - private Boolean readOnly; - - public static final String JSON_PROPERTY_SHORT = "short"; - @javax.annotation.Nullable - private Integer _short; - - public OtaPackageData() { - } - - public OtaPackageData _char(@javax.annotation.Nullable String _char) { - this._char = _char; - return this; - } - - /** - * Get _char - * @return _char - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CHAR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getChar() { - return _char; - } - - - @JsonProperty(value = JSON_PROPERTY_CHAR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setChar(@javax.annotation.Nullable String _char) { - this._char = _char; - } - - - public OtaPackageData direct(@javax.annotation.Nullable Boolean direct) { - this.direct = direct; - return this; - } - - /** - * Get direct - * @return direct - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DIRECT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDirect() { - return direct; - } - - - @JsonProperty(value = JSON_PROPERTY_DIRECT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDirect(@javax.annotation.Nullable Boolean direct) { - this.direct = direct; - } - - - public OtaPackageData _double(@javax.annotation.Nullable Double _double) { - this._double = _double; - return this; - } - - /** - * Get _double - * @return _double - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DOUBLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDouble() { - return _double; - } - - - @JsonProperty(value = JSON_PROPERTY_DOUBLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDouble(@javax.annotation.Nullable Double _double) { - this._double = _double; - } - - - public OtaPackageData _float(@javax.annotation.Nullable Float _float) { - this._float = _float; - return this; - } - - /** - * Get _float - * @return _float - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_FLOAT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Float getFloat() { - return _float; - } - - - @JsonProperty(value = JSON_PROPERTY_FLOAT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFloat(@javax.annotation.Nullable Float _float) { - this._float = _float; - } - - - public OtaPackageData _int(@javax.annotation.Nullable Integer _int) { - this._int = _int; - return this; - } - - /** - * Get _int - * @return _int - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_INT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getInt() { - return _int; - } - - - @JsonProperty(value = JSON_PROPERTY_INT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInt(@javax.annotation.Nullable Integer _int) { - this._int = _int; - } - - - public OtaPackageData _long(@javax.annotation.Nullable Long _long) { - this._long = _long; - return this; - } - - /** - * Get _long - * @return _long - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LONG, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLong() { - return _long; - } - - - @JsonProperty(value = JSON_PROPERTY_LONG, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLong(@javax.annotation.Nullable Long _long) { - this._long = _long; - } - - - public OtaPackageData readOnly(@javax.annotation.Nullable Boolean readOnly) { - this.readOnly = readOnly; - return this; - } - - /** - * Get readOnly - * @return readOnly - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_READ_ONLY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getReadOnly() { - return readOnly; - } - - - @JsonProperty(value = JSON_PROPERTY_READ_ONLY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReadOnly(@javax.annotation.Nullable Boolean readOnly) { - this.readOnly = readOnly; - } - - - public OtaPackageData _short(@javax.annotation.Nullable Integer _short) { - this._short = _short; - return this; - } - - /** - * Get _short - * @return _short - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SHORT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getShort() { - return _short; - } - - - @JsonProperty(value = JSON_PROPERTY_SHORT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShort(@javax.annotation.Nullable Integer _short) { - this._short = _short; - } - - - /** - * Return true if this OtaPackage_data object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OtaPackageData otaPackageData = (OtaPackageData) o; - return Objects.equals(this._char, otaPackageData._char) && - Objects.equals(this.direct, otaPackageData.direct) && - Objects.equals(this._double, otaPackageData._double) && - Objects.equals(this._float, otaPackageData._float) && - Objects.equals(this._int, otaPackageData._int) && - Objects.equals(this._long, otaPackageData._long) && - Objects.equals(this.readOnly, otaPackageData.readOnly) && - Objects.equals(this._short, otaPackageData._short); - } - - @Override - public int hashCode() { - return Objects.hash(_char, direct, _double, _float, _int, _long, readOnly, _short); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OtaPackageData {\n"); - sb.append(" _char: ").append(toIndentedString(_char)).append("\n"); - sb.append(" direct: ").append(toIndentedString(direct)).append("\n"); - sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); - sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); - sb.append(" _int: ").append(toIndentedString(_int)).append("\n"); - sb.append(" _long: ").append(toIndentedString(_long)).append("\n"); - sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); - sb.append(" _short: ").append(toIndentedString(_short)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Convert the instance into URL query string. - * - * @return URL query string - */ - public String toUrlQueryString() { - return toUrlQueryString(null); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - String suffix = ""; - String containerSuffix = ""; - String containerPrefix = ""; - if (prefix == null) { - // style=form, explode=true, e.g. /pet?name=cat&type=manx - prefix = ""; - } else { - // deepObject style e.g. /pet?id[name]=cat&id[type]=manx - prefix = prefix + "["; - suffix = "]"; - containerSuffix = "]"; - containerPrefix = "["; - } - - StringJoiner joiner = new StringJoiner("&"); - - // add `char` to the URL query string - if (getChar() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%schar%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getChar())))); - } - - // add `direct` to the URL query string - if (getDirect() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdirect%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDirect())))); - } - - // add `double` to the URL query string - if (getDouble() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdouble%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDouble())))); - } - - // add `float` to the URL query string - if (getFloat() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sfloat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFloat())))); - } - - // add `int` to the URL query string - if (getInt() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sint%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInt())))); - } - - // add `long` to the URL query string - if (getLong() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%slong%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLong())))); - } - - // add `readOnly` to the URL query string - if (getReadOnly() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sreadOnly%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReadOnly())))); - } - - // add `short` to the URL query string - if (getShort() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sshort%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShort())))); - } - - return joiner.toString(); - } -} - diff --git a/paas/src/main/java/org/thingsboard/client/model/Report.java b/paas/src/main/java/org/thingsboard/client/model/Report.java index 1a647e51..47d09acf 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Report.java +++ b/paas/src/main/java/org/thingsboard/client/model/Report.java @@ -95,10 +95,12 @@ public Report() { @JsonCreator public Report( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; + this.ownerId = ownerId; } public Report id(@javax.annotation.Nullable ReportId id) { @@ -283,11 +285,6 @@ public void setUserId(@javax.annotation.Nonnull UserId userId) { } - public Report ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -300,11 +297,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/ReportInfo.java b/paas/src/main/java/org/thingsboard/client/model/ReportInfo.java index 4cde66d9..14ddbd9c 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ReportInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/ReportInfo.java @@ -111,10 +111,12 @@ public ReportInfo() { @JsonCreator public ReportInfo( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; + this.ownerId = ownerId; } public ReportInfo id(@javax.annotation.Nullable ReportId id) { @@ -371,11 +373,6 @@ public void setUserName(@javax.annotation.Nullable String userName) { } - public ReportInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -388,11 +385,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/ReportTemplate.java b/paas/src/main/java/org/thingsboard/client/model/ReportTemplate.java index a654ceae..bdb4dbda 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ReportTemplate.java +++ b/paas/src/main/java/org/thingsboard/client/model/ReportTemplate.java @@ -107,12 +107,14 @@ public ReportTemplate() { public ReportTemplate( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; + this.ownerId = ownerId; } public ReportTemplate id(@javax.annotation.Nullable ReportTemplateId id) { @@ -325,11 +327,6 @@ public void setConfiguration(@javax.annotation.Nonnull ReportTemplateConfig _con } - public ReportTemplate ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -342,11 +339,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java b/paas/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java index e5507ea6..a2501762 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java @@ -107,13 +107,15 @@ public ReportTemplateInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName + @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; this.ownerName = ownerName; + this.ownerId = ownerId; } public ReportTemplateInfo id(@javax.annotation.Nullable ReportTemplateId id) { @@ -316,11 +318,6 @@ public String getOwnerName() { - public ReportTemplateInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -333,11 +330,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/Role.java b/paas/src/main/java/org/thingsboard/client/model/Role.java index fa769846..83d7b32e 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Role.java +++ b/paas/src/main/java/org/thingsboard/client/model/Role.java @@ -100,12 +100,14 @@ public Role() { public Role( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.tenantId = tenantId; this.customerId = customerId; this.createdTime = createdTime; + this.ownerId = ownerId; } /** @@ -270,11 +272,6 @@ public Long getCreatedTime() { - public Role ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -287,11 +284,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public Role additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java b/paas/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java index fb6e8069..cff4291a 100644 --- a/paas/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java +++ b/paas/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java @@ -42,10 +42,9 @@ */ @JsonPropertyOrder({ RuleChainDebugEventFilter.JSON_PROPERTY_SERVER, + RuleChainDebugEventFilter.JSON_PROPERTY_IS_ERROR, RuleChainDebugEventFilter.JSON_PROPERTY_ERROR_STR, - RuleChainDebugEventFilter.JSON_PROPERTY_MESSAGE, - RuleChainDebugEventFilter.JSON_PROPERTY_ERROR, - RuleChainDebugEventFilter.JSON_PROPERTY_IS_ERROR + RuleChainDebugEventFilter.JSON_PROPERTY_MESSAGE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -59,6 +58,45 @@ public class RuleChainDebugEventFilter extends EventFilter { @javax.annotation.Nullable private String server; + /** + * Boolean value to filter the errors + */ + public enum IsErrorEnum { + FALSE(Boolean.valueOf("false")), + + TRUE(Boolean.valueOf("true")); + + private Boolean value; + + IsErrorEnum(Boolean value) { + this.value = value; + } + + @JsonValue + public Boolean getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IsErrorEnum fromValue(Boolean value) { + for (IsErrorEnum b : IsErrorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private IsErrorEnum isError; + public static final String JSON_PROPERTY_ERROR_STR = "errorStr"; @javax.annotation.Nullable private String errorStr; @@ -67,14 +105,6 @@ public class RuleChainDebugEventFilter extends EventFilter { @javax.annotation.Nullable private String message; - public static final String JSON_PROPERTY_ERROR = "error"; - @javax.annotation.Nullable - private Boolean error; - - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public RuleChainDebugEventFilter() { } @@ -102,6 +132,30 @@ public void setServer(@javax.annotation.Nullable String server) { } + public RuleChainDebugEventFilter isError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + return this; + } + + /** + * Boolean value to filter the errors + * @return isError + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IsErrorEnum getIsError() { + return isError; + } + + + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + } + + public RuleChainDebugEventFilter errorStr(@javax.annotation.Nullable String errorStr) { this.errorStr = errorStr; return this; @@ -150,54 +204,6 @@ public void setMessage(@javax.annotation.Nullable String message) { } - public RuleChainDebugEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; - return this; - } - - /** - * Get error - * @return error - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; - } - - - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; - } - - - public RuleChainDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - return this; - } - - /** - * Get isError - * @return isError - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; - } - - - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - } - - @Override public RuleChainDebugEventFilter eventType(@javax.annotation.Nonnull EventType eventType) { this.setEventType(eventType); @@ -223,16 +229,15 @@ public boolean equals(Object o) { } RuleChainDebugEventFilter ruleChainDebugEventFilter = (RuleChainDebugEventFilter) o; return Objects.equals(this.server, ruleChainDebugEventFilter.server) && + Objects.equals(this.isError, ruleChainDebugEventFilter.isError) && Objects.equals(this.errorStr, ruleChainDebugEventFilter.errorStr) && Objects.equals(this.message, ruleChainDebugEventFilter.message) && - Objects.equals(this.error, ruleChainDebugEventFilter.error) && - Objects.equals(this.isError, ruleChainDebugEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, message, error, isError, super.hashCode()); + return Objects.hash(server, isError, errorStr, message, super.hashCode()); } @Override @@ -241,10 +246,9 @@ public String toString() { sb.append("class RuleChainDebugEventFilter {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" server: ").append(toIndentedString(server)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" errorStr: ").append(toIndentedString(errorStr)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -307,6 +311,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sserver%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getServer())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + // add `errorStr` to the URL query string if (getErrorStr() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serrorStr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorStr())))); @@ -317,16 +326,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); } - // add `error` to the URL query string - if (getError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); - } - - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java b/paas/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java index 3ce2fe1f..f7418e50 100644 --- a/paas/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java +++ b/paas/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java @@ -42,6 +42,7 @@ */ @JsonPropertyOrder({ RuleNodeDebugEventFilter.JSON_PROPERTY_SERVER, + RuleNodeDebugEventFilter.JSON_PROPERTY_IS_ERROR, RuleNodeDebugEventFilter.JSON_PROPERTY_ERROR_STR, RuleNodeDebugEventFilter.JSON_PROPERTY_MSG_DIRECTION_TYPE, RuleNodeDebugEventFilter.JSON_PROPERTY_ENTITY_ID, @@ -50,9 +51,7 @@ RuleNodeDebugEventFilter.JSON_PROPERTY_MSG_TYPE, RuleNodeDebugEventFilter.JSON_PROPERTY_RELATION_TYPE, RuleNodeDebugEventFilter.JSON_PROPERTY_DATA_SEARCH, - RuleNodeDebugEventFilter.JSON_PROPERTY_METADATA_SEARCH, - RuleNodeDebugEventFilter.JSON_PROPERTY_ERROR, - RuleNodeDebugEventFilter.JSON_PROPERTY_IS_ERROR + RuleNodeDebugEventFilter.JSON_PROPERTY_METADATA_SEARCH }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -66,6 +65,45 @@ public class RuleNodeDebugEventFilter extends EventFilter { @javax.annotation.Nullable private String server; + /** + * Boolean value to filter the errors + */ + public enum IsErrorEnum { + FALSE(Boolean.valueOf("false")), + + TRUE(Boolean.valueOf("true")); + + private Boolean value; + + IsErrorEnum(Boolean value) { + this.value = value; + } + + @JsonValue + public Boolean getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IsErrorEnum fromValue(Boolean value) { + for (IsErrorEnum b : IsErrorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private IsErrorEnum isError; + public static final String JSON_PROPERTY_ERROR_STR = "errorStr"; @javax.annotation.Nullable private String errorStr; @@ -170,14 +208,6 @@ public static EntityTypeEnum fromValue(String value) { @javax.annotation.Nullable private String metadataSearch; - public static final String JSON_PROPERTY_ERROR = "error"; - @javax.annotation.Nullable - private Boolean error; - - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public RuleNodeDebugEventFilter() { } @@ -205,6 +235,30 @@ public void setServer(@javax.annotation.Nullable String server) { } + public RuleNodeDebugEventFilter isError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + return this; + } + + /** + * Boolean value to filter the errors + * @return isError + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IsErrorEnum getIsError() { + return isError; + } + + + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + } + + public RuleNodeDebugEventFilter errorStr(@javax.annotation.Nullable String errorStr) { this.errorStr = errorStr; return this; @@ -421,54 +475,6 @@ public void setMetadataSearch(@javax.annotation.Nullable String metadataSearch) } - public RuleNodeDebugEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; - return this; - } - - /** - * Get error - * @return error - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; - } - - - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; - } - - - public RuleNodeDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - return this; - } - - /** - * Get isError - * @return isError - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; - } - - - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - } - - @Override public RuleNodeDebugEventFilter eventType(@javax.annotation.Nonnull EventType eventType) { this.setEventType(eventType); @@ -494,6 +500,7 @@ public boolean equals(Object o) { } RuleNodeDebugEventFilter ruleNodeDebugEventFilter = (RuleNodeDebugEventFilter) o; return Objects.equals(this.server, ruleNodeDebugEventFilter.server) && + Objects.equals(this.isError, ruleNodeDebugEventFilter.isError) && Objects.equals(this.errorStr, ruleNodeDebugEventFilter.errorStr) && Objects.equals(this.msgDirectionType, ruleNodeDebugEventFilter.msgDirectionType) && Objects.equals(this.entityId, ruleNodeDebugEventFilter.entityId) && @@ -503,14 +510,12 @@ public boolean equals(Object o) { Objects.equals(this.relationType, ruleNodeDebugEventFilter.relationType) && Objects.equals(this.dataSearch, ruleNodeDebugEventFilter.dataSearch) && Objects.equals(this.metadataSearch, ruleNodeDebugEventFilter.metadataSearch) && - Objects.equals(this.error, ruleNodeDebugEventFilter.error) && - Objects.equals(this.isError, ruleNodeDebugEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, msgDirectionType, entityId, entityType, msgId, msgType, relationType, dataSearch, metadataSearch, error, isError, super.hashCode()); + return Objects.hash(server, isError, errorStr, msgDirectionType, entityId, entityType, msgId, msgType, relationType, dataSearch, metadataSearch, super.hashCode()); } @Override @@ -519,6 +524,7 @@ public String toString() { sb.append("class RuleNodeDebugEventFilter {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" server: ").append(toIndentedString(server)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" errorStr: ").append(toIndentedString(errorStr)).append("\n"); sb.append(" msgDirectionType: ").append(toIndentedString(msgDirectionType)).append("\n"); sb.append(" entityId: ").append(toIndentedString(entityId)).append("\n"); @@ -528,8 +534,6 @@ public String toString() { sb.append(" relationType: ").append(toIndentedString(relationType)).append("\n"); sb.append(" dataSearch: ").append(toIndentedString(dataSearch)).append("\n"); sb.append(" metadataSearch: ").append(toIndentedString(metadataSearch)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -592,6 +596,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sserver%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getServer())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + // add `errorStr` to the URL query string if (getErrorStr() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serrorStr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorStr())))); @@ -637,16 +646,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smetadataSearch%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMetadataSearch())))); } - // add `error` to the URL query string - if (getError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); - } - - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java b/paas/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java index 666f0815..c8a0ede2 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java @@ -126,17 +126,21 @@ public ScheduledReportInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, @JsonProperty(JSON_PROPERTY_TEMPLATE_INFO) EntityInfo templateInfo, @JsonProperty(JSON_PROPERTY_CUSTOMER_TITLE) String customerTitle, - @JsonProperty(JSON_PROPERTY_USER_NAME) String userName + @JsonProperty(JSON_PROPERTY_USER_NAME) String userName, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; + this.originatorId = originatorId; this.templateInfo = templateInfo; this.customerTitle = customerTitle; this.userName = userName; + this.ownerId = ownerId; } public ScheduledReportInfo id(@javax.annotation.Nullable SchedulerEventId id) { @@ -205,11 +209,6 @@ public CustomerId getCustomerId() { - public ScheduledReportInfo originatorId(@javax.annotation.Nullable EntityId originatorId) { - this.originatorId = originatorId; - return this; - } - /** * JSON object with Originator Id * @return originatorId @@ -222,11 +221,6 @@ public EntityId getOriginatorId() { } - @JsonProperty(value = JSON_PROPERTY_ORIGINATOR_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginatorId(@javax.annotation.Nullable EntityId originatorId) { - this.originatorId = originatorId; - } public ScheduledReportInfo name(@javax.annotation.Nullable String name) { @@ -391,11 +385,6 @@ public String getUserName() { - public ScheduledReportInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -408,11 +397,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public ScheduledReportInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/SchedulerEvent.java b/paas/src/main/java/org/thingsboard/client/model/SchedulerEvent.java index 320fd250..4ba83359 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SchedulerEvent.java +++ b/paas/src/main/java/org/thingsboard/client/model/SchedulerEvent.java @@ -114,12 +114,16 @@ public SchedulerEvent() { public SchedulerEvent( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; + this.originatorId = originatorId; + this.ownerId = ownerId; } public SchedulerEvent id(@javax.annotation.Nullable SchedulerEventId id) { @@ -188,11 +192,6 @@ public CustomerId getCustomerId() { - public SchedulerEvent originatorId(@javax.annotation.Nullable EntityId originatorId) { - this.originatorId = originatorId; - return this; - } - /** * JSON object with Originator Id * @return originatorId @@ -205,11 +204,6 @@ public EntityId getOriginatorId() { } - @JsonProperty(value = JSON_PROPERTY_ORIGINATOR_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginatorId(@javax.annotation.Nullable EntityId originatorId) { - this.originatorId = originatorId; - } public SchedulerEvent name(@javax.annotation.Nullable String name) { @@ -356,11 +350,6 @@ public void setConfiguration(@javax.annotation.Nullable com.fasterxml.jackson.da } - public SchedulerEvent ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -373,11 +362,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public SchedulerEvent additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java b/paas/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java index cfcd9048..376887d7 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java @@ -109,12 +109,16 @@ public SchedulerEventInfo() { public SchedulerEventInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; + this.originatorId = originatorId; + this.ownerId = ownerId; } public SchedulerEventInfo id(@javax.annotation.Nullable SchedulerEventId id) { @@ -183,11 +187,6 @@ public CustomerId getCustomerId() { - public SchedulerEventInfo originatorId(@javax.annotation.Nullable EntityId originatorId) { - this.originatorId = originatorId; - return this; - } - /** * JSON object with Originator Id * @return originatorId @@ -200,11 +199,6 @@ public EntityId getOriginatorId() { } - @JsonProperty(value = JSON_PROPERTY_ORIGINATOR_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginatorId(@javax.annotation.Nullable EntityId originatorId) { - this.originatorId = originatorId; - } public SchedulerEventInfo name(@javax.annotation.Nullable String name) { @@ -327,11 +321,6 @@ public void setVersion(@javax.annotation.Nullable Long version) { } - public SchedulerEventInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -344,11 +333,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public SchedulerEventInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java b/paas/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java index 01c75b25..82d5bc53 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java @@ -127,13 +127,17 @@ public SchedulerEventWithCustomerInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_IS_PUBLIC) Boolean customerIsPublic + @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, + @JsonProperty(JSON_PROPERTY_CUSTOMER_IS_PUBLIC) Boolean customerIsPublic, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; + this.originatorId = originatorId; this.customerIsPublic = customerIsPublic; + this.ownerId = ownerId; } public SchedulerEventWithCustomerInfo id(@javax.annotation.Nullable SchedulerEventId id) { @@ -202,11 +206,6 @@ public CustomerId getCustomerId() { - public SchedulerEventWithCustomerInfo originatorId(@javax.annotation.Nullable EntityId originatorId) { - this.originatorId = originatorId; - return this; - } - /** * JSON object with Originator Id * @return originatorId @@ -219,11 +218,6 @@ public EntityId getOriginatorId() { } - @JsonProperty(value = JSON_PROPERTY_ORIGINATOR_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginatorId(@javax.annotation.Nullable EntityId originatorId) { - this.originatorId = originatorId; - } public SchedulerEventWithCustomerInfo name(@javax.annotation.Nullable String name) { @@ -416,11 +410,6 @@ public void setTimestamps(@javax.annotation.Nullable List timestamps) { } - public SchedulerEventWithCustomerInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -433,11 +422,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public SchedulerEventWithCustomerInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/ShortEntityView.java b/paas/src/main/java/org/thingsboard/client/model/ShortEntityView.java index 7c1087a8..71ce6bed 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ShortEntityView.java +++ b/paas/src/main/java/org/thingsboard/client/model/ShortEntityView.java @@ -54,15 +54,12 @@ public ShortEntityView() { @JsonCreator public ShortEntityView( + @JsonProperty(JSON_PROPERTY_ID) EntityId id, @JsonProperty(JSON_PROPERTY_NAME) String name ) { this(); - this.name = name; - } - - public ShortEntityView id(@javax.annotation.Nonnull EntityId id) { this.id = id; - return this; + this.name = name; } /** @@ -77,11 +74,6 @@ public EntityId getId() { } - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull EntityId id) { - this.id = id; - } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/User.java b/paas/src/main/java/org/thingsboard/client/model/User.java index 01332cdd..fa443977 100644 --- a/paas/src/main/java/org/thingsboard/client/model/User.java +++ b/paas/src/main/java/org/thingsboard/client/model/User.java @@ -120,11 +120,13 @@ public User() { @JsonCreator public User( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_NAME) String name + @JsonProperty(JSON_PROPERTY_NAME) String name, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.name = name; + this.ownerId = ownerId; } public User id(@javax.annotation.Nullable UserId id) { @@ -395,11 +397,6 @@ public String getName() { - public User ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -412,11 +409,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public User additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/paas/src/main/java/org/thingsboard/client/model/UserInfo.java b/paas/src/main/java/org/thingsboard/client/model/UserInfo.java index 5788f6dc..7e950212 100644 --- a/paas/src/main/java/org/thingsboard/client/model/UserInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/UserInfo.java @@ -134,12 +134,14 @@ public UserInfo() { public UserInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, - @JsonProperty(JSON_PROPERTY_NAME) String name + @JsonProperty(JSON_PROPERTY_NAME) String name, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.ownerName = ownerName; this.name = name; + this.ownerId = ownerId; } public UserInfo id(@javax.annotation.Nullable UserId id) { @@ -456,11 +458,6 @@ public String getName() { - public UserInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -473,11 +470,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public UserInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/docs/Alarm.md b/pe/docs/Alarm.md index f2576477..714be0f6 100644 --- a/pe/docs/Alarm.md +++ b/pe/docs/Alarm.md @@ -20,7 +20,7 @@ | **ackTs** | **Long** | Timestamp of the alarm acknowledgement, in milliseconds | [optional] | | **clearTs** | **Long** | Timestamp of the alarm clearing, in milliseconds | [optional] | | **assignTs** | **Long** | Timestamp of the alarm assignment, in milliseconds | [optional] | -| **details** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | +| **details** | **com.fasterxml.jackson.databind.JsonNode** | JSON object with alarm details | [optional] | | **propagate** | **Boolean** | Propagation flag to specify if alarm should be propagated to parent entities of alarm originator | [optional] | | **propagateToOwner** | **Boolean** | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator | [optional] | | **propagateToOwnerHierarchy** | **Boolean** | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy | [optional] | diff --git a/pe/docs/AlarmData.md b/pe/docs/AlarmData.md index 34fa7727..ce0fbda5 100644 --- a/pe/docs/AlarmData.md +++ b/pe/docs/AlarmData.md @@ -24,6 +24,7 @@ | **ackTs** | **Long** | Timestamp of the alarm acknowledgement, in milliseconds | [optional] | | **clearTs** | **Long** | Timestamp of the alarm clearing, in milliseconds | [optional] | | **assignTs** | **Long** | Timestamp of the alarm assignment, in milliseconds | [optional] | +| **details** | **com.fasterxml.jackson.databind.JsonNode** | JSON object with alarm details | [optional] | | **propagate** | **Boolean** | Propagation flag to specify if alarm should be propagated to parent entities of alarm originator | [optional] | | **propagateToOwner** | **Boolean** | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator | [optional] | | **propagateToOwnerHierarchy** | **Boolean** | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy | [optional] | @@ -35,7 +36,6 @@ | **assignee** | **AlarmAssignee** | Alarm assignee | [optional] | | **name** | **String** | representing type of the Alarm | [readonly] | | **status** | **AlarmStatus** | status of the Alarm | [readonly] | -| **details** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | diff --git a/pe/docs/AlarmInfo.md b/pe/docs/AlarmInfo.md index bdb5104d..12d6c899 100644 --- a/pe/docs/AlarmInfo.md +++ b/pe/docs/AlarmInfo.md @@ -22,6 +22,7 @@ | **ackTs** | **Long** | Timestamp of the alarm acknowledgement, in milliseconds | [optional] | | **clearTs** | **Long** | Timestamp of the alarm clearing, in milliseconds | [optional] | | **assignTs** | **Long** | Timestamp of the alarm assignment, in milliseconds | [optional] | +| **details** | **com.fasterxml.jackson.databind.JsonNode** | JSON object with alarm details | [optional] | | **propagate** | **Boolean** | Propagation flag to specify if alarm should be propagated to parent entities of alarm originator | [optional] | | **propagateToOwner** | **Boolean** | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator | [optional] | | **propagateToOwnerHierarchy** | **Boolean** | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy | [optional] | @@ -33,7 +34,6 @@ | **assignee** | **AlarmAssignee** | Alarm assignee | [optional] | | **name** | **String** | representing type of the Alarm | [readonly] | | **status** | **AlarmStatus** | status of the Alarm | [readonly] | -| **details** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | diff --git a/pe/docs/ApiKeyControllerApi.md b/pe/docs/ApiKeyControllerApi.md index e3405f9f..92b3a76c 100644 --- a/pe/docs/ApiKeyControllerApi.md +++ b/pe/docs/ApiKeyControllerApi.md @@ -99,7 +99,7 @@ ApiKey saveApiKey(@Nonnull ApiKeyInfo apiKeyInfo) Save API key for user (saveApiKey) -Creates an API key for the given user and returns the token ONCE as 'ApiKey '. Available for any authorized user. +Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'. Available for any authorized user. ### Parameters diff --git a/pe/docs/Asset.md b/pe/docs/Asset.md index 6cd508e0..4428f683 100644 --- a/pe/docs/Asset.md +++ b/pe/docs/Asset.md @@ -16,7 +16,7 @@ | **label** | **String** | Label that may be used in widgets | [optional] | | **assetProfileId** | **AssetProfileId** | JSON object with Asset Profile Id. | [optional] | | **version** | **Long** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the asset. May include: 'description' (string). | [optional] | diff --git a/pe/docs/AssetInfo.md b/pe/docs/AssetInfo.md index 0b74d04f..7ca3bde2 100644 --- a/pe/docs/AssetInfo.md +++ b/pe/docs/AssetInfo.md @@ -18,7 +18,7 @@ | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the asset. May include: 'description' (string). | [optional] | diff --git a/pe/docs/AuditLog.md b/pe/docs/AuditLog.md index 27d4f603..06d9da33 100644 --- a/pe/docs/AuditLog.md +++ b/pe/docs/AuditLog.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the auditLog creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **entityId** | **EntityId** | JSON object with Entity id | [optional] | +| **entityId** | **EntityId** | JSON object with Entity id | [optional] [readonly] | | **entityName** | **String** | Name of the logged entity | [optional] [readonly] | | **userId** | **UserId** | JSON object with User id. | [optional] [readonly] | | **userName** | **String** | Unique user name(email) of the user that performed some action on logged entity | [optional] [readonly] | diff --git a/pe/docs/BlobEntityInfo.md b/pe/docs/BlobEntityInfo.md index 095cb632..c22a2b18 100644 --- a/pe/docs/BlobEntityInfo.md +++ b/pe/docs/BlobEntityInfo.md @@ -14,7 +14,7 @@ | **name** | **String** | blob entity name | [optional] [readonly] | | **type** | **String** | blob entity type | [optional] [readonly] | | **contentType** | **ContentTypeEnum** | blob content type | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the blob entity | [optional] | diff --git a/pe/docs/BlobEntityWithCustomerInfo.md b/pe/docs/BlobEntityWithCustomerInfo.md index 54bcd2a7..69a842e9 100644 --- a/pe/docs/BlobEntityWithCustomerInfo.md +++ b/pe/docs/BlobEntityWithCustomerInfo.md @@ -16,7 +16,7 @@ | **contentType** | **ContentTypeEnum** | blob content type | [optional] [readonly] | | **customerTitle** | **String** | Title of the customer | [optional] | | **customerIsPublic** | **Boolean** | Parameter that specifies if customer is public | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the blob entity | [optional] | diff --git a/pe/docs/CalculatedField.md b/pe/docs/CalculatedField.md index 8a87b153..9241417f 100644 --- a/pe/docs/CalculatedField.md +++ b/pe/docs/CalculatedField.md @@ -18,6 +18,7 @@ | **configurationVersion** | **Integer** | Version of calculated field configuration. | [optional] | | **_configuration** | **CalculatedFieldConfiguration** | | | | **version** | **Long** | | [optional] | +| **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the calculated field | [optional] | diff --git a/pe/docs/CalculatedFieldDebugEventFilter.md b/pe/docs/CalculatedFieldDebugEventFilter.md index 4654cee1..23b34fed 100644 --- a/pe/docs/CalculatedFieldDebugEventFilter.md +++ b/pe/docs/CalculatedFieldDebugEventFilter.md @@ -10,6 +10,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **server** | **String** | String value representing the server name, identifier or ip address where the platform is running | [optional] | +| **isError** | **IsErrorEnum** | Boolean value to filter the errors | [optional] | | **errorStr** | **String** | The case insensitive 'contains' filter based on error message | [optional] | | **entityId** | **String** | String value representing the entity id in the event body | [optional] | | **entityType** | **EntityTypeEnum** | String value representing the entity type | [optional] | @@ -17,8 +18,14 @@ | **msgType** | **String** | String value representing the message type | [optional] | | **arguments** | **String** | String value representing the arguments that were used in the calculation performed | [optional] | | **result** | **String** | String value representing the result of a calculation | [optional] | -| **error** | **Boolean** | | [optional] | -| **isError** | **Boolean** | | [optional] | + + +### Enum: IsErrorEnum + +| Name | Value | +|---- | -----| +| FALSE | "false" | +| TRUE | "true" | ### Enum: EntityTypeEnum diff --git a/pe/docs/CalculatedFieldInfo.md b/pe/docs/CalculatedFieldInfo.md index 5477bbac..1996771b 100644 --- a/pe/docs/CalculatedFieldInfo.md +++ b/pe/docs/CalculatedFieldInfo.md @@ -18,6 +18,7 @@ | **configurationVersion** | **Integer** | Version of calculated field configuration. | [optional] | | **_configuration** | **CalculatedFieldConfiguration** | | | | **version** | **Long** | | [optional] | +| **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the calculated field | [optional] | | **entityName** | **String** | | [optional] | diff --git a/pe/docs/Customer.md b/pe/docs/Customer.md index f95d97e1..c14dd4b5 100644 --- a/pe/docs/Customer.md +++ b/pe/docs/Customer.md @@ -24,7 +24,7 @@ | **customMenuId** | **CustomMenuId** | | [optional] | | **name** | **String** | Name of the customer. Read-only, duplicated from title for backward compatibility | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with parent Customer Id | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the customer. May include: 'description' (string), 'homeDashboardId' (string, UUID of the home dashboard), 'homeDashboardHideToolbar' (boolean, whether to hide the dashboard toolbar), 'isPublic' (boolean, whether this is a public customer). | [optional] | diff --git a/pe/docs/CustomerInfo.md b/pe/docs/CustomerInfo.md index f69f84df..24c2bf3d 100644 --- a/pe/docs/CustomerInfo.md +++ b/pe/docs/CustomerInfo.md @@ -26,7 +26,7 @@ | **groups** | **List\** | Groups | [optional] | | **name** | **String** | Name of the customer. Read-only, duplicated from title for backward compatibility | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with parent Customer Id | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the customer. May include: 'description' (string), 'homeDashboardId' (string, UUID of the home dashboard), 'homeDashboardHideToolbar' (boolean, whether to hide the dashboard toolbar), 'isPublic' (boolean, whether this is a public customer). | [optional] | diff --git a/pe/docs/Dashboard.md b/pe/docs/Dashboard.md index 76572b33..cbe45eb4 100644 --- a/pe/docs/Dashboard.md +++ b/pe/docs/Dashboard.md @@ -7,19 +7,19 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **id** | **DashboardId** | JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. | [optional] | +| **createdTime** | **Long** | Timestamp of the dashboard creation, in milliseconds | [optional] [readonly] | +| **tenantId** | **TenantId** | JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **title** | **String** | Title of the dashboard. | [optional] | +| **name** | **String** | Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. | [optional] [readonly] | | **image** | **String** | Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. | [optional] [readonly] | +| **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | | **mobileHide** | **Boolean** | Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. | [optional] [readonly] | | **mobileOrder** | **Integer** | Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications | [optional] [readonly] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | -| **name** | **String** | Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. | [optional] [readonly] | | **resources** | **List\** | | [optional] | -| **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | -| **createdTime** | **Long** | Timestamp of the dashboard creation, in milliseconds | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id. | [optional] | -| **id** | **DashboardId** | JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | -| **tenantId** | **TenantId** | JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. | [optional] [readonly] | | **version** | **Long** | | [optional] | diff --git a/pe/docs/DashboardInfo.md b/pe/docs/DashboardInfo.md index e11ce9cf..0f17a72a 100644 --- a/pe/docs/DashboardInfo.md +++ b/pe/docs/DashboardInfo.md @@ -7,22 +7,22 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **id** | **DashboardId** | JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. | [optional] | +| **createdTime** | **Long** | Timestamp of the dashboard creation, in milliseconds | [optional] [readonly] | +| **tenantId** | **TenantId** | JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **title** | **String** | Title of the dashboard. | [optional] | +| **name** | **String** | Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. | [optional] [readonly] | | **image** | **String** | Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. | [optional] [readonly] | +| **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | | **mobileHide** | **Boolean** | Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. | [optional] [readonly] | | **mobileOrder** | **Integer** | Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications | [optional] [readonly] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | -| **name** | **String** | Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. | [optional] [readonly] | | **resources** | **List\** | | [optional] | -| **id** | **DashboardId** | JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. | [optional] | -| **createdTime** | **Long** | Timestamp of the dashboard creation, in milliseconds | [optional] [readonly] | -| **tenantId** | **TenantId** | JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id. | [optional] | -| **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | diff --git a/pe/docs/DebugConverterEventFilter.md b/pe/docs/DebugConverterEventFilter.md index abf7db4a..835f516d 100644 --- a/pe/docs/DebugConverterEventFilter.md +++ b/pe/docs/DebugConverterEventFilter.md @@ -10,13 +10,20 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **server** | **String** | String value representing the server name, identifier or ip address where the platform is running | [optional] | +| **isError** | **IsErrorEnum** | Boolean value to filter the errors | [optional] | | **errorStr** | **String** | The case insensitive 'contains' filter based on error message | [optional] | | **type** | **String** | | [optional] | | **in** | **String** | | [optional] | | **out** | **String** | | [optional] | | **metadata** | **String** | | [optional] | -| **error** | **Boolean** | | [optional] | -| **isError** | **Boolean** | | [optional] | + + +### Enum: IsErrorEnum + +| Name | Value | +|---- | -----| +| FALSE | "false" | +| TRUE | "true" | diff --git a/pe/docs/DebugIntegrationEventFilter.md b/pe/docs/DebugIntegrationEventFilter.md index c9b6d8d6..e86ff935 100644 --- a/pe/docs/DebugIntegrationEventFilter.md +++ b/pe/docs/DebugIntegrationEventFilter.md @@ -10,12 +10,19 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **server** | **String** | String value representing the server name, identifier or ip address where the platform is running | [optional] | +| **isError** | **IsErrorEnum** | Boolean value to filter the errors | [optional] | | **errorStr** | **String** | The case insensitive 'contains' filter based on error message | [optional] | | **type** | **String** | | [optional] | | **message** | **String** | | [optional] | | **statusIntegration** | **String** | | [optional] | -| **error** | **Boolean** | | [optional] | -| **isError** | **Boolean** | | [optional] | + + +### Enum: IsErrorEnum + +| Name | Value | +|---- | -----| +| FALSE | "false" | +| TRUE | "true" | diff --git a/pe/docs/Device.md b/pe/docs/Device.md index a3dbab50..0b00f936 100644 --- a/pe/docs/Device.md +++ b/pe/docs/Device.md @@ -19,7 +19,7 @@ | **softwareId** | **OtaPackageId** | JSON object with Ota Package Id. | [optional] | | **version** | **Long** | | [optional] | | **deviceData** | **DeviceData** | JSON object with content specific to type of transport in the device profile. | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | 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] | diff --git a/pe/docs/DeviceControllerApi.md b/pe/docs/DeviceControllerApi.md index 21291036..e0b283f4 100644 --- a/pe/docs/DeviceControllerApi.md +++ b/pe/docs/DeviceControllerApi.md @@ -584,7 +584,7 @@ Device saveDeviceWithCredentials(@Nonnull SaveDeviceWithCredentialsRequest saveD Create Device (saveDevice) with credentials -Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: \"Access token\" with device profile ID below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: \"Access token\" with device profile default below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: \"X509\" with device profile ID below: Note: credentialsId - format Sha3Hash, certificateValue - format PEM (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: \"MQTT_BASIC\" with device profile ID below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of LwM2M device and RPK credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). +Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: **\"Access token\"** with **device profile default** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). ### Parameters @@ -613,7 +613,7 @@ DeviceCredentials updateDeviceCredentials(@Nonnull DeviceCredentials deviceCrede Update device credentials (updateDeviceCredentials) -During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: \"Access token\" with device ID and with device ID below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: \"X509\" with device profile ID below: Note: credentialsId - format Sha3Hash, certificateValue - format PEM (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: \"MQTT_BASIC\" with device profile ID below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of LwM2M device and RPK credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. +During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. ### Parameters diff --git a/pe/docs/DeviceInfo.md b/pe/docs/DeviceInfo.md index 7f772f34..9db5a77e 100644 --- a/pe/docs/DeviceInfo.md +++ b/pe/docs/DeviceInfo.md @@ -22,7 +22,7 @@ | **groups** | **List\** | Groups | [optional] | | **active** | **Boolean** | Device active flag. | [optional] [readonly] | | **deviceData** | **DeviceData** | JSON object with content specific to type of transport in the device profile. | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | 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] | diff --git a/pe/docs/Domain.md b/pe/docs/Domain.md index 646bed33..07c5e8de 100644 --- a/pe/docs/Domain.md +++ b/pe/docs/Domain.md @@ -16,7 +16,7 @@ A JSON value representing the Domain. | **name** | **String** | Domain name. Cannot be empty | | | **oauth2Enabled** | **Boolean** | Whether OAuth2 settings are enabled or not | [optional] | | **propagateToEdge** | **Boolean** | Whether OAuth2 settings are enabled on Edge or not | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/pe/docs/DomainInfo.md b/pe/docs/DomainInfo.md index 72168f73..c6c36df6 100644 --- a/pe/docs/DomainInfo.md +++ b/pe/docs/DomainInfo.md @@ -15,7 +15,7 @@ | **oauth2Enabled** | **Boolean** | Whether OAuth2 settings are enabled or not | [optional] | | **propagateToEdge** | **Boolean** | Whether OAuth2 settings are enabled on Edge or not | [optional] | | **oauth2ClientInfos** | **List\** | List of available oauth2 clients | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/pe/docs/Edge.md b/pe/docs/Edge.md index f5d88018..1a831107 100644 --- a/pe/docs/Edge.md +++ b/pe/docs/Edge.md @@ -22,7 +22,7 @@ A JSON value representing the edge. | **edgeLicenseKey** | **String** | Edge license key obtained from license portal | | | **cloudEndpoint** | **String** | Edge uses this cloud URL to activate and periodically check it's license | | | **version** | **Long** | | [optional] | -| **ownerId** | **EntityId** | | [optional] | +| **ownerId** | **EntityId** | | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the edge. May include: 'description' (string). | [optional] | diff --git a/pe/docs/EdgeEventType.md b/pe/docs/EdgeEventType.md index 449278ea..c1e59953 100644 --- a/pe/docs/EdgeEventType.md +++ b/pe/docs/EdgeEventType.md @@ -94,6 +94,8 @@ * `AI_MODEL` (value: `"AI_MODEL"`) +* `API_KEY` (value: `"API_KEY"`) + --- diff --git a/pe/docs/EdgeInfo.md b/pe/docs/EdgeInfo.md index 25acd82a..31bcb22a 100644 --- a/pe/docs/EdgeInfo.md +++ b/pe/docs/EdgeInfo.md @@ -22,7 +22,7 @@ | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | -| **ownerId** | **EntityId** | | [optional] | +| **ownerId** | **EntityId** | | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the edge. May include: 'description' (string). | [optional] | diff --git a/pe/docs/EntitiesVersionControlControllerApi.md b/pe/docs/EntitiesVersionControlControllerApi.md index 6f1b16f4..373c5fb2 100644 --- a/pe/docs/EntitiesVersionControlControllerApi.md +++ b/pe/docs/EntitiesVersionControlControllerApi.md @@ -225,7 +225,7 @@ PageDataEntityVersion listEntityVersions(@Nonnull EntityType entityType, @Nonnul List entity versions (listEntityVersions) -Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe \" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe \" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe \" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. +Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe (johndoe@gmail.com)\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. ### Parameters diff --git a/pe/docs/EntityView.md b/pe/docs/EntityView.md index c6b98988..986d862e 100644 --- a/pe/docs/EntityView.md +++ b/pe/docs/EntityView.md @@ -20,7 +20,7 @@ A JSON object representing the entity view. | **version** | **Long** | | [optional] | | **id** | **EntityViewId** | JSON object with the Entity View Id. Specify this field to update the Entity View. Referencing non-existing Entity View Id will cause error. Omit this field to create new Entity View. | [optional] | | **createdTime** | **Long** | Timestamp of the Entity View creation, in milliseconds | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the entity view. May include: 'description' (string). | [optional] | diff --git a/pe/docs/EntityViewInfo.md b/pe/docs/EntityViewInfo.md index ee0cec48..05a6f669 100644 --- a/pe/docs/EntityViewInfo.md +++ b/pe/docs/EntityViewInfo.md @@ -20,7 +20,7 @@ | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the entity view. May include: 'description' (string). | [optional] | diff --git a/pe/docs/EventInfo.md b/pe/docs/EventInfo.md index f9940f61..2af98e01 100644 --- a/pe/docs/EventInfo.md +++ b/pe/docs/EventInfo.md @@ -12,7 +12,7 @@ | **tenantId** | **TenantId** | JSON object with Tenant Id. | [optional] [readonly] | | **type** | **String** | Event type | [optional] | | **uid** | **String** | string | [optional] | -| **entityId** | **EntityId** | JSON object with Entity Id for which event is created. | [optional] | +| **entityId** | **EntityId** | JSON object with Entity Id for which event is created. | [optional] [readonly] | | **body** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | diff --git a/pe/docs/OAuth2Client.md b/pe/docs/OAuth2Client.md index 6d5f3b9b..e910032b 100644 --- a/pe/docs/OAuth2Client.md +++ b/pe/docs/OAuth2Client.md @@ -27,7 +27,7 @@ | **loginButtonIcon** | **String** | Log in button icon for OAuth2 provider | [optional] | | **platforms** | **List\** | List of platforms for which usage of the OAuth2 client is allowed (empty for all allowed) | [optional] | | **name** | **String** | | [optional] [readonly] | -| **ownerId** | **EntityId** | | [optional] | +| **ownerId** | **EntityId** | | [optional] [readonly] | diff --git a/pe/docs/OtaPackage.md b/pe/docs/OtaPackage.md index cc8265e1..170f261a 100644 --- a/pe/docs/OtaPackage.md +++ b/pe/docs/OtaPackage.md @@ -22,7 +22,7 @@ | **checksumAlgorithm** | **ChecksumAlgorithm** | OTA Package checksum algorithm. | [optional] [readonly] | | **checksum** | **String** | OTA Package checksum. | [optional] [readonly] | | **dataSize** | **Long** | OTA Package data size. | [optional] [readonly] | -| **data** | **OtaPackageData** | | [optional] | +| **data** | **byte[]** | | [optional] | | **name** | **String** | | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | OTA Package description. | [optional] | diff --git a/pe/docs/OtaPackageData.md b/pe/docs/OtaPackageData.md deleted file mode 100644 index 1acf91c1..00000000 --- a/pe/docs/OtaPackageData.md +++ /dev/null @@ -1,29 +0,0 @@ - -# OtaPackageData - -`org.thingsboard.client.model.OtaPackageData` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **_char** | **String** | | [optional] | -| **direct** | **Boolean** | | [optional] | -| **_double** | **Double** | | [optional] | -| **_float** | **Float** | | [optional] | -| **_int** | **Integer** | | [optional] | -| **_long** | **Long** | | [optional] | -| **readOnly** | **Boolean** | | [optional] | -| **_short** | **Integer** | | [optional] | - - - ---- - -### Conventions - -- **Package:** `org.thingsboard.client.model` -- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` -- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` -- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions - diff --git a/pe/docs/Report.md b/pe/docs/Report.md index ccd6f3c4..8b087b5e 100644 --- a/pe/docs/Report.md +++ b/pe/docs/Report.md @@ -15,7 +15,7 @@ | **format** | **TbReportFormat** | | | | **name** | **String** | | | | **userId** | **UserId** | | | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/pe/docs/ReportInfo.md b/pe/docs/ReportInfo.md index 989831f3..ab63b44b 100644 --- a/pe/docs/ReportInfo.md +++ b/pe/docs/ReportInfo.md @@ -18,7 +18,7 @@ | **templateInfo** | **EntityInfo** | | [optional] | | **customerTitle** | **String** | | [optional] | | **userName** | **String** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/pe/docs/ReportTemplate.md b/pe/docs/ReportTemplate.md index 12ea7594..ddb4f161 100644 --- a/pe/docs/ReportTemplate.md +++ b/pe/docs/ReportTemplate.md @@ -19,7 +19,7 @@ A JSON value representing the Report Template. | **description** | **String** | Description | [optional] | | **version** | **Long** | | [optional] | | **_configuration** | **ReportTemplateConfig** | a JSON value with report template configuration | | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/pe/docs/ReportTemplateInfo.md b/pe/docs/ReportTemplateInfo.md index 00b4fbe3..a0c905a5 100644 --- a/pe/docs/ReportTemplateInfo.md +++ b/pe/docs/ReportTemplateInfo.md @@ -17,7 +17,7 @@ | **description** | **String** | Description | [optional] | | **version** | **Long** | | [optional] | | **ownerName** | **String** | Owner name | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/pe/docs/Role.md b/pe/docs/Role.md index 45734ca7..6f6976df 100644 --- a/pe/docs/Role.md +++ b/pe/docs/Role.md @@ -17,7 +17,7 @@ A JSON value representing the role. | **version** | **Long** | | [optional] | | **id** | **RoleId** | JSON object with the Role Id. Specify this field to update the Role. Referencing non-existing Role Id will cause error. Omit this field to create new Role. | [optional] | | **createdTime** | **Long** | Timestamp of the role creation, in milliseconds | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the role. May include: 'description' (string). | [optional] | diff --git a/pe/docs/RuleChainDebugEventFilter.md b/pe/docs/RuleChainDebugEventFilter.md index 9ace52e2..3c5d9cd3 100644 --- a/pe/docs/RuleChainDebugEventFilter.md +++ b/pe/docs/RuleChainDebugEventFilter.md @@ -10,10 +10,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **server** | **String** | String value representing the server name, identifier or ip address where the platform is running | [optional] | +| **isError** | **IsErrorEnum** | Boolean value to filter the errors | [optional] | | **errorStr** | **String** | The case insensitive 'contains' filter based on error message | [optional] | | **message** | **String** | String value representing the message | [optional] | -| **error** | **Boolean** | | [optional] | -| **isError** | **Boolean** | | [optional] | + + +### Enum: IsErrorEnum + +| Name | Value | +|---- | -----| +| FALSE | "false" | +| TRUE | "true" | diff --git a/pe/docs/RuleNodeDebugEventFilter.md b/pe/docs/RuleNodeDebugEventFilter.md index 6791375f..84b36f06 100644 --- a/pe/docs/RuleNodeDebugEventFilter.md +++ b/pe/docs/RuleNodeDebugEventFilter.md @@ -10,6 +10,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **server** | **String** | String value representing the server name, identifier or ip address where the platform is running | [optional] | +| **isError** | **IsErrorEnum** | Boolean value to filter the errors | [optional] | | **errorStr** | **String** | The case insensitive 'contains' filter based on error message | [optional] | | **msgDirectionType** | **MsgDirectionTypeEnum** | String value representing msg direction type (incoming to entity or outcoming from entity) | [optional] | | **entityId** | **String** | String value representing the entity id in the event body (originator of the message) | [optional] | @@ -19,8 +20,14 @@ | **relationType** | **String** | String value representing the type of message routing | [optional] | | **dataSearch** | **String** | The case insensitive 'contains' filter based on data (key and value) for the message. | [optional] | | **metadataSearch** | **String** | The case insensitive 'contains' filter based on metadata (key and value) for the message. | [optional] | -| **error** | **Boolean** | | [optional] | -| **isError** | **Boolean** | | [optional] | + + +### Enum: IsErrorEnum + +| Name | Value | +|---- | -----| +| FALSE | "false" | +| TRUE | "true" | ### Enum: MsgDirectionTypeEnum diff --git a/pe/docs/ScheduledReportInfo.md b/pe/docs/ScheduledReportInfo.md index 8bfedc8b..b7d81e9f 100644 --- a/pe/docs/ScheduledReportInfo.md +++ b/pe/docs/ScheduledReportInfo.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] | +| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | | **schedule** | **com.fasterxml.jackson.databind.JsonNode** | a JSON value with schedule time configuration | [optional] | @@ -20,7 +20,7 @@ | **templateInfo** | **EntityInfo** | Report template info | [optional] [readonly] | | **customerTitle** | **String** | Customer title | [optional] [readonly] | | **userName** | **String** | Report user name | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | diff --git a/pe/docs/SchedulerEvent.md b/pe/docs/SchedulerEvent.md index e35ec3a1..528b1b11 100644 --- a/pe/docs/SchedulerEvent.md +++ b/pe/docs/SchedulerEvent.md @@ -13,14 +13,14 @@ A JSON value representing the Scheduler Event. | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] | +| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | | **schedule** | **com.fasterxml.jackson.databind.JsonNode** | a JSON value with schedule time configuration | [optional] | | **enabled** | **Boolean** | Enable/disable scheduler | [optional] | | **version** | **Long** | | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | diff --git a/pe/docs/SchedulerEventInfo.md b/pe/docs/SchedulerEventInfo.md index 8ddc8760..24ac6c4c 100644 --- a/pe/docs/SchedulerEventInfo.md +++ b/pe/docs/SchedulerEventInfo.md @@ -11,13 +11,13 @@ | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] | +| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | | **schedule** | **com.fasterxml.jackson.databind.JsonNode** | a JSON value with schedule time configuration | [optional] | | **enabled** | **Boolean** | Enable/disable scheduler | [optional] | | **version** | **Long** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | diff --git a/pe/docs/SchedulerEventWithCustomerInfo.md b/pe/docs/SchedulerEventWithCustomerInfo.md index ba679df0..84b5295b 100644 --- a/pe/docs/SchedulerEventWithCustomerInfo.md +++ b/pe/docs/SchedulerEventWithCustomerInfo.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | -| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] | +| **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | | **schedule** | **com.fasterxml.jackson.databind.JsonNode** | a JSON value with schedule time configuration | [optional] | @@ -20,7 +20,7 @@ | **customerTitle** | **String** | Title of the customer | [optional] | | **customerIsPublic** | **Boolean** | Parameter that specifies if customer is public | [optional] [readonly] | | **timestamps** | **List\** | | [optional] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | diff --git a/pe/docs/ShortEntityView.md b/pe/docs/ShortEntityView.md index 6a69e94f..d4b7e211 100644 --- a/pe/docs/ShortEntityView.md +++ b/pe/docs/ShortEntityView.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **EntityId** | Entity Id object | | +| **id** | **EntityId** | Entity Id object | [readonly] | | **name** | **String** | Name of the entity | [readonly] | diff --git a/pe/docs/User.md b/pe/docs/User.md index 749c3a6f..bf29719b 100644 --- a/pe/docs/User.md +++ b/pe/docs/User.md @@ -21,7 +21,7 @@ A JSON value representing the User. | **customMenuId** | **CustomMenuId** | | [optional] | | **version** | **Long** | | [optional] | | **name** | **String** | Duplicates the email of the user, readonly | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the user. May include: 'defaultDashboardId' (string, UUID of the default dashboard), 'defaultDashboardFullscreen' (boolean), 'homeDashboardId' (string, UUID of the home dashboard), 'homeDashboardHideToolbar' (boolean), 'lang' (string, user locale, e.g. 'en_US'), 'authProviderName' (string, name of the authentication provider). | [optional] | diff --git a/pe/docs/UserInfo.md b/pe/docs/UserInfo.md index 85a5b5a3..05343c56 100644 --- a/pe/docs/UserInfo.md +++ b/pe/docs/UserInfo.md @@ -21,7 +21,7 @@ | **ownerName** | **String** | Owner name | [optional] [readonly] | | **groups** | **List\** | Groups | [optional] | | **name** | **String** | Duplicates the email of the user, readonly | [optional] [readonly] | -| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the user. May include: 'defaultDashboardId' (string, UUID of the default dashboard), 'defaultDashboardFullscreen' (boolean), 'homeDashboardId' (string, UUID of the home dashboard), 'homeDashboardHideToolbar' (boolean), 'lang' (string, user locale, e.g. 'en_US'), 'authProviderName' (string, name of the authentication provider). | [optional] | diff --git a/pe/spec/openapi.json b/pe/spec/openapi.json index a180afd5..114ab2e5 100644 --- a/pe/spec/openapi.json +++ b/pe/spec/openapi.json @@ -7736,7 +7736,7 @@ "api-key-controller" ], "summary": "Save API key for user (saveApiKey)", - "description": "Creates an API key for the given user and returns the token ONCE as 'ApiKey \u003Cvalue\u003E'.\n\nAvailable for any authorized user. ", + "description": "Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'.\n\nAvailable for any authorized user. ", "operationId": "saveApiKey", "requestBody": { "content": { @@ -32627,7 +32627,7 @@ "device-controller" ], "summary": "Create Device (saveDevice) with credentials ", - "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile default\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"X509\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\nNote: \u003Cb\u003EcredentialsId\u003C/b\u003E - format \u003Cb\u003ESha3Hash\u003C/b\u003E, \u003Cb\u003EcertificateValue\u003C/b\u003E - format \u003Cb\u003EPEM\u003C/b\u003E (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"MQTT_BASIC\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of \u003Cb\u003ELwM2M\u003C/b\u003E device and \u003Cb\u003ERPK\u003C/b\u003E credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: **\"Access token\"** with **device profile ID** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: **\"Access token\"** with **device profile default** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: **\"X509\"** with **device profile ID** below: \n\nNote: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of **LwM2M** device and **RPK** credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", "operationId": "saveDeviceWithCredentials", "parameters": [ { @@ -32969,7 +32969,7 @@ "device-controller" ], "summary": "Update device credentials (updateDeviceCredentials)", - "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials.\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice ID\u003C/b\u003E and with \u003Cb\u003Edevice ID\u003C/b\u003E below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: \u003Cb\u003E\"X509\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\nNote: \u003Cb\u003EcredentialsId\u003C/b\u003E - format \u003Cb\u003ESha3Hash\u003C/b\u003E, \u003Cb\u003EcertificateValue\u003C/b\u003E - format \u003Cb\u003EPEM\u003C/b\u003E (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: \u003Cb\u003E\"MQTT_BASIC\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of \u003Cb\u003ELwM2M\u003C/b\u003E device and \u003Cb\u003ERPK\u003C/b\u003E credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -\u003E \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials.\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: **\"X509\"** with **device profile ID** below: \n\nNote: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of **LwM2M** device and **RPK** credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -\u003E \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", "operationId": "updateDeviceCredentials", "requestBody": { "content": { @@ -44653,7 +44653,7 @@ "entities-version-control-controller" ], "summary": "List entity versions (listEntityVersions)", - "description": "Returns list of versions for a specific entity in a concrete branch. \nYou need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. \nIf specified branch does not exist - empty page data will be returned. \n\nEach version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "description": "Returns list of versions for a specific entity in a concrete branch. \nYou need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. \nIf specified branch does not exist - empty page data will be returned. \n\nEach version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", "operationId": "listEntityVersions", "parameters": [ { @@ -115804,7 +115804,8 @@ "example": 1634115928465 }, "details": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with alarm details" }, "propagate": { "type": "boolean", @@ -116501,6 +116502,10 @@ "description": "Timestamp of the alarm assignment, in milliseconds", "example": 1634115928465 }, + "details": { + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with alarm details" + }, "propagate": { "type": "boolean", "description": "Propagation flag to specify if alarm should be propagated to parent entities of alarm originator", @@ -116558,9 +116563,6 @@ "description": "status of the Alarm", "example": "ACTIVE_UNACK", "readOnly": true - }, - "details": { - "$ref": "#/components/schemas/JsonNode" } }, "required": [ @@ -116789,6 +116791,10 @@ "description": "Timestamp of the alarm assignment, in milliseconds", "example": 1634115928465 }, + "details": { + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with alarm details" + }, "propagate": { "type": "boolean", "description": "Propagation flag to specify if alarm should be propagated to parent entities of alarm originator", @@ -116846,9 +116852,6 @@ "description": "status of the Alarm", "example": "ACTIVE_UNACK", "readOnly": true - }, - "details": { - "$ref": "#/components/schemas/JsonNode" } }, "required": [ @@ -117978,7 +117981,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -118072,7 +118076,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -118461,7 +118466,8 @@ }, "entityId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Entity id" + "description": "JSON object with Entity id", + "readOnly": true }, "entityName": { "type": "string", @@ -119012,7 +119018,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -119079,7 +119086,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -119369,6 +119377,10 @@ "version": { "type": "integer", "format": "int64" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the calculated field" } }, "required": [ @@ -119414,6 +119426,14 @@ "description": "String value representing the server name, identifier or ip address where the platform is running", "example": "ip-172-31-24-152" }, + "isError": { + "type": "boolean", + "description": "Boolean value to filter the errors", + "enum": [ + "false", + "true" + ] + }, "errorStr": { "type": "string", "description": "The case insensitive 'contains' filter based on error message", @@ -119461,13 +119481,6 @@ "example": { "x + y": 32 } - }, - "error": { - "type": "boolean" - }, - "isError": { - "type": "boolean", - "writeOnly": true } } } @@ -119533,6 +119546,10 @@ "type": "integer", "format": "int64" }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the calculated field" + }, "entityName": { "type": "string" } @@ -120714,7 +120731,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -120849,7 +120867,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -120889,15 +120908,54 @@ "Dashboard": { "type": "object", "properties": { + "id": { + "$ref": "#/components/schemas/DashboardId", + "description": "JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the dashboard creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id. Tenant Id of the dashboard can't be changed.", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id. " + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + }, "title": { "type": "string", "description": "Title of the dashboard." }, + "name": { + "type": "string", + "description": "Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", + "readOnly": true + }, "image": { "type": "string", "description": "Thumbnail picture for rendering of the dashboards in a grid view on mobile devices.", "readOnly": true }, + "assignedCustomers": { + "type": "array", + "description": "List of assigned customers with their info.", + "items": { + "$ref": "#/components/schemas/ShortCustomerInfo" + }, + "readOnly": true, + "uniqueItems": true + }, "mobileHide": { "type": "boolean", "description": "Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens.", @@ -120912,50 +120970,12 @@ "configuration": { "$ref": "#/components/schemas/JsonNode" }, - "name": { - "type": "string", - "description": "Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", - "readOnly": true - }, "resources": { "type": "array", "items": { "$ref": "#/components/schemas/ResourceExportData" } }, - "assignedCustomers": { - "type": "array", - "description": "List of assigned customers with their info.", - "items": { - "$ref": "#/components/schemas/ShortCustomerInfo" - }, - "readOnly": true, - "uniqueItems": true - }, - "createdTime": { - "type": "integer", - "format": "int64", - "description": "Timestamp of the dashboard creation, in milliseconds", - "example": 1609459200000, - "readOnly": true - }, - "customerId": { - "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. " - }, - "id": { - "$ref": "#/components/schemas/DashboardId", - "description": "JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard." - }, - "ownerId": { - "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" - }, - "tenantId": { - "$ref": "#/components/schemas/TenantId", - "description": "JSON object with Tenant Id. Tenant Id of the dashboard can't be changed.", - "readOnly": true - }, "version": { "type": "integer", "format": "int64" @@ -121038,40 +121058,6 @@ "DashboardInfo": { "type": "object", "properties": { - "title": { - "type": "string", - "description": "Title of the dashboard." - }, - "image": { - "type": "string", - "description": "Thumbnail picture for rendering of the dashboards in a grid view on mobile devices.", - "readOnly": true - }, - "mobileHide": { - "type": "boolean", - "description": "Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens.", - "readOnly": true - }, - "mobileOrder": { - "type": "integer", - "format": "int32", - "description": "Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications", - "readOnly": true - }, - "configuration": { - "$ref": "#/components/schemas/JsonNode" - }, - "name": { - "type": "string", - "description": "Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", - "readOnly": true - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceExportData" - } - }, "id": { "$ref": "#/components/schemas/DashboardId", "description": "JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard." @@ -121092,6 +121078,25 @@ "$ref": "#/components/schemas/CustomerId", "description": "JSON object with Customer Id. " }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + }, + "title": { + "type": "string", + "description": "Title of the dashboard." + }, + "name": { + "type": "string", + "description": "Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", + "readOnly": true + }, + "image": { + "type": "string", + "description": "Thumbnail picture for rendering of the dashboards in a grid view on mobile devices.", + "readOnly": true + }, "assignedCustomers": { "type": "array", "description": "List of assigned customers with their info.", @@ -121101,6 +121106,26 @@ "readOnly": true, "uniqueItems": true }, + "mobileHide": { + "type": "boolean", + "description": "Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens.", + "readOnly": true + }, + "mobileOrder": { + "type": "integer", + "format": "int32", + "description": "Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications", + "readOnly": true + }, + "configuration": { + "$ref": "#/components/schemas/JsonNode" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceExportData" + } + }, "version": { "type": "integer", "format": "int64" @@ -121117,10 +121142,6 @@ "$ref": "#/components/schemas/EntityInfo" }, "readOnly": true - }, - "ownerId": { - "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" } } }, @@ -121379,6 +121400,14 @@ "description": "String value representing the server name, identifier or ip address where the platform is running", "example": "ip-172-31-24-152" }, + "isError": { + "type": "boolean", + "description": "Boolean value to filter the errors", + "enum": [ + "false", + "true" + ] + }, "errorStr": { "type": "string", "description": "The case insensitive 'contains' filter based on error message", @@ -121395,13 +121424,6 @@ }, "metadata": { "type": "string" - }, - "error": { - "type": "boolean" - }, - "isError": { - "type": "boolean", - "writeOnly": true } } } @@ -121420,6 +121442,14 @@ "description": "String value representing the server name, identifier or ip address where the platform is running", "example": "ip-172-31-24-152" }, + "isError": { + "type": "boolean", + "description": "Boolean value to filter the errors", + "enum": [ + "false", + "true" + ] + }, "errorStr": { "type": "string", "description": "The case insensitive 'contains' filter based on error message", @@ -121433,13 +121463,6 @@ }, "statusIntegration": { "type": "string" - }, - "error": { - "type": "boolean" - }, - "isError": { - "type": "boolean", - "writeOnly": true } } } @@ -122086,7 +122109,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -122404,7 +122428,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -122927,7 +122952,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true } }, "required": [ @@ -122988,7 +123014,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true } }, "required": [ @@ -123275,7 +123302,8 @@ "format": "int64" }, "ownerId": { - "$ref": "#/components/schemas/EntityId" + "$ref": "#/components/schemas/EntityId", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -123530,7 +123558,8 @@ "ENCRYPTION_KEY", "SECRET", "REPORT_TEMPLATE", - "AI_MODEL" + "AI_MODEL", + "API_KEY" ] }, "EdgeId": { @@ -123624,7 +123653,8 @@ "readOnly": true }, "ownerId": { - "$ref": "#/components/schemas/EntityId" + "$ref": "#/components/schemas/EntityId", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -125351,7 +125381,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -125456,7 +125487,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -125838,7 +125870,8 @@ }, "entityId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Entity Id for which event is created." + "description": "JSON object with Entity Id for which event is created.", + "readOnly": true }, "body": { "$ref": "#/components/schemas/JsonNode" @@ -130117,7 +130150,8 @@ "readOnly": true }, "ownerId": { - "$ref": "#/components/schemas/EntityId" + "$ref": "#/components/schemas/EntityId", + "readOnly": true } }, "required": [ @@ -130798,38 +130832,8 @@ "readOnly": true }, "data": { - "type": "object", - "properties": { - "char": { - "type": "string" - }, - "direct": { - "type": "boolean" - }, - "double": { - "type": "number", - "format": "double" - }, - "float": { - "type": "number", - "format": "float" - }, - "int": { - "type": "integer", - "format": "int32" - }, - "long": { - "type": "integer", - "format": "int64" - }, - "readOnly": { - "type": "boolean" - }, - "short": { - "type": "integer", - "format": "int32" - } - } + "type": "string", + "format": "byte" }, "name": { "type": "string", @@ -134227,7 +134231,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true } }, "required": [ @@ -134465,7 +134470,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true } }, "required": [ @@ -134801,7 +134807,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true } }, "required": [ @@ -134930,7 +134937,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true } }, "required": [ @@ -135389,7 +135397,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -135631,6 +135640,14 @@ "description": "String value representing the server name, identifier or ip address where the platform is running", "example": "ip-172-31-24-152" }, + "isError": { + "type": "boolean", + "description": "Boolean value to filter the errors", + "enum": [ + "false", + "true" + ] + }, "errorStr": { "type": "string", "description": "The case insensitive 'contains' filter based on error message", @@ -135639,13 +135656,6 @@ "message": { "type": "string", "description": "String value representing the message" - }, - "error": { - "type": "boolean" - }, - "isError": { - "type": "boolean", - "writeOnly": true } } } @@ -135942,6 +135952,14 @@ "description": "String value representing the server name, identifier or ip address where the platform is running", "example": "ip-172-31-24-152" }, + "isError": { + "type": "boolean", + "description": "Boolean value to filter the errors", + "enum": [ + "false", + "true" + ] + }, "errorStr": { "type": "string", "description": "The case insensitive 'contains' filter based on error message", @@ -135991,13 +136009,6 @@ "type": "string", "description": "The case insensitive 'contains' filter based on metadata (key and value) for the message.", "example": "deviceName" - }, - "error": { - "type": "boolean" - }, - "isError": { - "type": "boolean", - "writeOnly": true } } } @@ -136162,7 +136173,8 @@ }, "originatorId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Originator Id" + "description": "JSON object with Originator Id", + "readOnly": true }, "name": { "type": "string", @@ -136204,7 +136216,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -136239,7 +136252,8 @@ }, "originatorId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Originator Id" + "description": "JSON object with Originator Id", + "readOnly": true }, "name": { "type": "string", @@ -136269,7 +136283,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -136345,7 +136360,8 @@ }, "originatorId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Originator Id" + "description": "JSON object with Originator Id", + "readOnly": true }, "name": { "type": "string", @@ -136372,7 +136388,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -136406,7 +136423,8 @@ }, "originatorId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Originator Id" + "description": "JSON object with Originator Id", + "readOnly": true }, "name": { "type": "string", @@ -136450,7 +136468,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -136781,7 +136800,8 @@ "properties": { "id": { "$ref": "#/components/schemas/EntityId", - "description": "Entity Id object" + "description": "Entity Id object", + "readOnly": true }, "name": { "type": "string", @@ -140206,7 +140226,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -140391,7 +140412,8 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with Customer or Tenant Id" + "description": "JSON object with Customer or Tenant Id", + "readOnly": true }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", diff --git a/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java b/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java index 423eb56b..3fa7b079 100644 --- a/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java +++ b/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java @@ -73768,7 +73768,7 @@ private HttpRequest.Builder listEntityTypeVersionsRequestBuilder(@javax.annotati /** * List entity versions (listEntityVersions) - * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe <johndoe@gmail.com>\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. + * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe (johndoe@gmail.com)\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param externalEntityUuid A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. (required) * @param branch The name of the working branch, for example 'master' (required) @@ -73787,7 +73787,7 @@ public PageDataEntityVersion listEntityVersions(@javax.annotation.Nonnull Entity /** * List entity versions (listEntityVersions) - * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe <johndoe@gmail.com>\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. + * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe (johndoe@gmail.com)\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param externalEntityUuid A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. (required) * @param branch The name of the working branch, for example 'master' (required) @@ -73808,7 +73808,7 @@ public PageDataEntityVersion listEntityVersions(@javax.annotation.Nonnull Entity /** * List entity versions (listEntityVersions) - * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe <johndoe@gmail.com>\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. + * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe (johndoe@gmail.com)\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param externalEntityUuid A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. (required) * @param branch The name of the working branch, for example 'master' (required) @@ -73827,7 +73827,7 @@ public ApiResponse listEntityVersionsWithHttpInfo(@javax. /** * List entity versions (listEntityVersions) - * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe <johndoe@gmail.com>\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe <johndoe@gmail.com>\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. + * Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe (johndoe@gmail.com)\" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe (johndoe@gmail.com)\" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param externalEntityUuid A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. (required) * @param branch The name of the working branch, for example 'master' (required) @@ -79371,7 +79371,7 @@ private HttpRequest.Builder saveAlarmCommentRequestBuilder(@javax.annotation.Non /** * Save API key for user (saveApiKey) - * Creates an API key for the given user and returns the token ONCE as 'ApiKey <value>'. Available for any authorized user. + * Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'. Available for any authorized user. * @param apiKeyInfo (required) * @return ApiKey * @throws ApiException if fails to make API call @@ -79382,7 +79382,7 @@ public ApiKey saveApiKey(@javax.annotation.Nonnull ApiKeyInfo apiKeyInfo) throws /** * Save API key for user (saveApiKey) - * Creates an API key for the given user and returns the token ONCE as 'ApiKey <value>'. Available for any authorized user. + * Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'. Available for any authorized user. * @param apiKeyInfo (required) * @param headers Optional headers to include in the request * @return ApiKey @@ -79395,7 +79395,7 @@ public ApiKey saveApiKey(@javax.annotation.Nonnull ApiKeyInfo apiKeyInfo, Map saveApiKeyWithHttpInfo(@javax.annotation.Nonnull ApiK /** * Save API key for user (saveApiKey) - * Creates an API key for the given user and returns the token ONCE as 'ApiKey <value>'. Available for any authorized user. + * Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'. Available for any authorized user. * @param apiKeyInfo (required) * @param headers Optional headers to include in the request * @return ApiResponse<ApiKey> @@ -81391,7 +81391,7 @@ private HttpRequest.Builder saveDeviceProfileRequestBuilder(@javax.annotation.No /** * Create Device (saveDevice) with credentials - * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: <b>\"Access token\"</b> with <b>device profile default</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: **\"Access token\"** with **device profile default** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param saveDeviceWithCredentialsRequest (required) * @param entityGroupId (optional) * @param entityGroupIds A list of entity group ids, separated by comma ',' (optional) @@ -81407,7 +81407,7 @@ public Device saveDeviceWithCredentials(@javax.annotation.Nonnull SaveDeviceWith /** * Create Device (saveDevice) with credentials - * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: <b>\"Access token\"</b> with <b>device profile default</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: **\"Access token\"** with **device profile default** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param saveDeviceWithCredentialsRequest (required) * @param entityGroupId (optional) * @param entityGroupIds A list of entity group ids, separated by comma ',' (optional) @@ -81425,7 +81425,7 @@ public Device saveDeviceWithCredentials(@javax.annotation.Nonnull SaveDeviceWith /** * Create Device (saveDevice) with credentials - * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: <b>\"Access token\"</b> with <b>device profile default</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: **\"Access token\"** with **device profile default** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param saveDeviceWithCredentialsRequest (required) * @param entityGroupId (optional) * @param entityGroupIds A list of entity group ids, separated by comma ',' (optional) @@ -81441,7 +81441,7 @@ public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotati /** * Create Device (saveDevice) with credentials - * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: <b>\"Access token\"</b> with <b>device profile default</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: **\"Access token\"** with **device profile default** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param saveDeviceWithCredentialsRequest (required) * @param entityGroupId (optional) * @param entityGroupIds A list of entity group ids, separated by comma ',' (optional) @@ -92993,7 +92993,7 @@ private HttpRequest.Builder updateCustomMenuNameRequestBuilder(@javax.annotation /** * Update device credentials (updateDeviceCredentials) - * During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device ID</b> and with <b>device ID</b> below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. + * During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. * @param deviceCredentials (required) * @return DeviceCredentials * @throws ApiException if fails to make API call @@ -93004,7 +93004,7 @@ public DeviceCredentials updateDeviceCredentials(@javax.annotation.Nonnull Devic /** * Update device credentials (updateDeviceCredentials) - * During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device ID</b> and with <b>device ID</b> below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. + * During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. * @param deviceCredentials (required) * @param headers Optional headers to include in the request * @return DeviceCredentials @@ -93017,7 +93017,7 @@ public DeviceCredentials updateDeviceCredentials(@javax.annotation.Nonnull Devic /** * Update device credentials (updateDeviceCredentials) - * During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device ID</b> and with <b>device ID</b> below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. + * During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. * @param deviceCredentials (required) * @return ApiResponse<DeviceCredentials> * @throws ApiException if fails to make API call @@ -93028,7 +93028,7 @@ public ApiResponse updateDeviceCredentialsWithHttpInfo(@javax /** * Update device credentials (updateDeviceCredentials) - * During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device ID</b> and with <b>device ID</b> below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. + * During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. You may find the example of device with different type of credentials below: - Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: ```json { \"id\": { \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\" }, \"deviceId\": { \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une4\" } ``` - Credentials type: **\"X509\"** with **device profile ID** below: Note: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"id\": { \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\" } ``` - Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: ```json { \"id\": { \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\" }, \"deviceId\": { \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\" } ``` - You may find the example of **LwM2M** device and **RPK** credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"id\": { \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\" }, \"deviceId\": { \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\", \"entityType\":\"DEVICE\" }, \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } ``` Update to real value: - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\", - 'deviceId.id' (this is id of Device). Remove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' authority. * @param deviceCredentials (required) * @param headers Optional headers to include in the request * @return ApiResponse<DeviceCredentials> diff --git a/pe/src/main/java/org/thingsboard/client/model/Alarm.java b/pe/src/main/java/org/thingsboard/client/model/Alarm.java index fc3da55a..a12398bd 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Alarm.java +++ b/pe/src/main/java/org/thingsboard/client/model/Alarm.java @@ -124,7 +124,7 @@ public class Alarm { public static final String JSON_PROPERTY_DETAILS = "details"; @javax.annotation.Nullable - private com.fasterxml.jackson.databind.JsonNode details = null; + private com.fasterxml.jackson.databind.JsonNode details; public static final String JSON_PROPERTY_PROPAGATE = "propagate"; @javax.annotation.Nullable @@ -479,7 +479,7 @@ public Alarm details(@javax.annotation.Nullable com.fasterxml.jackson.databind.J } /** - * Get details + * JSON object with alarm details * @return details */ @javax.annotation.Nullable diff --git a/pe/src/main/java/org/thingsboard/client/model/AlarmData.java b/pe/src/main/java/org/thingsboard/client/model/AlarmData.java index 83574697..6c5d4053 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AlarmData.java +++ b/pe/src/main/java/org/thingsboard/client/model/AlarmData.java @@ -65,6 +65,7 @@ AlarmData.JSON_PROPERTY_ACK_TS, AlarmData.JSON_PROPERTY_CLEAR_TS, AlarmData.JSON_PROPERTY_ASSIGN_TS, + AlarmData.JSON_PROPERTY_DETAILS, AlarmData.JSON_PROPERTY_PROPAGATE, AlarmData.JSON_PROPERTY_PROPAGATE_TO_OWNER, AlarmData.JSON_PROPERTY_PROPAGATE_TO_OWNER_HIERARCHY, @@ -75,8 +76,7 @@ AlarmData.JSON_PROPERTY_ORIGINATOR_DISPLAY_NAME, AlarmData.JSON_PROPERTY_ASSIGNEE, AlarmData.JSON_PROPERTY_NAME, - AlarmData.JSON_PROPERTY_STATUS, - AlarmData.JSON_PROPERTY_DETAILS + AlarmData.JSON_PROPERTY_STATUS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class AlarmData { @@ -148,6 +148,10 @@ public class AlarmData { @javax.annotation.Nullable private Long assignTs; + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private com.fasterxml.jackson.databind.JsonNode details; + public static final String JSON_PROPERTY_PROPAGATE = "propagate"; @javax.annotation.Nullable private Boolean propagate; @@ -192,10 +196,6 @@ public class AlarmData { @javax.annotation.Nonnull private AlarmStatus status; - public static final String JSON_PROPERTY_DETAILS = "details"; - @javax.annotation.Nullable - private com.fasterxml.jackson.databind.JsonNode details = null; - public AlarmData() { } @@ -601,6 +601,30 @@ public void setAssignTs(@javax.annotation.Nullable Long assignTs) { } + public AlarmData details(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { + this.details = details; + return this; + } + + /** + * JSON object with alarm details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public com.fasterxml.jackson.databind.JsonNode getDetails() { + return details; + } + + + @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { + this.details = details; + } + + public AlarmData propagate(@javax.annotation.Nullable Boolean propagate) { this.propagate = propagate; return this; @@ -853,30 +877,6 @@ public AlarmStatus getStatus() { - public AlarmData details(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { - this.details = details; - return this; - } - - /** - * Get details - * @return details - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public com.fasterxml.jackson.databind.JsonNode getDetails() { - return details; - } - - - @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDetails(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { - this.details = details; - } - - /** * Return true if this AlarmData object is equal to o. */ @@ -906,6 +906,7 @@ public boolean equals(Object o) { Objects.equals(this.ackTs, alarmData.ackTs) && Objects.equals(this.clearTs, alarmData.clearTs) && Objects.equals(this.assignTs, alarmData.assignTs) && + Objects.equals(this.details, alarmData.details) && Objects.equals(this.propagate, alarmData.propagate) && Objects.equals(this.propagateToOwner, alarmData.propagateToOwner) && Objects.equals(this.propagateToOwnerHierarchy, alarmData.propagateToOwnerHierarchy) && @@ -916,13 +917,12 @@ public boolean equals(Object o) { Objects.equals(this.originatorDisplayName, alarmData.originatorDisplayName) && Objects.equals(this.assignee, alarmData.assignee) && Objects.equals(this.name, alarmData.name) && - Objects.equals(this.status, alarmData.status) && - Objects.equals(this.details, alarmData.details); + Objects.equals(this.status, alarmData.status); } @Override public int hashCode() { - return Objects.hash(entityId, latest, id, createdTime, tenantId, customerId, type, originator, severity, acknowledged, cleared, assigneeId, startTs, endTs, ackTs, clearTs, assignTs, propagate, propagateToOwner, propagateToOwnerHierarchy, propagateToTenant, propagateRelationTypes, originatorName, originatorLabel, originatorDisplayName, assignee, name, status, details); + return Objects.hash(entityId, latest, id, createdTime, tenantId, customerId, type, originator, severity, acknowledged, cleared, assigneeId, startTs, endTs, ackTs, clearTs, assignTs, details, propagate, propagateToOwner, propagateToOwnerHierarchy, propagateToTenant, propagateRelationTypes, originatorName, originatorLabel, originatorDisplayName, assignee, name, status); } @Override @@ -946,6 +946,7 @@ public String toString() { sb.append(" ackTs: ").append(toIndentedString(ackTs)).append("\n"); sb.append(" clearTs: ").append(toIndentedString(clearTs)).append("\n"); sb.append(" assignTs: ").append(toIndentedString(assignTs)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); sb.append(" propagate: ").append(toIndentedString(propagate)).append("\n"); sb.append(" propagateToOwner: ").append(toIndentedString(propagateToOwner)).append("\n"); sb.append(" propagateToOwnerHierarchy: ").append(toIndentedString(propagateToOwnerHierarchy)).append("\n"); @@ -957,7 +958,6 @@ public String toString() { sb.append(" assignee: ").append(toIndentedString(assignee)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" details: ").append(toIndentedString(details)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1094,6 +1094,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sassignTs%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAssignTs())))); } + // add `details` to the URL query string + if (getDetails() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sdetails%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetails())))); + } + // add `propagate` to the URL query string if (getPropagate() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%spropagate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPropagate())))); @@ -1153,11 +1158,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); } - // add `details` to the URL query string - if (getDetails() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdetails%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetails())))); - } - return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/AlarmInfo.java b/pe/src/main/java/org/thingsboard/client/model/AlarmInfo.java index ac853604..d33176c3 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AlarmInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/AlarmInfo.java @@ -60,6 +60,7 @@ AlarmInfo.JSON_PROPERTY_ACK_TS, AlarmInfo.JSON_PROPERTY_CLEAR_TS, AlarmInfo.JSON_PROPERTY_ASSIGN_TS, + AlarmInfo.JSON_PROPERTY_DETAILS, AlarmInfo.JSON_PROPERTY_PROPAGATE, AlarmInfo.JSON_PROPERTY_PROPAGATE_TO_OWNER, AlarmInfo.JSON_PROPERTY_PROPAGATE_TO_OWNER_HIERARCHY, @@ -70,8 +71,7 @@ AlarmInfo.JSON_PROPERTY_ORIGINATOR_DISPLAY_NAME, AlarmInfo.JSON_PROPERTY_ASSIGNEE, AlarmInfo.JSON_PROPERTY_NAME, - AlarmInfo.JSON_PROPERTY_STATUS, - AlarmInfo.JSON_PROPERTY_DETAILS + AlarmInfo.JSON_PROPERTY_STATUS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class AlarmInfo { @@ -135,6 +135,10 @@ public class AlarmInfo { @javax.annotation.Nullable private Long assignTs; + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private com.fasterxml.jackson.databind.JsonNode details; + public static final String JSON_PROPERTY_PROPAGATE = "propagate"; @javax.annotation.Nullable private Boolean propagate; @@ -179,10 +183,6 @@ public class AlarmInfo { @javax.annotation.Nonnull private AlarmStatus status; - public static final String JSON_PROPERTY_DETAILS = "details"; - @javax.annotation.Nullable - private com.fasterxml.jackson.databind.JsonNode details = null; - public AlarmInfo() { } @@ -532,6 +532,30 @@ public void setAssignTs(@javax.annotation.Nullable Long assignTs) { } + public AlarmInfo details(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { + this.details = details; + return this; + } + + /** + * JSON object with alarm details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public com.fasterxml.jackson.databind.JsonNode getDetails() { + return details; + } + + + @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { + this.details = details; + } + + public AlarmInfo propagate(@javax.annotation.Nullable Boolean propagate) { this.propagate = propagate; return this; @@ -784,30 +808,6 @@ public AlarmStatus getStatus() { - public AlarmInfo details(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { - this.details = details; - return this; - } - - /** - * Get details - * @return details - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public com.fasterxml.jackson.databind.JsonNode getDetails() { - return details; - } - - - @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDetails(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode details) { - this.details = details; - } - - /** * Return true if this AlarmInfo object is equal to o. */ @@ -835,6 +835,7 @@ public boolean equals(Object o) { Objects.equals(this.ackTs, alarmInfo.ackTs) && Objects.equals(this.clearTs, alarmInfo.clearTs) && Objects.equals(this.assignTs, alarmInfo.assignTs) && + Objects.equals(this.details, alarmInfo.details) && Objects.equals(this.propagate, alarmInfo.propagate) && Objects.equals(this.propagateToOwner, alarmInfo.propagateToOwner) && Objects.equals(this.propagateToOwnerHierarchy, alarmInfo.propagateToOwnerHierarchy) && @@ -845,13 +846,12 @@ public boolean equals(Object o) { Objects.equals(this.originatorDisplayName, alarmInfo.originatorDisplayName) && Objects.equals(this.assignee, alarmInfo.assignee) && Objects.equals(this.name, alarmInfo.name) && - Objects.equals(this.status, alarmInfo.status) && - Objects.equals(this.details, alarmInfo.details); + Objects.equals(this.status, alarmInfo.status); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, customerId, type, originator, severity, acknowledged, cleared, assigneeId, startTs, endTs, ackTs, clearTs, assignTs, propagate, propagateToOwner, propagateToOwnerHierarchy, propagateToTenant, propagateRelationTypes, originatorName, originatorLabel, originatorDisplayName, assignee, name, status, details); + return Objects.hash(id, createdTime, tenantId, customerId, type, originator, severity, acknowledged, cleared, assigneeId, startTs, endTs, ackTs, clearTs, assignTs, details, propagate, propagateToOwner, propagateToOwnerHierarchy, propagateToTenant, propagateRelationTypes, originatorName, originatorLabel, originatorDisplayName, assignee, name, status); } @Override @@ -873,6 +873,7 @@ public String toString() { sb.append(" ackTs: ").append(toIndentedString(ackTs)).append("\n"); sb.append(" clearTs: ").append(toIndentedString(clearTs)).append("\n"); sb.append(" assignTs: ").append(toIndentedString(assignTs)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); sb.append(" propagate: ").append(toIndentedString(propagate)).append("\n"); sb.append(" propagateToOwner: ").append(toIndentedString(propagateToOwner)).append("\n"); sb.append(" propagateToOwnerHierarchy: ").append(toIndentedString(propagateToOwnerHierarchy)).append("\n"); @@ -884,7 +885,6 @@ public String toString() { sb.append(" assignee: ").append(toIndentedString(assignee)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" details: ").append(toIndentedString(details)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1007,6 +1007,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sassignTs%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAssignTs())))); } + // add `details` to the URL query string + if (getDetails() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sdetails%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetails())))); + } + // add `propagate` to the URL query string if (getPropagate() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%spropagate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPropagate())))); @@ -1066,11 +1071,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); } - // add `details` to the URL query string - if (getDetails() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdetails%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetails())))); - } - return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/Asset.java b/pe/src/main/java/org/thingsboard/client/model/Asset.java index 760a904a..652c43ad 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Asset.java +++ b/pe/src/main/java/org/thingsboard/client/model/Asset.java @@ -105,12 +105,14 @@ public Asset() { public Asset( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; + this.ownerId = ownerId; } public Asset id(@javax.annotation.Nullable AssetId id) { @@ -299,11 +301,6 @@ public void setVersion(@javax.annotation.Nullable Long version) { } - public Asset ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -316,11 +313,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public Asset additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/AssetInfo.java b/pe/src/main/java/org/thingsboard/client/model/AssetInfo.java index 12e4bf59..f8b8a531 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AssetInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/AssetInfo.java @@ -119,13 +119,15 @@ public AssetInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName + @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; this.ownerName = ownerName; + this.ownerId = ownerId; } public AssetInfo id(@javax.annotation.Nullable AssetId id) { @@ -360,11 +362,6 @@ public void setGroups(@javax.annotation.Nullable List groups) { } - public AssetInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -377,11 +374,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public AssetInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/AuditLog.java b/pe/src/main/java/org/thingsboard/client/model/AuditLog.java index 4bc53623..1ff6864f 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AuditLog.java +++ b/pe/src/main/java/org/thingsboard/client/model/AuditLog.java @@ -113,6 +113,7 @@ public AuditLog( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_ENTITY_ID) EntityId entityId, @JsonProperty(JSON_PROPERTY_ENTITY_NAME) String entityName, @JsonProperty(JSON_PROPERTY_USER_ID) UserId userId, @JsonProperty(JSON_PROPERTY_USER_NAME) String userName, @@ -125,6 +126,7 @@ public AuditLog( this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; + this.entityId = entityId; this.entityName = entityName; this.userId = userId; this.userName = userName; @@ -200,11 +202,6 @@ public CustomerId getCustomerId() { - public AuditLog entityId(@javax.annotation.Nullable EntityId entityId) { - this.entityId = entityId; - return this; - } - /** * JSON object with Entity id * @return entityId @@ -217,11 +214,6 @@ public EntityId getEntityId() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEntityId(@javax.annotation.Nullable EntityId entityId) { - this.entityId = entityId; - } /** diff --git a/pe/src/main/java/org/thingsboard/client/model/BlobEntityInfo.java b/pe/src/main/java/org/thingsboard/client/model/BlobEntityInfo.java index 34ea1c41..b6d12b5c 100644 --- a/pe/src/main/java/org/thingsboard/client/model/BlobEntityInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/BlobEntityInfo.java @@ -134,7 +134,8 @@ public BlobEntityInfo( @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_NAME) String name, @JsonProperty(JSON_PROPERTY_TYPE) String type, - @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) ContentTypeEnum contentType + @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) ContentTypeEnum contentType, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; @@ -143,6 +144,7 @@ public BlobEntityInfo( this.name = name; this.type = type; this.contentType = contentType; + this.ownerId = ownerId; } public BlobEntityInfo id(@javax.annotation.Nullable BlobEntityId id) { @@ -253,11 +255,6 @@ public ContentTypeEnum getContentType() { - public BlobEntityInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -270,11 +267,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public BlobEntityInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/BlobEntityWithCustomerInfo.java b/pe/src/main/java/org/thingsboard/client/model/BlobEntityWithCustomerInfo.java index e0f6dacd..9ea3b41f 100644 --- a/pe/src/main/java/org/thingsboard/client/model/BlobEntityWithCustomerInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/BlobEntityWithCustomerInfo.java @@ -145,7 +145,8 @@ public BlobEntityWithCustomerInfo( @JsonProperty(JSON_PROPERTY_NAME) String name, @JsonProperty(JSON_PROPERTY_TYPE) String type, @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) ContentTypeEnum contentType, - @JsonProperty(JSON_PROPERTY_CUSTOMER_IS_PUBLIC) Boolean customerIsPublic + @JsonProperty(JSON_PROPERTY_CUSTOMER_IS_PUBLIC) Boolean customerIsPublic, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; @@ -155,6 +156,7 @@ public BlobEntityWithCustomerInfo( this.type = type; this.contentType = contentType; this.customerIsPublic = customerIsPublic; + this.ownerId = ownerId; } public BlobEntityWithCustomerInfo id(@javax.annotation.Nullable BlobEntityId id) { @@ -303,11 +305,6 @@ public Boolean getCustomerIsPublic() { - public BlobEntityWithCustomerInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -320,11 +317,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public BlobEntityWithCustomerInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/CalculatedField.java b/pe/src/main/java/org/thingsboard/client/model/CalculatedField.java index b17f4688..2800ba59 100644 --- a/pe/src/main/java/org/thingsboard/client/model/CalculatedField.java +++ b/pe/src/main/java/org/thingsboard/client/model/CalculatedField.java @@ -51,7 +51,8 @@ CalculatedField.JSON_PROPERTY_DEBUG_SETTINGS, CalculatedField.JSON_PROPERTY_CONFIGURATION_VERSION, CalculatedField.JSON_PROPERTY_CONFIGURATION, - CalculatedField.JSON_PROPERTY_VERSION + CalculatedField.JSON_PROPERTY_VERSION, + CalculatedField.JSON_PROPERTY_ADDITIONAL_INFO }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class CalculatedField { @@ -99,6 +100,10 @@ public class CalculatedField { @javax.annotation.Nullable private Long version; + public static final String JSON_PROPERTY_ADDITIONAL_INFO = "additionalInfo"; + @javax.annotation.Nullable + private com.fasterxml.jackson.databind.JsonNode additionalInfo; + public CalculatedField() { } @@ -366,6 +371,30 @@ public void setVersion(@javax.annotation.Nullable Long version) { } + public CalculatedField additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { + this.additionalInfo = additionalInfo; + return this; + } + + /** + * Additional parameters of the calculated field + * @return additionalInfo + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ADDITIONAL_INFO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public com.fasterxml.jackson.databind.JsonNode getAdditionalInfo() { + return additionalInfo; + } + + + @JsonProperty(value = JSON_PROPERTY_ADDITIONAL_INFO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdditionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { + this.additionalInfo = additionalInfo; + } + + /** * Return true if this CalculatedField object is equal to o. */ @@ -388,12 +417,13 @@ public boolean equals(Object o) { Objects.equals(this.debugSettings, calculatedField.debugSettings) && Objects.equals(this.configurationVersion, calculatedField.configurationVersion) && Objects.equals(this._configuration, calculatedField._configuration) && - Objects.equals(this.version, calculatedField.version); + Objects.equals(this.version, calculatedField.version) && + Objects.equals(this.additionalInfo, calculatedField.additionalInfo); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, entityId, type, name, debugMode, debugSettings, configurationVersion, _configuration, version); + return Objects.hash(id, createdTime, tenantId, entityId, type, name, debugMode, debugSettings, configurationVersion, _configuration, version, additionalInfo); } @Override @@ -411,6 +441,7 @@ public String toString() { sb.append(" configurationVersion: ").append(toIndentedString(configurationVersion)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); sb.append("}"); return sb.toString(); } @@ -513,6 +544,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); } + // add `additionalInfo` to the URL query string + if (getAdditionalInfo() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sadditionalInfo%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInfo())))); + } + return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java b/pe/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java index 8891973e..825bc7c1 100644 --- a/pe/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java +++ b/pe/src/main/java/org/thingsboard/client/model/CalculatedFieldDebugEventFilter.java @@ -42,15 +42,14 @@ */ @JsonPropertyOrder({ CalculatedFieldDebugEventFilter.JSON_PROPERTY_SERVER, + CalculatedFieldDebugEventFilter.JSON_PROPERTY_IS_ERROR, CalculatedFieldDebugEventFilter.JSON_PROPERTY_ERROR_STR, CalculatedFieldDebugEventFilter.JSON_PROPERTY_ENTITY_ID, CalculatedFieldDebugEventFilter.JSON_PROPERTY_ENTITY_TYPE, CalculatedFieldDebugEventFilter.JSON_PROPERTY_MSG_ID, CalculatedFieldDebugEventFilter.JSON_PROPERTY_MSG_TYPE, CalculatedFieldDebugEventFilter.JSON_PROPERTY_ARGUMENTS, - CalculatedFieldDebugEventFilter.JSON_PROPERTY_RESULT, - CalculatedFieldDebugEventFilter.JSON_PROPERTY_ERROR, - CalculatedFieldDebugEventFilter.JSON_PROPERTY_IS_ERROR + CalculatedFieldDebugEventFilter.JSON_PROPERTY_RESULT }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -64,6 +63,45 @@ public class CalculatedFieldDebugEventFilter extends EventFilter { @javax.annotation.Nullable private String server; + /** + * Boolean value to filter the errors + */ + public enum IsErrorEnum { + FALSE(Boolean.valueOf("false")), + + TRUE(Boolean.valueOf("true")); + + private Boolean value; + + IsErrorEnum(Boolean value) { + this.value = value; + } + + @JsonValue + public Boolean getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IsErrorEnum fromValue(Boolean value) { + for (IsErrorEnum b : IsErrorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private IsErrorEnum isError; + public static final String JSON_PROPERTY_ERROR_STR = "errorStr"; @javax.annotation.Nullable private String errorStr; @@ -125,14 +163,6 @@ public static EntityTypeEnum fromValue(String value) { @javax.annotation.Nullable private String result; - public static final String JSON_PROPERTY_ERROR = "error"; - @javax.annotation.Nullable - private Boolean error; - - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public CalculatedFieldDebugEventFilter() { } @@ -160,6 +190,30 @@ public void setServer(@javax.annotation.Nullable String server) { } + public CalculatedFieldDebugEventFilter isError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + return this; + } + + /** + * Boolean value to filter the errors + * @return isError + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IsErrorEnum getIsError() { + return isError; + } + + + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + } + + public CalculatedFieldDebugEventFilter errorStr(@javax.annotation.Nullable String errorStr) { this.errorStr = errorStr; return this; @@ -328,54 +382,6 @@ public void setResult(@javax.annotation.Nullable String result) { } - public CalculatedFieldDebugEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; - return this; - } - - /** - * Get error - * @return error - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; - } - - - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; - } - - - public CalculatedFieldDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - return this; - } - - /** - * Get isError - * @return isError - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; - } - - - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - } - - @Override public CalculatedFieldDebugEventFilter eventType(@javax.annotation.Nonnull EventType eventType) { this.setEventType(eventType); @@ -401,6 +407,7 @@ public boolean equals(Object o) { } CalculatedFieldDebugEventFilter calculatedFieldDebugEventFilter = (CalculatedFieldDebugEventFilter) o; return Objects.equals(this.server, calculatedFieldDebugEventFilter.server) && + Objects.equals(this.isError, calculatedFieldDebugEventFilter.isError) && Objects.equals(this.errorStr, calculatedFieldDebugEventFilter.errorStr) && Objects.equals(this.entityId, calculatedFieldDebugEventFilter.entityId) && Objects.equals(this.entityType, calculatedFieldDebugEventFilter.entityType) && @@ -408,14 +415,12 @@ public boolean equals(Object o) { Objects.equals(this.msgType, calculatedFieldDebugEventFilter.msgType) && Objects.equals(this.arguments, calculatedFieldDebugEventFilter.arguments) && Objects.equals(this.result, calculatedFieldDebugEventFilter.result) && - Objects.equals(this.error, calculatedFieldDebugEventFilter.error) && - Objects.equals(this.isError, calculatedFieldDebugEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, entityId, entityType, msgId, msgType, arguments, result, error, isError, super.hashCode()); + return Objects.hash(server, isError, errorStr, entityId, entityType, msgId, msgType, arguments, result, super.hashCode()); } @Override @@ -424,6 +429,7 @@ public String toString() { sb.append("class CalculatedFieldDebugEventFilter {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" server: ").append(toIndentedString(server)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" errorStr: ").append(toIndentedString(errorStr)).append("\n"); sb.append(" entityId: ").append(toIndentedString(entityId)).append("\n"); sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); @@ -431,8 +437,6 @@ public String toString() { sb.append(" msgType: ").append(toIndentedString(msgType)).append("\n"); sb.append(" arguments: ").append(toIndentedString(arguments)).append("\n"); sb.append(" result: ").append(toIndentedString(result)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -495,6 +499,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sserver%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getServer())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + // add `errorStr` to the URL query string if (getErrorStr() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serrorStr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorStr())))); @@ -530,16 +539,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); } - // add `error` to the URL query string - if (getError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); - } - - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/CalculatedFieldInfo.java b/pe/src/main/java/org/thingsboard/client/model/CalculatedFieldInfo.java index 3134bf8a..76329673 100644 --- a/pe/src/main/java/org/thingsboard/client/model/CalculatedFieldInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/CalculatedFieldInfo.java @@ -52,6 +52,7 @@ CalculatedFieldInfo.JSON_PROPERTY_CONFIGURATION_VERSION, CalculatedFieldInfo.JSON_PROPERTY_CONFIGURATION, CalculatedFieldInfo.JSON_PROPERTY_VERSION, + CalculatedFieldInfo.JSON_PROPERTY_ADDITIONAL_INFO, CalculatedFieldInfo.JSON_PROPERTY_ENTITY_NAME }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @@ -100,6 +101,10 @@ public class CalculatedFieldInfo { @javax.annotation.Nullable private Long version; + public static final String JSON_PROPERTY_ADDITIONAL_INFO = "additionalInfo"; + @javax.annotation.Nullable + private com.fasterxml.jackson.databind.JsonNode additionalInfo; + public static final String JSON_PROPERTY_ENTITY_NAME = "entityName"; @javax.annotation.Nullable private String entityName; @@ -371,6 +376,30 @@ public void setVersion(@javax.annotation.Nullable Long version) { } + public CalculatedFieldInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { + this.additionalInfo = additionalInfo; + return this; + } + + /** + * Additional parameters of the calculated field + * @return additionalInfo + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ADDITIONAL_INFO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public com.fasterxml.jackson.databind.JsonNode getAdditionalInfo() { + return additionalInfo; + } + + + @JsonProperty(value = JSON_PROPERTY_ADDITIONAL_INFO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdditionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { + this.additionalInfo = additionalInfo; + } + + public CalculatedFieldInfo entityName(@javax.annotation.Nullable String entityName) { this.entityName = entityName; return this; @@ -418,12 +447,13 @@ public boolean equals(Object o) { Objects.equals(this.configurationVersion, calculatedFieldInfo.configurationVersion) && Objects.equals(this._configuration, calculatedFieldInfo._configuration) && Objects.equals(this.version, calculatedFieldInfo.version) && + Objects.equals(this.additionalInfo, calculatedFieldInfo.additionalInfo) && Objects.equals(this.entityName, calculatedFieldInfo.entityName); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, entityId, type, name, debugMode, debugSettings, configurationVersion, _configuration, version, entityName); + return Objects.hash(id, createdTime, tenantId, entityId, type, name, debugMode, debugSettings, configurationVersion, _configuration, version, additionalInfo, entityName); } @Override @@ -441,6 +471,7 @@ public String toString() { sb.append(" configurationVersion: ").append(toIndentedString(configurationVersion)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); sb.append(" entityName: ").append(toIndentedString(entityName)).append("\n"); sb.append("}"); return sb.toString(); @@ -544,6 +575,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); } + // add `additionalInfo` to the URL query string + if (getAdditionalInfo() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sadditionalInfo%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInfo())))); + } + // add `entityName` to the URL query string if (getEntityName() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sentityName%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityName())))); diff --git a/pe/src/main/java/org/thingsboard/client/model/Customer.java b/pe/src/main/java/org/thingsboard/client/model/Customer.java index a3c1d6a7..36113d1e 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Customer.java +++ b/pe/src/main/java/org/thingsboard/client/model/Customer.java @@ -144,12 +144,14 @@ public Customer() { public Customer( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.name = name; this.customerId = customerId; + this.ownerId = ownerId; } public Customer id(@javax.annotation.Nullable CustomerId id) { @@ -530,11 +532,6 @@ public CustomerId getCustomerId() { - public Customer ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -547,11 +544,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public Customer additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/CustomerInfo.java b/pe/src/main/java/org/thingsboard/client/model/CustomerInfo.java index 6973243e..4c459058 100644 --- a/pe/src/main/java/org/thingsboard/client/model/CustomerInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/CustomerInfo.java @@ -158,13 +158,15 @@ public CustomerInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.ownerName = ownerName; this.name = name; this.customerId = customerId; + this.ownerId = ownerId; } public CustomerInfo id(@javax.annotation.Nullable CustomerId id) { @@ -591,11 +593,6 @@ public CustomerId getCustomerId() { - public CustomerInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -608,11 +605,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public CustomerInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/Dashboard.java b/pe/src/main/java/org/thingsboard/client/model/Dashboard.java index d996aa87..a59d0a8c 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Dashboard.java +++ b/pe/src/main/java/org/thingsboard/client/model/Dashboard.java @@ -46,74 +46,74 @@ * Dashboard */ @JsonPropertyOrder({ + Dashboard.JSON_PROPERTY_ID, + Dashboard.JSON_PROPERTY_CREATED_TIME, + Dashboard.JSON_PROPERTY_TENANT_ID, + Dashboard.JSON_PROPERTY_CUSTOMER_ID, + Dashboard.JSON_PROPERTY_OWNER_ID, Dashboard.JSON_PROPERTY_TITLE, + Dashboard.JSON_PROPERTY_NAME, Dashboard.JSON_PROPERTY_IMAGE, + Dashboard.JSON_PROPERTY_ASSIGNED_CUSTOMERS, Dashboard.JSON_PROPERTY_MOBILE_HIDE, Dashboard.JSON_PROPERTY_MOBILE_ORDER, Dashboard.JSON_PROPERTY_CONFIGURATION, - Dashboard.JSON_PROPERTY_NAME, Dashboard.JSON_PROPERTY_RESOURCES, - Dashboard.JSON_PROPERTY_ASSIGNED_CUSTOMERS, - Dashboard.JSON_PROPERTY_CREATED_TIME, - Dashboard.JSON_PROPERTY_CUSTOMER_ID, - Dashboard.JSON_PROPERTY_ID, - Dashboard.JSON_PROPERTY_OWNER_ID, - Dashboard.JSON_PROPERTY_TENANT_ID, Dashboard.JSON_PROPERTY_VERSION }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class Dashboard { - public static final String JSON_PROPERTY_TITLE = "title"; + public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nullable - private String title; + private DashboardId id; - public static final String JSON_PROPERTY_IMAGE = "image"; + public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; @javax.annotation.Nullable - private String image; + private Long createdTime; - public static final String JSON_PROPERTY_MOBILE_HIDE = "mobileHide"; + public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; @javax.annotation.Nullable - private Boolean mobileHide; + private TenantId tenantId; - public static final String JSON_PROPERTY_MOBILE_ORDER = "mobileOrder"; + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; @javax.annotation.Nullable - private Integer mobileOrder; + private CustomerId customerId; - public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; + public static final String JSON_PROPERTY_OWNER_ID = "ownerId"; @javax.annotation.Nullable - private com.fasterxml.jackson.databind.JsonNode _configuration = null; + private EntityId ownerId; + + public static final String JSON_PROPERTY_TITLE = "title"; + @javax.annotation.Nullable + private String title; public static final String JSON_PROPERTY_NAME = "name"; @javax.annotation.Nullable private String name; - public static final String JSON_PROPERTY_RESOURCES = "resources"; + public static final String JSON_PROPERTY_IMAGE = "image"; @javax.annotation.Nullable - private List resources = new ArrayList<>(); + private String image; public static final String JSON_PROPERTY_ASSIGNED_CUSTOMERS = "assignedCustomers"; @javax.annotation.Nullable private Set assignedCustomers = new LinkedHashSet<>(); - public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; - @javax.annotation.Nullable - private Long createdTime; - - public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + public static final String JSON_PROPERTY_MOBILE_HIDE = "mobileHide"; @javax.annotation.Nullable - private CustomerId customerId; + private Boolean mobileHide; - public static final String JSON_PROPERTY_ID = "id"; + public static final String JSON_PROPERTY_MOBILE_ORDER = "mobileOrder"; @javax.annotation.Nullable - private DashboardId id; + private Integer mobileOrder; - public static final String JSON_PROPERTY_OWNER_ID = "ownerId"; + public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; @javax.annotation.Nullable - private EntityId ownerId; + private com.fasterxml.jackson.databind.JsonNode _configuration = null; - public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; + public static final String JSON_PROPERTY_RESOURCES = "resources"; @javax.annotation.Nullable - private TenantId tenantId; + private List resources = new ArrayList<>(); public static final String JSON_PROPERTY_VERSION = "version"; @javax.annotation.Nullable @@ -124,109 +124,135 @@ public Dashboard() { @JsonCreator public Dashboard( + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId, + @JsonProperty(JSON_PROPERTY_NAME) String name, @JsonProperty(JSON_PROPERTY_IMAGE) String image, @JsonProperty(JSON_PROPERTY_MOBILE_HIDE) Boolean mobileHide, - @JsonProperty(JSON_PROPERTY_MOBILE_ORDER) Integer mobileOrder, - @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId + @JsonProperty(JSON_PROPERTY_MOBILE_ORDER) Integer mobileOrder ) { this(); + this.createdTime = createdTime; + this.tenantId = tenantId; + this.ownerId = ownerId; + this.name = name; this.image = image; this.mobileHide = mobileHide; this.mobileOrder = mobileOrder; - this.name = name; - this.createdTime = createdTime; - this.tenantId = tenantId; } - public Dashboard title(@javax.annotation.Nullable String title) { - this.title = title; + public Dashboard id(@javax.annotation.Nullable DashboardId id) { + this.id = id; return this; } /** - * Title of the dashboard. - * @return title + * JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. + * @return id */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) + @JsonProperty(value = JSON_PROPERTY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; + public DashboardId getId() { + return id; } - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) + @JsonProperty(value = JSON_PROPERTY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(@javax.annotation.Nullable String title) { - this.title = title; + public void setId(@javax.annotation.Nullable DashboardId id) { + this.id = id; } /** - * Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. - * @return image + * Timestamp of the dashboard creation, in milliseconds + * @return createdTime */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IMAGE, required = false) + @JsonProperty(value = JSON_PROPERTY_CREATED_TIME, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getImage() { - return image; + public Long getCreatedTime() { + return createdTime; } /** - * Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. - * @return mobileHide + * JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. + * @return tenantId */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_MOBILE_HIDE, required = false) + @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMobileHide() { - return mobileHide; + public TenantId getTenantId() { + return tenantId; } + public Dashboard customerId(@javax.annotation.Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications - * @return mobileOrder + * JSON object with Customer Id. + * @return customerId */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_MOBILE_ORDER, required = false) + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getMobileOrder() { - return mobileOrder; + public CustomerId getCustomerId() { + return customerId; } + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@javax.annotation.Nullable CustomerId customerId) { + this.customerId = customerId; + } - public Dashboard _configuration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { - this._configuration = _configuration; + /** + * JSON object with Customer or Tenant Id + * @return ownerId + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityId getOwnerId() { + return ownerId; + } + + + + + public Dashboard title(@javax.annotation.Nullable String title) { + this.title = title; return this; } /** - * Get _configuration - * @return _configuration + * Title of the dashboard. + * @return title */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) + @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public com.fasterxml.jackson.databind.JsonNode getConfiguration() { - return _configuration; + public String getTitle() { + return title; } - @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) + @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setConfiguration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { - this._configuration = _configuration; + public void setTitle(@javax.annotation.Nullable String title) { + this.title = title; } @@ -244,36 +270,18 @@ public String getName() { - public Dashboard resources(@javax.annotation.Nullable List resources) { - this.resources = resources; - return this; - } - - public Dashboard addResourcesItem(ResourceExportData resourcesItem) { - if (this.resources == null) { - this.resources = new ArrayList<>(); - } - this.resources.add(resourcesItem); - return this; - } - /** - * Get resources - * @return resources + * Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. + * @return image */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) + @JsonProperty(value = JSON_PROPERTY_IMAGE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getResources() { - return resources; + public String getImage() { + return image; } - @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResources(@javax.annotation.Nullable List resources) { - this.resources = resources; - } public Dashboard assignedCustomers(@javax.annotation.Nullable Set assignedCustomers) { @@ -310,103 +318,87 @@ public void setAssignedCustomers(@javax.annotation.Nullable Set resources) { + this.resources = resources; return this; } - /** - * JSON object with Customer or Tenant Id - * @return ownerId - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EntityId getOwnerId() { - return ownerId; - } - - - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; + public Dashboard addResourcesItem(ResourceExportData resourcesItem) { + if (this.resources == null) { + this.resources = new ArrayList<>(); + } + this.resources.add(resourcesItem); + return this; } - /** - * JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. - * @return tenantId + * Get resources + * @return resources */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TenantId getTenantId() { - return tenantId; + public List getResources() { + return resources; } + @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResources(@javax.annotation.Nullable List resources) { + this.resources = resources; + } public Dashboard version(@javax.annotation.Nullable Long version) { @@ -445,44 +437,44 @@ public boolean equals(Object o) { return false; } Dashboard dashboard = (Dashboard) o; - return Objects.equals(this.title, dashboard.title) && + return Objects.equals(this.id, dashboard.id) && + Objects.equals(this.createdTime, dashboard.createdTime) && + Objects.equals(this.tenantId, dashboard.tenantId) && + Objects.equals(this.customerId, dashboard.customerId) && + Objects.equals(this.ownerId, dashboard.ownerId) && + Objects.equals(this.title, dashboard.title) && + Objects.equals(this.name, dashboard.name) && Objects.equals(this.image, dashboard.image) && + Objects.equals(this.assignedCustomers, dashboard.assignedCustomers) && Objects.equals(this.mobileHide, dashboard.mobileHide) && Objects.equals(this.mobileOrder, dashboard.mobileOrder) && Objects.equals(this._configuration, dashboard._configuration) && - Objects.equals(this.name, dashboard.name) && Objects.equals(this.resources, dashboard.resources) && - Objects.equals(this.assignedCustomers, dashboard.assignedCustomers) && - Objects.equals(this.createdTime, dashboard.createdTime) && - Objects.equals(this.customerId, dashboard.customerId) && - Objects.equals(this.id, dashboard.id) && - Objects.equals(this.ownerId, dashboard.ownerId) && - Objects.equals(this.tenantId, dashboard.tenantId) && Objects.equals(this.version, dashboard.version); } @Override public int hashCode() { - return Objects.hash(title, image, mobileHide, mobileOrder, _configuration, name, resources, assignedCustomers, createdTime, customerId, id, ownerId, tenantId, version); + return Objects.hash(id, createdTime, tenantId, customerId, ownerId, title, name, image, assignedCustomers, mobileHide, mobileOrder, _configuration, resources, version); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Dashboard {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" image: ").append(toIndentedString(image)).append("\n"); + sb.append(" assignedCustomers: ").append(toIndentedString(assignedCustomers)).append("\n"); sb.append(" mobileHide: ").append(toIndentedString(mobileHide)).append("\n"); sb.append(" mobileOrder: ").append(toIndentedString(mobileOrder)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); - sb.append(" assignedCustomers: ").append(toIndentedString(assignedCustomers)).append("\n"); - sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); - sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append("}"); return sb.toString(); @@ -531,29 +523,34 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `title` to the URL query string - if (getTitle() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); + // add `id` to the URL query string + if (getId() != null) { + joiner.add(getId().toUrlQueryString(prefix + "id" + suffix)); } - // add `image` to the URL query string - if (getImage() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%simage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getImage())))); + // add `createdTime` to the URL query string + if (getCreatedTime() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%screatedTime%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedTime())))); } - // add `mobileHide` to the URL query string - if (getMobileHide() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smobileHide%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMobileHide())))); + // add `tenantId` to the URL query string + if (getTenantId() != null) { + joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix)); } - // add `mobileOrder` to the URL query string - if (getMobileOrder() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smobileOrder%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMobileOrder())))); + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(getCustomerId().toUrlQueryString(prefix + "customerId" + suffix)); } - // add `configuration` to the URL query string - if (getConfiguration() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sconfiguration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfiguration())))); + // add `ownerId` to the URL query string + if (getOwnerId() != null) { + joiner.add(getOwnerId().toUrlQueryString(prefix + "ownerId" + suffix)); + } + + // add `title` to the URL query string + if (getTitle() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); } // add `name` to the URL query string @@ -561,14 +558,9 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); } - // add `resources` to the URL query string - if (getResources() != null) { - for (int i = 0; i < getResources().size(); i++) { - if (getResources().get(i) != null) { - joiner.add(getResources().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sresources%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } + // add `image` to the URL query string + if (getImage() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%simage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getImage())))); } // add `assignedCustomers` to the URL query string @@ -583,29 +575,29 @@ public String toUrlQueryString(String prefix) { i++; } - // add `createdTime` to the URL query string - if (getCreatedTime() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%screatedTime%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedTime())))); - } - - // add `customerId` to the URL query string - if (getCustomerId() != null) { - joiner.add(getCustomerId().toUrlQueryString(prefix + "customerId" + suffix)); + // add `mobileHide` to the URL query string + if (getMobileHide() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smobileHide%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMobileHide())))); } - // add `id` to the URL query string - if (getId() != null) { - joiner.add(getId().toUrlQueryString(prefix + "id" + suffix)); + // add `mobileOrder` to the URL query string + if (getMobileOrder() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smobileOrder%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMobileOrder())))); } - // add `ownerId` to the URL query string - if (getOwnerId() != null) { - joiner.add(getOwnerId().toUrlQueryString(prefix + "ownerId" + suffix)); + // add `configuration` to the URL query string + if (getConfiguration() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sconfiguration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfiguration())))); } - // add `tenantId` to the URL query string - if (getTenantId() != null) { - joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix)); + // add `resources` to the URL query string + if (getResources() != null) { + for (int i = 0; i < getResources().size(); i++) { + if (getResources().get(i) != null) { + joiner.add(getResources().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sresources%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } } // add `version` to the URL query string diff --git a/pe/src/main/java/org/thingsboard/client/model/DashboardInfo.java b/pe/src/main/java/org/thingsboard/client/model/DashboardInfo.java index 5afd133e..db0cc3fe 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DashboardInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/DashboardInfo.java @@ -47,72 +47,76 @@ * DashboardInfo */ @JsonPropertyOrder({ + DashboardInfo.JSON_PROPERTY_ID, + DashboardInfo.JSON_PROPERTY_CREATED_TIME, + DashboardInfo.JSON_PROPERTY_TENANT_ID, + DashboardInfo.JSON_PROPERTY_CUSTOMER_ID, + DashboardInfo.JSON_PROPERTY_OWNER_ID, DashboardInfo.JSON_PROPERTY_TITLE, + DashboardInfo.JSON_PROPERTY_NAME, DashboardInfo.JSON_PROPERTY_IMAGE, + DashboardInfo.JSON_PROPERTY_ASSIGNED_CUSTOMERS, DashboardInfo.JSON_PROPERTY_MOBILE_HIDE, DashboardInfo.JSON_PROPERTY_MOBILE_ORDER, DashboardInfo.JSON_PROPERTY_CONFIGURATION, - DashboardInfo.JSON_PROPERTY_NAME, DashboardInfo.JSON_PROPERTY_RESOURCES, - DashboardInfo.JSON_PROPERTY_ID, - DashboardInfo.JSON_PROPERTY_CREATED_TIME, - DashboardInfo.JSON_PROPERTY_TENANT_ID, - DashboardInfo.JSON_PROPERTY_CUSTOMER_ID, - DashboardInfo.JSON_PROPERTY_ASSIGNED_CUSTOMERS, DashboardInfo.JSON_PROPERTY_VERSION, DashboardInfo.JSON_PROPERTY_OWNER_NAME, - DashboardInfo.JSON_PROPERTY_GROUPS, - DashboardInfo.JSON_PROPERTY_OWNER_ID + DashboardInfo.JSON_PROPERTY_GROUPS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class DashboardInfo { - public static final String JSON_PROPERTY_TITLE = "title"; + public static final String JSON_PROPERTY_ID = "id"; @javax.annotation.Nullable - private String title; + private DashboardId id; - public static final String JSON_PROPERTY_IMAGE = "image"; + public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; @javax.annotation.Nullable - private String image; + private Long createdTime; - public static final String JSON_PROPERTY_MOBILE_HIDE = "mobileHide"; + public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; @javax.annotation.Nullable - private Boolean mobileHide; + private TenantId tenantId; - public static final String JSON_PROPERTY_MOBILE_ORDER = "mobileOrder"; + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; @javax.annotation.Nullable - private Integer mobileOrder; + private CustomerId customerId; - public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; + public static final String JSON_PROPERTY_OWNER_ID = "ownerId"; @javax.annotation.Nullable - private com.fasterxml.jackson.databind.JsonNode _configuration = null; + private EntityId ownerId; + + public static final String JSON_PROPERTY_TITLE = "title"; + @javax.annotation.Nullable + private String title; public static final String JSON_PROPERTY_NAME = "name"; @javax.annotation.Nullable private String name; - public static final String JSON_PROPERTY_RESOURCES = "resources"; + public static final String JSON_PROPERTY_IMAGE = "image"; @javax.annotation.Nullable - private List resources = new ArrayList<>(); + private String image; - public static final String JSON_PROPERTY_ID = "id"; + public static final String JSON_PROPERTY_ASSIGNED_CUSTOMERS = "assignedCustomers"; @javax.annotation.Nullable - private DashboardId id; + private Set assignedCustomers = new LinkedHashSet<>(); - public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; + public static final String JSON_PROPERTY_MOBILE_HIDE = "mobileHide"; @javax.annotation.Nullable - private Long createdTime; + private Boolean mobileHide; - public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; + public static final String JSON_PROPERTY_MOBILE_ORDER = "mobileOrder"; @javax.annotation.Nullable - private TenantId tenantId; + private Integer mobileOrder; - public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; @javax.annotation.Nullable - private CustomerId customerId; + private com.fasterxml.jackson.databind.JsonNode _configuration = null; - public static final String JSON_PROPERTY_ASSIGNED_CUSTOMERS = "assignedCustomers"; + public static final String JSON_PROPERTY_RESOURCES = "resources"; @javax.annotation.Nullable - private Set assignedCustomers = new LinkedHashSet<>(); + private List resources = new ArrayList<>(); public static final String JSON_PROPERTY_VERSION = "version"; @javax.annotation.Nullable @@ -126,120 +130,142 @@ public class DashboardInfo { @javax.annotation.Nullable private List groups = new ArrayList<>(); - public static final String JSON_PROPERTY_OWNER_ID = "ownerId"; - @javax.annotation.Nullable - private EntityId ownerId; - public DashboardInfo() { } @JsonCreator public DashboardInfo( + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId, + @JsonProperty(JSON_PROPERTY_NAME) String name, @JsonProperty(JSON_PROPERTY_IMAGE) String image, @JsonProperty(JSON_PROPERTY_MOBILE_HIDE) Boolean mobileHide, @JsonProperty(JSON_PROPERTY_MOBILE_ORDER) Integer mobileOrder, - @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName ) { this(); + this.createdTime = createdTime; + this.tenantId = tenantId; + this.ownerId = ownerId; + this.name = name; this.image = image; this.mobileHide = mobileHide; this.mobileOrder = mobileOrder; - this.name = name; - this.createdTime = createdTime; - this.tenantId = tenantId; this.ownerName = ownerName; } - public DashboardInfo title(@javax.annotation.Nullable String title) { - this.title = title; + public DashboardInfo id(@javax.annotation.Nullable DashboardId id) { + this.id = id; return this; } /** - * Title of the dashboard. - * @return title + * JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. + * @return id */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) + @JsonProperty(value = JSON_PROPERTY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; + public DashboardId getId() { + return id; } - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) + @JsonProperty(value = JSON_PROPERTY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(@javax.annotation.Nullable String title) { - this.title = title; + public void setId(@javax.annotation.Nullable DashboardId id) { + this.id = id; } /** - * Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. - * @return image + * Timestamp of the dashboard creation, in milliseconds + * @return createdTime */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IMAGE, required = false) + @JsonProperty(value = JSON_PROPERTY_CREATED_TIME, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getImage() { - return image; + public Long getCreatedTime() { + return createdTime; } /** - * Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. - * @return mobileHide + * JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. + * @return tenantId */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_MOBILE_HIDE, required = false) + @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMobileHide() { - return mobileHide; + public TenantId getTenantId() { + return tenantId; } + public DashboardInfo customerId(@javax.annotation.Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications - * @return mobileOrder + * JSON object with Customer Id. + * @return customerId */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_MOBILE_ORDER, required = false) + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getMobileOrder() { - return mobileOrder; + public CustomerId getCustomerId() { + return customerId; + } + + + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@javax.annotation.Nullable CustomerId customerId) { + this.customerId = customerId; } + /** + * JSON object with Customer or Tenant Id + * @return ownerId + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityId getOwnerId() { + return ownerId; + } - public DashboardInfo _configuration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { - this._configuration = _configuration; + + + public DashboardInfo title(@javax.annotation.Nullable String title) { + this.title = title; return this; } /** - * Get _configuration - * @return _configuration + * Title of the dashboard. + * @return title */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) + @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public com.fasterxml.jackson.databind.JsonNode getConfiguration() { - return _configuration; + public String getTitle() { + return title; } - @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) + @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setConfiguration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { - this._configuration = _configuration; + public void setTitle(@javax.annotation.Nullable String title) { + this.title = title; } @@ -257,144 +283,134 @@ public String getName() { - public DashboardInfo resources(@javax.annotation.Nullable List resources) { - this.resources = resources; - return this; - } - - public DashboardInfo addResourcesItem(ResourceExportData resourcesItem) { - if (this.resources == null) { - this.resources = new ArrayList<>(); - } - this.resources.add(resourcesItem); - return this; - } - /** - * Get resources - * @return resources + * Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. + * @return image */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) + @JsonProperty(value = JSON_PROPERTY_IMAGE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getResources() { - return resources; + public String getImage() { + return image; } - @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResources(@javax.annotation.Nullable List resources) { - this.resources = resources; - } - public DashboardInfo id(@javax.annotation.Nullable DashboardId id) { - this.id = id; + public DashboardInfo assignedCustomers(@javax.annotation.Nullable Set assignedCustomers) { + this.assignedCustomers = assignedCustomers; + return this; + } + + public DashboardInfo addAssignedCustomersItem(ShortCustomerInfo assignedCustomersItem) { + if (this.assignedCustomers == null) { + this.assignedCustomers = new LinkedHashSet<>(); + } + this.assignedCustomers.add(assignedCustomersItem); return this; } /** - * JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. - * @return id + * List of assigned customers with their info. + * @return assignedCustomers */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_ASSIGNED_CUSTOMERS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DashboardId getId() { - return id; + public Set getAssignedCustomers() { + return assignedCustomers; } - @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonDeserialize(as = LinkedHashSet.class) + @JsonProperty(value = JSON_PROPERTY_ASSIGNED_CUSTOMERS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(@javax.annotation.Nullable DashboardId id) { - this.id = id; + public void setAssignedCustomers(@javax.annotation.Nullable Set assignedCustomers) { + this.assignedCustomers = assignedCustomers; } /** - * Timestamp of the dashboard creation, in milliseconds - * @return createdTime + * Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. + * @return mobileHide */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CREATED_TIME, required = false) + @JsonProperty(value = JSON_PROPERTY_MOBILE_HIDE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCreatedTime() { - return createdTime; + public Boolean getMobileHide() { + return mobileHide; } /** - * JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. - * @return tenantId + * Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications + * @return mobileOrder */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_MOBILE_ORDER, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TenantId getTenantId() { - return tenantId; + public Integer getMobileOrder() { + return mobileOrder; } - public DashboardInfo customerId(@javax.annotation.Nullable CustomerId customerId) { - this.customerId = customerId; + public DashboardInfo _configuration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { + this._configuration = _configuration; return this; } /** - * JSON object with Customer Id. - * @return customerId + * Get _configuration + * @return _configuration */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CustomerId getCustomerId() { - return customerId; + public com.fasterxml.jackson.databind.JsonNode getConfiguration() { + return _configuration; } - @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerId(@javax.annotation.Nullable CustomerId customerId) { - this.customerId = customerId; + public void setConfiguration(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { + this._configuration = _configuration; } - public DashboardInfo assignedCustomers(@javax.annotation.Nullable Set assignedCustomers) { - this.assignedCustomers = assignedCustomers; + public DashboardInfo resources(@javax.annotation.Nullable List resources) { + this.resources = resources; return this; } - public DashboardInfo addAssignedCustomersItem(ShortCustomerInfo assignedCustomersItem) { - if (this.assignedCustomers == null) { - this.assignedCustomers = new LinkedHashSet<>(); + public DashboardInfo addResourcesItem(ResourceExportData resourcesItem) { + if (this.resources == null) { + this.resources = new ArrayList<>(); } - this.assignedCustomers.add(assignedCustomersItem); + this.resources.add(resourcesItem); return this; } /** - * List of assigned customers with their info. - * @return assignedCustomers + * Get resources + * @return resources */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ASSIGNED_CUSTOMERS, required = false) + @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Set getAssignedCustomers() { - return assignedCustomers; + public List getResources() { + return resources; } - @JsonDeserialize(as = LinkedHashSet.class) - @JsonProperty(value = JSON_PROPERTY_ASSIGNED_CUSTOMERS, required = false) + @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAssignedCustomers(@javax.annotation.Nullable Set assignedCustomers) { - this.assignedCustomers = assignedCustomers; + public void setResources(@javax.annotation.Nullable List resources) { + this.resources = resources; } @@ -468,30 +484,6 @@ public void setGroups(@javax.annotation.Nullable List groups) { } - public DashboardInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - - /** - * JSON object with Customer or Tenant Id - * @return ownerId - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EntityId getOwnerId() { - return ownerId; - } - - - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } - - /** * Return true if this DashboardInfo object is equal to o. */ @@ -504,49 +496,49 @@ public boolean equals(Object o) { return false; } DashboardInfo dashboardInfo = (DashboardInfo) o; - return Objects.equals(this.title, dashboardInfo.title) && + return Objects.equals(this.id, dashboardInfo.id) && + Objects.equals(this.createdTime, dashboardInfo.createdTime) && + Objects.equals(this.tenantId, dashboardInfo.tenantId) && + Objects.equals(this.customerId, dashboardInfo.customerId) && + Objects.equals(this.ownerId, dashboardInfo.ownerId) && + Objects.equals(this.title, dashboardInfo.title) && + Objects.equals(this.name, dashboardInfo.name) && Objects.equals(this.image, dashboardInfo.image) && + Objects.equals(this.assignedCustomers, dashboardInfo.assignedCustomers) && Objects.equals(this.mobileHide, dashboardInfo.mobileHide) && Objects.equals(this.mobileOrder, dashboardInfo.mobileOrder) && Objects.equals(this._configuration, dashboardInfo._configuration) && - Objects.equals(this.name, dashboardInfo.name) && Objects.equals(this.resources, dashboardInfo.resources) && - Objects.equals(this.id, dashboardInfo.id) && - Objects.equals(this.createdTime, dashboardInfo.createdTime) && - Objects.equals(this.tenantId, dashboardInfo.tenantId) && - Objects.equals(this.customerId, dashboardInfo.customerId) && - Objects.equals(this.assignedCustomers, dashboardInfo.assignedCustomers) && Objects.equals(this.version, dashboardInfo.version) && Objects.equals(this.ownerName, dashboardInfo.ownerName) && - Objects.equals(this.groups, dashboardInfo.groups) && - Objects.equals(this.ownerId, dashboardInfo.ownerId); + Objects.equals(this.groups, dashboardInfo.groups); } @Override public int hashCode() { - return Objects.hash(title, image, mobileHide, mobileOrder, _configuration, name, resources, id, createdTime, tenantId, customerId, assignedCustomers, version, ownerName, groups, ownerId); + return Objects.hash(id, createdTime, tenantId, customerId, ownerId, title, name, image, assignedCustomers, mobileHide, mobileOrder, _configuration, resources, version, ownerName, groups); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DashboardInfo {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" image: ").append(toIndentedString(image)).append("\n"); + sb.append(" assignedCustomers: ").append(toIndentedString(assignedCustomers)).append("\n"); sb.append(" mobileHide: ").append(toIndentedString(mobileHide)).append("\n"); sb.append(" mobileOrder: ").append(toIndentedString(mobileOrder)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); - sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" assignedCustomers: ").append(toIndentedString(assignedCustomers)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" ownerName: ").append(toIndentedString(ownerName)).append("\n"); sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); - sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -594,16 +586,58 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); + // add `id` to the URL query string + if (getId() != null) { + joiner.add(getId().toUrlQueryString(prefix + "id" + suffix)); + } + + // add `createdTime` to the URL query string + if (getCreatedTime() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%screatedTime%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedTime())))); + } + + // add `tenantId` to the URL query string + if (getTenantId() != null) { + joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix)); + } + + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(getCustomerId().toUrlQueryString(prefix + "customerId" + suffix)); + } + + // add `ownerId` to the URL query string + if (getOwnerId() != null) { + joiner.add(getOwnerId().toUrlQueryString(prefix + "ownerId" + suffix)); + } + // add `title` to the URL query string if (getTitle() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); } + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + // add `image` to the URL query string if (getImage() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%simage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getImage())))); } + // add `assignedCustomers` to the URL query string + if (getAssignedCustomers() != null) { + int i = 0; + for (ShortCustomerInfo _item : getAssignedCustomers()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format(java.util.Locale.ROOT, "%sassignedCustomers%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + // add `mobileHide` to the URL query string if (getMobileHide() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%smobileHide%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMobileHide())))); @@ -619,11 +653,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sconfiguration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfiguration())))); } - // add `name` to the URL query string - if (getName() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); - } - // add `resources` to the URL query string if (getResources() != null) { for (int i = 0; i < getResources().size(); i++) { @@ -634,38 +663,6 @@ public String toUrlQueryString(String prefix) { } } - // add `id` to the URL query string - if (getId() != null) { - joiner.add(getId().toUrlQueryString(prefix + "id" + suffix)); - } - - // add `createdTime` to the URL query string - if (getCreatedTime() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%screatedTime%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedTime())))); - } - - // add `tenantId` to the URL query string - if (getTenantId() != null) { - joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix)); - } - - // add `customerId` to the URL query string - if (getCustomerId() != null) { - joiner.add(getCustomerId().toUrlQueryString(prefix + "customerId" + suffix)); - } - - // add `assignedCustomers` to the URL query string - if (getAssignedCustomers() != null) { - int i = 0; - for (ShortCustomerInfo _item : getAssignedCustomers()) { - if (_item != null) { - joiner.add(_item.toUrlQueryString(String.format(java.util.Locale.ROOT, "%sassignedCustomers%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - i++; - } - // add `version` to the URL query string if (getVersion() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); @@ -686,11 +683,6 @@ public String toUrlQueryString(String prefix) { } } - // add `ownerId` to the URL query string - if (getOwnerId() != null) { - joiner.add(getOwnerId().toUrlQueryString(prefix + "ownerId" + suffix)); - } - return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/DebugConverterEventFilter.java b/pe/src/main/java/org/thingsboard/client/model/DebugConverterEventFilter.java index 215d08da..93461983 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DebugConverterEventFilter.java +++ b/pe/src/main/java/org/thingsboard/client/model/DebugConverterEventFilter.java @@ -42,13 +42,12 @@ */ @JsonPropertyOrder({ DebugConverterEventFilter.JSON_PROPERTY_SERVER, + DebugConverterEventFilter.JSON_PROPERTY_IS_ERROR, DebugConverterEventFilter.JSON_PROPERTY_ERROR_STR, DebugConverterEventFilter.JSON_PROPERTY_TYPE, DebugConverterEventFilter.JSON_PROPERTY_IN, DebugConverterEventFilter.JSON_PROPERTY_OUT, - DebugConverterEventFilter.JSON_PROPERTY_METADATA, - DebugConverterEventFilter.JSON_PROPERTY_ERROR, - DebugConverterEventFilter.JSON_PROPERTY_IS_ERROR + DebugConverterEventFilter.JSON_PROPERTY_METADATA }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -62,6 +61,45 @@ public class DebugConverterEventFilter extends EventFilter { @javax.annotation.Nullable private String server; + /** + * Boolean value to filter the errors + */ + public enum IsErrorEnum { + FALSE(Boolean.valueOf("false")), + + TRUE(Boolean.valueOf("true")); + + private Boolean value; + + IsErrorEnum(Boolean value) { + this.value = value; + } + + @JsonValue + public Boolean getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IsErrorEnum fromValue(Boolean value) { + for (IsErrorEnum b : IsErrorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private IsErrorEnum isError; + public static final String JSON_PROPERTY_ERROR_STR = "errorStr"; @javax.annotation.Nullable private String errorStr; @@ -82,14 +120,6 @@ public class DebugConverterEventFilter extends EventFilter { @javax.annotation.Nullable private String metadata; - public static final String JSON_PROPERTY_ERROR = "error"; - @javax.annotation.Nullable - private Boolean error; - - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public DebugConverterEventFilter() { } @@ -117,6 +147,30 @@ public void setServer(@javax.annotation.Nullable String server) { } + public DebugConverterEventFilter isError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + return this; + } + + /** + * Boolean value to filter the errors + * @return isError + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IsErrorEnum getIsError() { + return isError; + } + + + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + } + + public DebugConverterEventFilter errorStr(@javax.annotation.Nullable String errorStr) { this.errorStr = errorStr; return this; @@ -237,54 +291,6 @@ public void setMetadata(@javax.annotation.Nullable String metadata) { } - public DebugConverterEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; - return this; - } - - /** - * Get error - * @return error - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; - } - - - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; - } - - - public DebugConverterEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - return this; - } - - /** - * Get isError - * @return isError - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; - } - - - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - } - - @Override public DebugConverterEventFilter eventType(@javax.annotation.Nonnull EventType eventType) { this.setEventType(eventType); @@ -310,19 +316,18 @@ public boolean equals(Object o) { } DebugConverterEventFilter debugConverterEventFilter = (DebugConverterEventFilter) o; return Objects.equals(this.server, debugConverterEventFilter.server) && + Objects.equals(this.isError, debugConverterEventFilter.isError) && Objects.equals(this.errorStr, debugConverterEventFilter.errorStr) && Objects.equals(this.type, debugConverterEventFilter.type) && Objects.equals(this.in, debugConverterEventFilter.in) && Objects.equals(this.out, debugConverterEventFilter.out) && Objects.equals(this.metadata, debugConverterEventFilter.metadata) && - Objects.equals(this.error, debugConverterEventFilter.error) && - Objects.equals(this.isError, debugConverterEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, type, in, out, metadata, error, isError, super.hashCode()); + return Objects.hash(server, isError, errorStr, type, in, out, metadata, super.hashCode()); } @Override @@ -331,13 +336,12 @@ public String toString() { sb.append("class DebugConverterEventFilter {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" server: ").append(toIndentedString(server)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" errorStr: ").append(toIndentedString(errorStr)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" in: ").append(toIndentedString(in)).append("\n"); sb.append(" out: ").append(toIndentedString(out)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -400,6 +404,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sserver%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getServer())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + // add `errorStr` to the URL query string if (getErrorStr() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serrorStr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorStr())))); @@ -425,16 +434,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smetadata%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMetadata())))); } - // add `error` to the URL query string - if (getError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); - } - - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/DebugIntegrationEventFilter.java b/pe/src/main/java/org/thingsboard/client/model/DebugIntegrationEventFilter.java index fd8c55ec..fab0b995 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DebugIntegrationEventFilter.java +++ b/pe/src/main/java/org/thingsboard/client/model/DebugIntegrationEventFilter.java @@ -42,12 +42,11 @@ */ @JsonPropertyOrder({ DebugIntegrationEventFilter.JSON_PROPERTY_SERVER, + DebugIntegrationEventFilter.JSON_PROPERTY_IS_ERROR, DebugIntegrationEventFilter.JSON_PROPERTY_ERROR_STR, DebugIntegrationEventFilter.JSON_PROPERTY_TYPE, DebugIntegrationEventFilter.JSON_PROPERTY_MESSAGE, - DebugIntegrationEventFilter.JSON_PROPERTY_STATUS_INTEGRATION, - DebugIntegrationEventFilter.JSON_PROPERTY_ERROR, - DebugIntegrationEventFilter.JSON_PROPERTY_IS_ERROR + DebugIntegrationEventFilter.JSON_PROPERTY_STATUS_INTEGRATION }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -61,6 +60,45 @@ public class DebugIntegrationEventFilter extends EventFilter { @javax.annotation.Nullable private String server; + /** + * Boolean value to filter the errors + */ + public enum IsErrorEnum { + FALSE(Boolean.valueOf("false")), + + TRUE(Boolean.valueOf("true")); + + private Boolean value; + + IsErrorEnum(Boolean value) { + this.value = value; + } + + @JsonValue + public Boolean getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IsErrorEnum fromValue(Boolean value) { + for (IsErrorEnum b : IsErrorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private IsErrorEnum isError; + public static final String JSON_PROPERTY_ERROR_STR = "errorStr"; @javax.annotation.Nullable private String errorStr; @@ -77,14 +115,6 @@ public class DebugIntegrationEventFilter extends EventFilter { @javax.annotation.Nullable private String statusIntegration; - public static final String JSON_PROPERTY_ERROR = "error"; - @javax.annotation.Nullable - private Boolean error; - - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public DebugIntegrationEventFilter() { } @@ -112,6 +142,30 @@ public void setServer(@javax.annotation.Nullable String server) { } + public DebugIntegrationEventFilter isError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + return this; + } + + /** + * Boolean value to filter the errors + * @return isError + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IsErrorEnum getIsError() { + return isError; + } + + + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + } + + public DebugIntegrationEventFilter errorStr(@javax.annotation.Nullable String errorStr) { this.errorStr = errorStr; return this; @@ -208,54 +262,6 @@ public void setStatusIntegration(@javax.annotation.Nullable String statusIntegra } - public DebugIntegrationEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; - return this; - } - - /** - * Get error - * @return error - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; - } - - - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; - } - - - public DebugIntegrationEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - return this; - } - - /** - * Get isError - * @return isError - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; - } - - - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - } - - @Override public DebugIntegrationEventFilter eventType(@javax.annotation.Nonnull EventType eventType) { this.setEventType(eventType); @@ -281,18 +287,17 @@ public boolean equals(Object o) { } DebugIntegrationEventFilter debugIntegrationEventFilter = (DebugIntegrationEventFilter) o; return Objects.equals(this.server, debugIntegrationEventFilter.server) && + Objects.equals(this.isError, debugIntegrationEventFilter.isError) && Objects.equals(this.errorStr, debugIntegrationEventFilter.errorStr) && Objects.equals(this.type, debugIntegrationEventFilter.type) && Objects.equals(this.message, debugIntegrationEventFilter.message) && Objects.equals(this.statusIntegration, debugIntegrationEventFilter.statusIntegration) && - Objects.equals(this.error, debugIntegrationEventFilter.error) && - Objects.equals(this.isError, debugIntegrationEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, type, message, statusIntegration, error, isError, super.hashCode()); + return Objects.hash(server, isError, errorStr, type, message, statusIntegration, super.hashCode()); } @Override @@ -301,12 +306,11 @@ public String toString() { sb.append("class DebugIntegrationEventFilter {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" server: ").append(toIndentedString(server)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" errorStr: ").append(toIndentedString(errorStr)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" statusIntegration: ").append(toIndentedString(statusIntegration)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -369,6 +373,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sserver%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getServer())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + // add `errorStr` to the URL query string if (getErrorStr() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serrorStr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorStr())))); @@ -389,16 +398,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstatusIntegration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatusIntegration())))); } - // add `error` to the URL query string - if (getError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); - } - - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/Device.java b/pe/src/main/java/org/thingsboard/client/model/Device.java index f0caea76..4d5c2625 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Device.java +++ b/pe/src/main/java/org/thingsboard/client/model/Device.java @@ -122,12 +122,14 @@ public Device() { public Device( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; + this.ownerId = ownerId; } public Device id(@javax.annotation.Nullable DeviceId id) { @@ -388,11 +390,6 @@ public void setDeviceData(@javax.annotation.Nullable DeviceData deviceData) { } - public Device ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -405,11 +402,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public Device additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/DeviceInfo.java b/pe/src/main/java/org/thingsboard/client/model/DeviceInfo.java index 396c94f8..854fcbbc 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DeviceInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/DeviceInfo.java @@ -142,7 +142,8 @@ public DeviceInfo( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, - @JsonProperty(JSON_PROPERTY_ACTIVE) Boolean active + @JsonProperty(JSON_PROPERTY_ACTIVE) Boolean active, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; @@ -150,6 +151,7 @@ public DeviceInfo( this.customerId = customerId; this.ownerName = ownerName; this.active = active; + this.ownerId = ownerId; } public DeviceInfo id(@javax.annotation.Nullable DeviceId id) { @@ -470,11 +472,6 @@ public void setDeviceData(@javax.annotation.Nullable DeviceData deviceData) { } - public DeviceInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -487,11 +484,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public DeviceInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/Domain.java b/pe/src/main/java/org/thingsboard/client/model/Domain.java index 39f85c01..93d706e3 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Domain.java +++ b/pe/src/main/java/org/thingsboard/client/model/Domain.java @@ -87,10 +87,12 @@ public Domain() { @JsonCreator public Domain( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; + this.ownerId = ownerId; } public Domain id(@javax.annotation.Nullable DomainId id) { @@ -251,11 +253,6 @@ public void setPropagateToEdge(@javax.annotation.Nullable Boolean propagateToEdg } - public Domain ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -268,11 +265,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } /** diff --git a/pe/src/main/java/org/thingsboard/client/model/DomainInfo.java b/pe/src/main/java/org/thingsboard/client/model/DomainInfo.java index 24bd87d1..dd138d2d 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DomainInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/DomainInfo.java @@ -95,10 +95,12 @@ public DomainInfo() { @JsonCreator public DomainInfo( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; + this.ownerId = ownerId; } public DomainInfo id(@javax.annotation.Nullable DomainId id) { @@ -291,11 +293,6 @@ public void setOauth2ClientInfos(@javax.annotation.Nullable List groups) { } - public EdgeInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * Get ownerId * @return ownerId @@ -485,11 +482,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public EdgeInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/EntityView.java b/pe/src/main/java/org/thingsboard/client/model/EntityView.java index bbed15c0..7f9479a2 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EntityView.java +++ b/pe/src/main/java/org/thingsboard/client/model/EntityView.java @@ -115,12 +115,14 @@ public EntityView() { public EntityView( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.tenantId = tenantId; this.customerId = customerId; this.createdTime = createdTime; + this.ownerId = ownerId; } public EntityView entityId(@javax.annotation.Nonnull EntityId entityId) { @@ -357,11 +359,6 @@ public Long getCreatedTime() { - public EntityView ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -374,11 +371,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public EntityView additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/EntityViewInfo.java b/pe/src/main/java/org/thingsboard/client/model/EntityViewInfo.java index 75bd9bcd..74c8e402 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EntityViewInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/EntityViewInfo.java @@ -129,13 +129,15 @@ public EntityViewInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName + @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; this.ownerName = ownerName; + this.ownerId = ownerId; } public EntityViewInfo id(@javax.annotation.Nullable EntityViewId id) { @@ -418,11 +420,6 @@ public void setGroups(@javax.annotation.Nullable List groups) { } - public EntityViewInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -435,11 +432,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public EntityViewInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/EventInfo.java b/pe/src/main/java/org/thingsboard/client/model/EventInfo.java index 1cbe3f86..e367fdbf 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EventInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/EventInfo.java @@ -82,11 +82,13 @@ public EventInfo() { @JsonCreator public EventInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId + @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, + @JsonProperty(JSON_PROPERTY_ENTITY_ID) EntityId entityId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; + this.entityId = entityId; } public EventInfo id(@javax.annotation.Nullable EventId id) { @@ -189,11 +191,6 @@ public void setUid(@javax.annotation.Nullable String uid) { } - public EventInfo entityId(@javax.annotation.Nullable EntityId entityId) { - this.entityId = entityId; - return this; - } - /** * JSON object with Entity Id for which event is created. * @return entityId @@ -206,11 +203,6 @@ public EntityId getEntityId() { } - @JsonProperty(value = JSON_PROPERTY_ENTITY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEntityId(@javax.annotation.Nullable EntityId entityId) { - this.entityId = entityId; - } public EventInfo body(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode body) { diff --git a/pe/src/main/java/org/thingsboard/client/model/OAuth2Client.java b/pe/src/main/java/org/thingsboard/client/model/OAuth2Client.java index 75bf88b9..f67c506a 100644 --- a/pe/src/main/java/org/thingsboard/client/model/OAuth2Client.java +++ b/pe/src/main/java/org/thingsboard/client/model/OAuth2Client.java @@ -157,11 +157,13 @@ public OAuth2Client() { @JsonCreator public OAuth2Client( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_NAME) String name + @JsonProperty(JSON_PROPERTY_NAME) String name, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.name = name; + this.ownerId = ownerId; } public OAuth2Client id(@javax.annotation.Nullable OAuth2ClientId id) { @@ -640,11 +642,6 @@ public String getName() { - public OAuth2Client ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * Get ownerId * @return ownerId @@ -657,11 +654,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } /** diff --git a/pe/src/main/java/org/thingsboard/client/model/OtaPackage.java b/pe/src/main/java/org/thingsboard/client/model/OtaPackage.java index c5a77cdf..edd82ee0 100644 --- a/pe/src/main/java/org/thingsboard/client/model/OtaPackage.java +++ b/pe/src/main/java/org/thingsboard/client/model/OtaPackage.java @@ -29,7 +29,6 @@ import java.util.Arrays; import org.thingsboard.client.model.ChecksumAlgorithm; import org.thingsboard.client.model.DeviceProfileId; -import org.thingsboard.client.model.OtaPackageData; import org.thingsboard.client.model.OtaPackageId; import org.thingsboard.client.model.OtaPackageType; import org.thingsboard.client.model.TenantId; @@ -124,7 +123,7 @@ public class OtaPackage { public static final String JSON_PROPERTY_DATA = "data"; @javax.annotation.Nullable - private OtaPackageData data; + private byte[] data; public static final String JSON_PROPERTY_NAME = "name"; @javax.annotation.Nullable @@ -433,7 +432,7 @@ public Long getDataSize() { - public OtaPackage data(@javax.annotation.Nullable OtaPackageData data) { + public OtaPackage data(@javax.annotation.Nullable byte[] data) { this.data = data; return this; } @@ -445,14 +444,14 @@ public OtaPackage data(@javax.annotation.Nullable OtaPackageData data) { @javax.annotation.Nullable @JsonProperty(value = JSON_PROPERTY_DATA, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OtaPackageData getData() { + public byte[] getData() { return data; } @JsonProperty(value = JSON_PROPERTY_DATA, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setData(@javax.annotation.Nullable OtaPackageData data) { + public void setData(@javax.annotation.Nullable byte[] data) { this.data = data; } @@ -522,14 +521,14 @@ public boolean equals(Object o) { Objects.equals(this.checksumAlgorithm, otaPackage.checksumAlgorithm) && Objects.equals(this.checksum, otaPackage.checksum) && Objects.equals(this.dataSize, otaPackage.dataSize) && - Objects.equals(this.data, otaPackage.data) && + Arrays.equals(this.data, otaPackage.data) && Objects.equals(this.name, otaPackage.name) && Objects.equals(this.additionalInfo, otaPackage.additionalInfo); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, deviceProfileId, type, title, version, tag, url, hasData, fileName, contentType, checksumAlgorithm, checksum, dataSize, data, name, additionalInfo); + return Objects.hash(id, createdTime, tenantId, deviceProfileId, type, title, version, tag, url, hasData, fileName, contentType, checksumAlgorithm, checksum, dataSize, Arrays.hashCode(data), name, additionalInfo); } @Override @@ -678,7 +677,7 @@ public String toUrlQueryString(String prefix) { // add `data` to the URL query string if (getData() != null) { - joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + joiner.add(String.format(java.util.Locale.ROOT, "%sdata%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getData())))); } // add `name` to the URL query string diff --git a/pe/src/main/java/org/thingsboard/client/model/OtaPackageData.java b/pe/src/main/java/org/thingsboard/client/model/OtaPackageData.java deleted file mode 100644 index 8cb07905..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/OtaPackageData.java +++ /dev/null @@ -1,405 +0,0 @@ -/** - * Copyright © 2026-2026 ThingsBoard, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.thingsboard.client.model; - -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.StringJoiner; -import java.util.Objects; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.ApiClient; -/** - * OtaPackageData - */ -@JsonPropertyOrder({ - OtaPackageData.JSON_PROPERTY_CHAR, - OtaPackageData.JSON_PROPERTY_DIRECT, - OtaPackageData.JSON_PROPERTY_DOUBLE, - OtaPackageData.JSON_PROPERTY_FLOAT, - OtaPackageData.JSON_PROPERTY_INT, - OtaPackageData.JSON_PROPERTY_LONG, - OtaPackageData.JSON_PROPERTY_READ_ONLY, - OtaPackageData.JSON_PROPERTY_SHORT -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class OtaPackageData { - public static final String JSON_PROPERTY_CHAR = "char"; - @javax.annotation.Nullable - private String _char; - - public static final String JSON_PROPERTY_DIRECT = "direct"; - @javax.annotation.Nullable - private Boolean direct; - - public static final String JSON_PROPERTY_DOUBLE = "double"; - @javax.annotation.Nullable - private Double _double; - - public static final String JSON_PROPERTY_FLOAT = "float"; - @javax.annotation.Nullable - private Float _float; - - public static final String JSON_PROPERTY_INT = "int"; - @javax.annotation.Nullable - private Integer _int; - - public static final String JSON_PROPERTY_LONG = "long"; - @javax.annotation.Nullable - private Long _long; - - public static final String JSON_PROPERTY_READ_ONLY = "readOnly"; - @javax.annotation.Nullable - private Boolean readOnly; - - public static final String JSON_PROPERTY_SHORT = "short"; - @javax.annotation.Nullable - private Integer _short; - - public OtaPackageData() { - } - - public OtaPackageData _char(@javax.annotation.Nullable String _char) { - this._char = _char; - return this; - } - - /** - * Get _char - * @return _char - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CHAR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getChar() { - return _char; - } - - - @JsonProperty(value = JSON_PROPERTY_CHAR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setChar(@javax.annotation.Nullable String _char) { - this._char = _char; - } - - - public OtaPackageData direct(@javax.annotation.Nullable Boolean direct) { - this.direct = direct; - return this; - } - - /** - * Get direct - * @return direct - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DIRECT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDirect() { - return direct; - } - - - @JsonProperty(value = JSON_PROPERTY_DIRECT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDirect(@javax.annotation.Nullable Boolean direct) { - this.direct = direct; - } - - - public OtaPackageData _double(@javax.annotation.Nullable Double _double) { - this._double = _double; - return this; - } - - /** - * Get _double - * @return _double - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DOUBLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDouble() { - return _double; - } - - - @JsonProperty(value = JSON_PROPERTY_DOUBLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDouble(@javax.annotation.Nullable Double _double) { - this._double = _double; - } - - - public OtaPackageData _float(@javax.annotation.Nullable Float _float) { - this._float = _float; - return this; - } - - /** - * Get _float - * @return _float - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_FLOAT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Float getFloat() { - return _float; - } - - - @JsonProperty(value = JSON_PROPERTY_FLOAT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFloat(@javax.annotation.Nullable Float _float) { - this._float = _float; - } - - - public OtaPackageData _int(@javax.annotation.Nullable Integer _int) { - this._int = _int; - return this; - } - - /** - * Get _int - * @return _int - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_INT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getInt() { - return _int; - } - - - @JsonProperty(value = JSON_PROPERTY_INT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInt(@javax.annotation.Nullable Integer _int) { - this._int = _int; - } - - - public OtaPackageData _long(@javax.annotation.Nullable Long _long) { - this._long = _long; - return this; - } - - /** - * Get _long - * @return _long - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LONG, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLong() { - return _long; - } - - - @JsonProperty(value = JSON_PROPERTY_LONG, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLong(@javax.annotation.Nullable Long _long) { - this._long = _long; - } - - - public OtaPackageData readOnly(@javax.annotation.Nullable Boolean readOnly) { - this.readOnly = readOnly; - return this; - } - - /** - * Get readOnly - * @return readOnly - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_READ_ONLY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getReadOnly() { - return readOnly; - } - - - @JsonProperty(value = JSON_PROPERTY_READ_ONLY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReadOnly(@javax.annotation.Nullable Boolean readOnly) { - this.readOnly = readOnly; - } - - - public OtaPackageData _short(@javax.annotation.Nullable Integer _short) { - this._short = _short; - return this; - } - - /** - * Get _short - * @return _short - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SHORT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getShort() { - return _short; - } - - - @JsonProperty(value = JSON_PROPERTY_SHORT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShort(@javax.annotation.Nullable Integer _short) { - this._short = _short; - } - - - /** - * Return true if this OtaPackage_data object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OtaPackageData otaPackageData = (OtaPackageData) o; - return Objects.equals(this._char, otaPackageData._char) && - Objects.equals(this.direct, otaPackageData.direct) && - Objects.equals(this._double, otaPackageData._double) && - Objects.equals(this._float, otaPackageData._float) && - Objects.equals(this._int, otaPackageData._int) && - Objects.equals(this._long, otaPackageData._long) && - Objects.equals(this.readOnly, otaPackageData.readOnly) && - Objects.equals(this._short, otaPackageData._short); - } - - @Override - public int hashCode() { - return Objects.hash(_char, direct, _double, _float, _int, _long, readOnly, _short); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OtaPackageData {\n"); - sb.append(" _char: ").append(toIndentedString(_char)).append("\n"); - sb.append(" direct: ").append(toIndentedString(direct)).append("\n"); - sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); - sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); - sb.append(" _int: ").append(toIndentedString(_int)).append("\n"); - sb.append(" _long: ").append(toIndentedString(_long)).append("\n"); - sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); - sb.append(" _short: ").append(toIndentedString(_short)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Convert the instance into URL query string. - * - * @return URL query string - */ - public String toUrlQueryString() { - return toUrlQueryString(null); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - String suffix = ""; - String containerSuffix = ""; - String containerPrefix = ""; - if (prefix == null) { - // style=form, explode=true, e.g. /pet?name=cat&type=manx - prefix = ""; - } else { - // deepObject style e.g. /pet?id[name]=cat&id[type]=manx - prefix = prefix + "["; - suffix = "]"; - containerSuffix = "]"; - containerPrefix = "["; - } - - StringJoiner joiner = new StringJoiner("&"); - - // add `char` to the URL query string - if (getChar() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%schar%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getChar())))); - } - - // add `direct` to the URL query string - if (getDirect() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdirect%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDirect())))); - } - - // add `double` to the URL query string - if (getDouble() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdouble%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDouble())))); - } - - // add `float` to the URL query string - if (getFloat() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sfloat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFloat())))); - } - - // add `int` to the URL query string - if (getInt() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sint%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInt())))); - } - - // add `long` to the URL query string - if (getLong() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%slong%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLong())))); - } - - // add `readOnly` to the URL query string - if (getReadOnly() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sreadOnly%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReadOnly())))); - } - - // add `short` to the URL query string - if (getShort() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sshort%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getShort())))); - } - - return joiner.toString(); - } -} - diff --git a/pe/src/main/java/org/thingsboard/client/model/Report.java b/pe/src/main/java/org/thingsboard/client/model/Report.java index 1a647e51..47d09acf 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Report.java +++ b/pe/src/main/java/org/thingsboard/client/model/Report.java @@ -95,10 +95,12 @@ public Report() { @JsonCreator public Report( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; + this.ownerId = ownerId; } public Report id(@javax.annotation.Nullable ReportId id) { @@ -283,11 +285,6 @@ public void setUserId(@javax.annotation.Nonnull UserId userId) { } - public Report ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -300,11 +297,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } /** diff --git a/pe/src/main/java/org/thingsboard/client/model/ReportInfo.java b/pe/src/main/java/org/thingsboard/client/model/ReportInfo.java index 4cde66d9..14ddbd9c 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ReportInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/ReportInfo.java @@ -111,10 +111,12 @@ public ReportInfo() { @JsonCreator public ReportInfo( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; + this.ownerId = ownerId; } public ReportInfo id(@javax.annotation.Nullable ReportId id) { @@ -371,11 +373,6 @@ public void setUserName(@javax.annotation.Nullable String userName) { } - public ReportInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -388,11 +385,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } /** diff --git a/pe/src/main/java/org/thingsboard/client/model/ReportTemplate.java b/pe/src/main/java/org/thingsboard/client/model/ReportTemplate.java index a654ceae..bdb4dbda 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ReportTemplate.java +++ b/pe/src/main/java/org/thingsboard/client/model/ReportTemplate.java @@ -107,12 +107,14 @@ public ReportTemplate() { public ReportTemplate( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; + this.ownerId = ownerId; } public ReportTemplate id(@javax.annotation.Nullable ReportTemplateId id) { @@ -325,11 +327,6 @@ public void setConfiguration(@javax.annotation.Nonnull ReportTemplateConfig _con } - public ReportTemplate ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -342,11 +339,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } /** diff --git a/pe/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java b/pe/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java index e5507ea6..a2501762 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java @@ -107,13 +107,15 @@ public ReportTemplateInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName + @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; this.ownerName = ownerName; + this.ownerId = ownerId; } public ReportTemplateInfo id(@javax.annotation.Nullable ReportTemplateId id) { @@ -316,11 +318,6 @@ public String getOwnerName() { - public ReportTemplateInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -333,11 +330,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } /** diff --git a/pe/src/main/java/org/thingsboard/client/model/Role.java b/pe/src/main/java/org/thingsboard/client/model/Role.java index fa769846..83d7b32e 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Role.java +++ b/pe/src/main/java/org/thingsboard/client/model/Role.java @@ -100,12 +100,14 @@ public Role() { public Role( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.tenantId = tenantId; this.customerId = customerId; this.createdTime = createdTime; + this.ownerId = ownerId; } /** @@ -270,11 +272,6 @@ public Long getCreatedTime() { - public Role ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -287,11 +284,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public Role additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java b/pe/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java index fb6e8069..cff4291a 100644 --- a/pe/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java +++ b/pe/src/main/java/org/thingsboard/client/model/RuleChainDebugEventFilter.java @@ -42,10 +42,9 @@ */ @JsonPropertyOrder({ RuleChainDebugEventFilter.JSON_PROPERTY_SERVER, + RuleChainDebugEventFilter.JSON_PROPERTY_IS_ERROR, RuleChainDebugEventFilter.JSON_PROPERTY_ERROR_STR, - RuleChainDebugEventFilter.JSON_PROPERTY_MESSAGE, - RuleChainDebugEventFilter.JSON_PROPERTY_ERROR, - RuleChainDebugEventFilter.JSON_PROPERTY_IS_ERROR + RuleChainDebugEventFilter.JSON_PROPERTY_MESSAGE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -59,6 +58,45 @@ public class RuleChainDebugEventFilter extends EventFilter { @javax.annotation.Nullable private String server; + /** + * Boolean value to filter the errors + */ + public enum IsErrorEnum { + FALSE(Boolean.valueOf("false")), + + TRUE(Boolean.valueOf("true")); + + private Boolean value; + + IsErrorEnum(Boolean value) { + this.value = value; + } + + @JsonValue + public Boolean getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IsErrorEnum fromValue(Boolean value) { + for (IsErrorEnum b : IsErrorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private IsErrorEnum isError; + public static final String JSON_PROPERTY_ERROR_STR = "errorStr"; @javax.annotation.Nullable private String errorStr; @@ -67,14 +105,6 @@ public class RuleChainDebugEventFilter extends EventFilter { @javax.annotation.Nullable private String message; - public static final String JSON_PROPERTY_ERROR = "error"; - @javax.annotation.Nullable - private Boolean error; - - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public RuleChainDebugEventFilter() { } @@ -102,6 +132,30 @@ public void setServer(@javax.annotation.Nullable String server) { } + public RuleChainDebugEventFilter isError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + return this; + } + + /** + * Boolean value to filter the errors + * @return isError + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IsErrorEnum getIsError() { + return isError; + } + + + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + } + + public RuleChainDebugEventFilter errorStr(@javax.annotation.Nullable String errorStr) { this.errorStr = errorStr; return this; @@ -150,54 +204,6 @@ public void setMessage(@javax.annotation.Nullable String message) { } - public RuleChainDebugEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; - return this; - } - - /** - * Get error - * @return error - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; - } - - - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; - } - - - public RuleChainDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - return this; - } - - /** - * Get isError - * @return isError - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; - } - - - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - } - - @Override public RuleChainDebugEventFilter eventType(@javax.annotation.Nonnull EventType eventType) { this.setEventType(eventType); @@ -223,16 +229,15 @@ public boolean equals(Object o) { } RuleChainDebugEventFilter ruleChainDebugEventFilter = (RuleChainDebugEventFilter) o; return Objects.equals(this.server, ruleChainDebugEventFilter.server) && + Objects.equals(this.isError, ruleChainDebugEventFilter.isError) && Objects.equals(this.errorStr, ruleChainDebugEventFilter.errorStr) && Objects.equals(this.message, ruleChainDebugEventFilter.message) && - Objects.equals(this.error, ruleChainDebugEventFilter.error) && - Objects.equals(this.isError, ruleChainDebugEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, message, error, isError, super.hashCode()); + return Objects.hash(server, isError, errorStr, message, super.hashCode()); } @Override @@ -241,10 +246,9 @@ public String toString() { sb.append("class RuleChainDebugEventFilter {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" server: ").append(toIndentedString(server)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" errorStr: ").append(toIndentedString(errorStr)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -307,6 +311,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sserver%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getServer())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + // add `errorStr` to the URL query string if (getErrorStr() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serrorStr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorStr())))); @@ -317,16 +326,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); } - // add `error` to the URL query string - if (getError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); - } - - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java b/pe/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java index 3ce2fe1f..f7418e50 100644 --- a/pe/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java +++ b/pe/src/main/java/org/thingsboard/client/model/RuleNodeDebugEventFilter.java @@ -42,6 +42,7 @@ */ @JsonPropertyOrder({ RuleNodeDebugEventFilter.JSON_PROPERTY_SERVER, + RuleNodeDebugEventFilter.JSON_PROPERTY_IS_ERROR, RuleNodeDebugEventFilter.JSON_PROPERTY_ERROR_STR, RuleNodeDebugEventFilter.JSON_PROPERTY_MSG_DIRECTION_TYPE, RuleNodeDebugEventFilter.JSON_PROPERTY_ENTITY_ID, @@ -50,9 +51,7 @@ RuleNodeDebugEventFilter.JSON_PROPERTY_MSG_TYPE, RuleNodeDebugEventFilter.JSON_PROPERTY_RELATION_TYPE, RuleNodeDebugEventFilter.JSON_PROPERTY_DATA_SEARCH, - RuleNodeDebugEventFilter.JSON_PROPERTY_METADATA_SEARCH, - RuleNodeDebugEventFilter.JSON_PROPERTY_ERROR, - RuleNodeDebugEventFilter.JSON_PROPERTY_IS_ERROR + RuleNodeDebugEventFilter.JSON_PROPERTY_METADATA_SEARCH }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -66,6 +65,45 @@ public class RuleNodeDebugEventFilter extends EventFilter { @javax.annotation.Nullable private String server; + /** + * Boolean value to filter the errors + */ + public enum IsErrorEnum { + FALSE(Boolean.valueOf("false")), + + TRUE(Boolean.valueOf("true")); + + private Boolean value; + + IsErrorEnum(Boolean value) { + this.value = value; + } + + @JsonValue + public Boolean getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IsErrorEnum fromValue(Boolean value) { + for (IsErrorEnum b : IsErrorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_IS_ERROR = "isError"; + @javax.annotation.Nullable + private IsErrorEnum isError; + public static final String JSON_PROPERTY_ERROR_STR = "errorStr"; @javax.annotation.Nullable private String errorStr; @@ -170,14 +208,6 @@ public static EntityTypeEnum fromValue(String value) { @javax.annotation.Nullable private String metadataSearch; - public static final String JSON_PROPERTY_ERROR = "error"; - @javax.annotation.Nullable - private Boolean error; - - public static final String JSON_PROPERTY_IS_ERROR = "isError"; - @javax.annotation.Nullable - private Boolean isError; - public RuleNodeDebugEventFilter() { } @@ -205,6 +235,30 @@ public void setServer(@javax.annotation.Nullable String server) { } + public RuleNodeDebugEventFilter isError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + return this; + } + + /** + * Boolean value to filter the errors + * @return isError + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IsErrorEnum getIsError() { + return isError; + } + + + @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsError(@javax.annotation.Nullable IsErrorEnum isError) { + this.isError = isError; + } + + public RuleNodeDebugEventFilter errorStr(@javax.annotation.Nullable String errorStr) { this.errorStr = errorStr; return this; @@ -421,54 +475,6 @@ public void setMetadataSearch(@javax.annotation.Nullable String metadataSearch) } - public RuleNodeDebugEventFilter error(@javax.annotation.Nullable Boolean error) { - this.error = error; - return this; - } - - /** - * Get error - * @return error - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getError() { - return error; - } - - - @JsonProperty(value = JSON_PROPERTY_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@javax.annotation.Nullable Boolean error) { - this.error = error; - } - - - public RuleNodeDebugEventFilter isError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - return this; - } - - /** - * Get isError - * @return isError - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsError() { - return isError; - } - - - @JsonProperty(value = JSON_PROPERTY_IS_ERROR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsError(@javax.annotation.Nullable Boolean isError) { - this.isError = isError; - } - - @Override public RuleNodeDebugEventFilter eventType(@javax.annotation.Nonnull EventType eventType) { this.setEventType(eventType); @@ -494,6 +500,7 @@ public boolean equals(Object o) { } RuleNodeDebugEventFilter ruleNodeDebugEventFilter = (RuleNodeDebugEventFilter) o; return Objects.equals(this.server, ruleNodeDebugEventFilter.server) && + Objects.equals(this.isError, ruleNodeDebugEventFilter.isError) && Objects.equals(this.errorStr, ruleNodeDebugEventFilter.errorStr) && Objects.equals(this.msgDirectionType, ruleNodeDebugEventFilter.msgDirectionType) && Objects.equals(this.entityId, ruleNodeDebugEventFilter.entityId) && @@ -503,14 +510,12 @@ public boolean equals(Object o) { Objects.equals(this.relationType, ruleNodeDebugEventFilter.relationType) && Objects.equals(this.dataSearch, ruleNodeDebugEventFilter.dataSearch) && Objects.equals(this.metadataSearch, ruleNodeDebugEventFilter.metadataSearch) && - Objects.equals(this.error, ruleNodeDebugEventFilter.error) && - Objects.equals(this.isError, ruleNodeDebugEventFilter.isError) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(server, errorStr, msgDirectionType, entityId, entityType, msgId, msgType, relationType, dataSearch, metadataSearch, error, isError, super.hashCode()); + return Objects.hash(server, isError, errorStr, msgDirectionType, entityId, entityType, msgId, msgType, relationType, dataSearch, metadataSearch, super.hashCode()); } @Override @@ -519,6 +524,7 @@ public String toString() { sb.append("class RuleNodeDebugEventFilter {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" server: ").append(toIndentedString(server)).append("\n"); + sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" errorStr: ").append(toIndentedString(errorStr)).append("\n"); sb.append(" msgDirectionType: ").append(toIndentedString(msgDirectionType)).append("\n"); sb.append(" entityId: ").append(toIndentedString(entityId)).append("\n"); @@ -528,8 +534,6 @@ public String toString() { sb.append(" relationType: ").append(toIndentedString(relationType)).append("\n"); sb.append(" dataSearch: ").append(toIndentedString(dataSearch)).append("\n"); sb.append(" metadataSearch: ").append(toIndentedString(metadataSearch)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append("}"); return sb.toString(); } @@ -592,6 +596,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sserver%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getServer())))); } + // add `isError` to the URL query string + if (getIsError() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); + } + // add `errorStr` to the URL query string if (getErrorStr() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%serrorStr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorStr())))); @@ -637,16 +646,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smetadataSearch%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMetadataSearch())))); } - // add `error` to the URL query string - if (getError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); - } - - // add `isError` to the URL query string - if (getIsError() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sisError%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsError())))); - } - return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java b/pe/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java index 666f0815..c8a0ede2 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java @@ -126,17 +126,21 @@ public ScheduledReportInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, @JsonProperty(JSON_PROPERTY_TEMPLATE_INFO) EntityInfo templateInfo, @JsonProperty(JSON_PROPERTY_CUSTOMER_TITLE) String customerTitle, - @JsonProperty(JSON_PROPERTY_USER_NAME) String userName + @JsonProperty(JSON_PROPERTY_USER_NAME) String userName, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; + this.originatorId = originatorId; this.templateInfo = templateInfo; this.customerTitle = customerTitle; this.userName = userName; + this.ownerId = ownerId; } public ScheduledReportInfo id(@javax.annotation.Nullable SchedulerEventId id) { @@ -205,11 +209,6 @@ public CustomerId getCustomerId() { - public ScheduledReportInfo originatorId(@javax.annotation.Nullable EntityId originatorId) { - this.originatorId = originatorId; - return this; - } - /** * JSON object with Originator Id * @return originatorId @@ -222,11 +221,6 @@ public EntityId getOriginatorId() { } - @JsonProperty(value = JSON_PROPERTY_ORIGINATOR_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginatorId(@javax.annotation.Nullable EntityId originatorId) { - this.originatorId = originatorId; - } public ScheduledReportInfo name(@javax.annotation.Nullable String name) { @@ -391,11 +385,6 @@ public String getUserName() { - public ScheduledReportInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -408,11 +397,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public ScheduledReportInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/SchedulerEvent.java b/pe/src/main/java/org/thingsboard/client/model/SchedulerEvent.java index 320fd250..4ba83359 100644 --- a/pe/src/main/java/org/thingsboard/client/model/SchedulerEvent.java +++ b/pe/src/main/java/org/thingsboard/client/model/SchedulerEvent.java @@ -114,12 +114,16 @@ public SchedulerEvent() { public SchedulerEvent( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; + this.originatorId = originatorId; + this.ownerId = ownerId; } public SchedulerEvent id(@javax.annotation.Nullable SchedulerEventId id) { @@ -188,11 +192,6 @@ public CustomerId getCustomerId() { - public SchedulerEvent originatorId(@javax.annotation.Nullable EntityId originatorId) { - this.originatorId = originatorId; - return this; - } - /** * JSON object with Originator Id * @return originatorId @@ -205,11 +204,6 @@ public EntityId getOriginatorId() { } - @JsonProperty(value = JSON_PROPERTY_ORIGINATOR_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginatorId(@javax.annotation.Nullable EntityId originatorId) { - this.originatorId = originatorId; - } public SchedulerEvent name(@javax.annotation.Nullable String name) { @@ -356,11 +350,6 @@ public void setConfiguration(@javax.annotation.Nullable com.fasterxml.jackson.da } - public SchedulerEvent ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -373,11 +362,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public SchedulerEvent additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java b/pe/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java index cfcd9048..376887d7 100644 --- a/pe/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java @@ -109,12 +109,16 @@ public SchedulerEventInfo() { public SchedulerEventInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; + this.originatorId = originatorId; + this.ownerId = ownerId; } public SchedulerEventInfo id(@javax.annotation.Nullable SchedulerEventId id) { @@ -183,11 +187,6 @@ public CustomerId getCustomerId() { - public SchedulerEventInfo originatorId(@javax.annotation.Nullable EntityId originatorId) { - this.originatorId = originatorId; - return this; - } - /** * JSON object with Originator Id * @return originatorId @@ -200,11 +199,6 @@ public EntityId getOriginatorId() { } - @JsonProperty(value = JSON_PROPERTY_ORIGINATOR_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginatorId(@javax.annotation.Nullable EntityId originatorId) { - this.originatorId = originatorId; - } public SchedulerEventInfo name(@javax.annotation.Nullable String name) { @@ -327,11 +321,6 @@ public void setVersion(@javax.annotation.Nullable Long version) { } - public SchedulerEventInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -344,11 +333,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public SchedulerEventInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java b/pe/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java index 01c75b25..82d5bc53 100644 --- a/pe/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java @@ -127,13 +127,17 @@ public SchedulerEventWithCustomerInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_IS_PUBLIC) Boolean customerIsPublic + @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, + @JsonProperty(JSON_PROPERTY_CUSTOMER_IS_PUBLIC) Boolean customerIsPublic, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; + this.originatorId = originatorId; this.customerIsPublic = customerIsPublic; + this.ownerId = ownerId; } public SchedulerEventWithCustomerInfo id(@javax.annotation.Nullable SchedulerEventId id) { @@ -202,11 +206,6 @@ public CustomerId getCustomerId() { - public SchedulerEventWithCustomerInfo originatorId(@javax.annotation.Nullable EntityId originatorId) { - this.originatorId = originatorId; - return this; - } - /** * JSON object with Originator Id * @return originatorId @@ -219,11 +218,6 @@ public EntityId getOriginatorId() { } - @JsonProperty(value = JSON_PROPERTY_ORIGINATOR_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginatorId(@javax.annotation.Nullable EntityId originatorId) { - this.originatorId = originatorId; - } public SchedulerEventWithCustomerInfo name(@javax.annotation.Nullable String name) { @@ -416,11 +410,6 @@ public void setTimestamps(@javax.annotation.Nullable List timestamps) { } - public SchedulerEventWithCustomerInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -433,11 +422,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public SchedulerEventWithCustomerInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/ShortEntityView.java b/pe/src/main/java/org/thingsboard/client/model/ShortEntityView.java index 7c1087a8..71ce6bed 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ShortEntityView.java +++ b/pe/src/main/java/org/thingsboard/client/model/ShortEntityView.java @@ -54,15 +54,12 @@ public ShortEntityView() { @JsonCreator public ShortEntityView( + @JsonProperty(JSON_PROPERTY_ID) EntityId id, @JsonProperty(JSON_PROPERTY_NAME) String name ) { this(); - this.name = name; - } - - public ShortEntityView id(@javax.annotation.Nonnull EntityId id) { this.id = id; - return this; + this.name = name; } /** @@ -77,11 +74,6 @@ public EntityId getId() { } - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull EntityId id) { - this.id = id; - } /** diff --git a/pe/src/main/java/org/thingsboard/client/model/User.java b/pe/src/main/java/org/thingsboard/client/model/User.java index 01332cdd..fa443977 100644 --- a/pe/src/main/java/org/thingsboard/client/model/User.java +++ b/pe/src/main/java/org/thingsboard/client/model/User.java @@ -120,11 +120,13 @@ public User() { @JsonCreator public User( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, - @JsonProperty(JSON_PROPERTY_NAME) String name + @JsonProperty(JSON_PROPERTY_NAME) String name, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.name = name; + this.ownerId = ownerId; } public User id(@javax.annotation.Nullable UserId id) { @@ -395,11 +397,6 @@ public String getName() { - public User ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -412,11 +409,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public User additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { diff --git a/pe/src/main/java/org/thingsboard/client/model/UserInfo.java b/pe/src/main/java/org/thingsboard/client/model/UserInfo.java index 5788f6dc..7e950212 100644 --- a/pe/src/main/java/org/thingsboard/client/model/UserInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/UserInfo.java @@ -134,12 +134,14 @@ public UserInfo() { public UserInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, - @JsonProperty(JSON_PROPERTY_NAME) String name + @JsonProperty(JSON_PROPERTY_NAME) String name, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.ownerName = ownerName; this.name = name; + this.ownerId = ownerId; } public UserInfo id(@javax.annotation.Nullable UserId id) { @@ -456,11 +458,6 @@ public String getName() { - public UserInfo ownerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - return this; - } - /** * JSON object with Customer or Tenant Id * @return ownerId @@ -473,11 +470,6 @@ public EntityId getOwnerId() { } - @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerId(@javax.annotation.Nullable EntityId ownerId) { - this.ownerId = ownerId; - } public UserInfo additionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { From b3b3f4f33973e1001b99b78551f87c1338bc99de Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Fri, 13 Mar 2026 14:40:23 +0200 Subject: [PATCH 8/8] regenerated paas client --- paas/docs/BillingCustomerId.md | 3 +- paas/docs/CouponId.md | 3 +- paas/docs/ProductId.md | 23 + paas/docs/SubscriptionAddonId.md | 23 + paas/docs/SubscriptionId.md | 3 +- paas/docs/SubscriptionPlanId.md | 3 +- paas/spec/openapi.json | 108 +++-- .../client/model/BillingCustomerId.java | 59 +-- .../thingsboard/client/model/CouponId.java | 59 +-- .../model/EntityGroupInfoOwnerIdsInner.java | 416 ++++++++++++++++-- .../thingsboard/client/model/EntityId.java | 12 + .../thingsboard/client/model/ProductId.java | 159 +++++++ .../client/model/SubscriptionAddonId.java | 159 +++++++ .../client/model/SubscriptionId.java | 59 +-- .../client/model/SubscriptionPlanId.java | 59 +-- 15 files changed, 956 insertions(+), 192 deletions(-) create mode 100644 paas/docs/ProductId.md create mode 100644 paas/docs/SubscriptionAddonId.md create mode 100644 paas/src/main/java/org/thingsboard/client/model/ProductId.java create mode 100644 paas/src/main/java/org/thingsboard/client/model/SubscriptionAddonId.java diff --git a/paas/docs/BillingCustomerId.md b/paas/docs/BillingCustomerId.md index f9b49ee4..a8b9d979 100644 --- a/paas/docs/BillingCustomerId.md +++ b/paas/docs/BillingCustomerId.md @@ -3,11 +3,12 @@ `org.thingsboard.client.model.BillingCustomerId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | diff --git a/paas/docs/CouponId.md b/paas/docs/CouponId.md index 32c716fd..dd9a9adb 100644 --- a/paas/docs/CouponId.md +++ b/paas/docs/CouponId.md @@ -3,11 +3,12 @@ `org.thingsboard.client.model.CouponId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | diff --git a/paas/docs/ProductId.md b/paas/docs/ProductId.md new file mode 100644 index 00000000..8c94d4fc --- /dev/null +++ b/paas/docs/ProductId.md @@ -0,0 +1,23 @@ + +# ProductId + +`org.thingsboard.client.model.ProductId` + +**Extends:** **EntityId** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/SubscriptionAddonId.md b/paas/docs/SubscriptionAddonId.md new file mode 100644 index 00000000..f400bcbb --- /dev/null +++ b/paas/docs/SubscriptionAddonId.md @@ -0,0 +1,23 @@ + +# SubscriptionAddonId + +`org.thingsboard.client.model.SubscriptionAddonId` + +**Extends:** **EntityId** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/SubscriptionId.md b/paas/docs/SubscriptionId.md index 915b6ca0..653d2c6c 100644 --- a/paas/docs/SubscriptionId.md +++ b/paas/docs/SubscriptionId.md @@ -3,11 +3,12 @@ `org.thingsboard.client.model.SubscriptionId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | diff --git a/paas/docs/SubscriptionPlanId.md b/paas/docs/SubscriptionPlanId.md index 0466a745..32bcc83d 100644 --- a/paas/docs/SubscriptionPlanId.md +++ b/paas/docs/SubscriptionPlanId.md @@ -3,11 +3,12 @@ `org.thingsboard.client.model.SubscriptionPlanId` +**Extends:** **EntityId** + ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | diff --git a/paas/spec/openapi.json b/paas/spec/openapi.json index a859aa6d..77d06b33 100644 --- a/paas/spec/openapi.json +++ b/paas/spec/openapi.json @@ -136003,16 +136003,13 @@ }, "BillingCustomerId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" + }, + { + "type": "object" } - }, - "required": [ - "id" ] }, "BlobEntityId": { @@ -137449,16 +137446,13 @@ }, "CouponId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" + }, + { + "type": "object" } - }, - "required": [ - "id" ] }, "CsvReportTemplateConfig": { @@ -141805,6 +141799,9 @@ { "$ref": "#/components/schemas/AssetProfileId" }, + { + "$ref": "#/components/schemas/BillingCustomerId" + }, { "$ref": "#/components/schemas/BlobEntityId" }, @@ -141814,6 +141811,9 @@ { "$ref": "#/components/schemas/ConverterId" }, + { + "$ref": "#/components/schemas/CouponId" + }, { "$ref": "#/components/schemas/CustomerId" }, @@ -141874,6 +141874,9 @@ { "$ref": "#/components/schemas/OtaPackageId" }, + { + "$ref": "#/components/schemas/ProductId" + }, { "$ref": "#/components/schemas/QueueId" }, @@ -141904,6 +141907,15 @@ { "$ref": "#/components/schemas/SecretId" }, + { + "$ref": "#/components/schemas/SubscriptionAddonId" + }, + { + "$ref": "#/components/schemas/SubscriptionId" + }, + { + "$ref": "#/components/schemas/SubscriptionPlanId" + }, { "$ref": "#/components/schemas/TbResourceId" }, @@ -142035,7 +142047,13 @@ "TENANT_PROFILE": "#/components/schemas/TenantProfileId", "USER": "#/components/schemas/UserId", "WIDGETS_BUNDLE": "#/components/schemas/WidgetsBundleId", - "WIDGET_TYPE": "#/components/schemas/WidgetTypeId" + "WIDGET_TYPE": "#/components/schemas/WidgetTypeId", + "BILLING_CUSTOMER": "#/components/schemas/BillingCustomerId", + "SUBSCRIPTION_PLAN": "#/components/schemas/SubscriptionPlanId", + "SUBSCRIPTION": "#/components/schemas/SubscriptionId", + "COUPON": "#/components/schemas/CouponId", + "PRODUCT": "#/components/schemas/ProductId", + "SUBSCRIPTION_ADDON": "#/components/schemas/SubscriptionAddonId" } }, "properties": { @@ -150715,6 +150733,17 @@ "RETRY_FAILED_AND_TIMED_OUT" ] }, + "ProductId": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" + }, + { + "type": "object" + } + ] + }, "PropagationCalculatedFieldConfiguration": { "allOf": [ { @@ -154967,6 +154996,17 @@ "SEQUENTIAL" ] }, + "SubscriptionAddonId": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" + }, + { + "type": "object" + } + ] + }, "SubscriptionDetails": { "type": "object", "properties": { @@ -155075,16 +155115,13 @@ }, "SubscriptionId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" + }, + { + "type": "object" } - }, - "required": [ - "id" ] }, "SubscriptionItems": { @@ -155151,16 +155188,13 @@ }, "SubscriptionPlanId": { "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the entity, time-based UUID v1", - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + "allOf": [ + { + "$ref": "#/components/schemas/EntityId" + }, + { + "type": "object" } - }, - "required": [ - "id" ] }, "SubscriptionUsage": { diff --git a/paas/src/main/java/org/thingsboard/client/model/BillingCustomerId.java b/paas/src/main/java/org/thingsboard/client/model/BillingCustomerId.java index 56bc1217..26cc1ff8 100644 --- a/paas/src/main/java/org/thingsboard/client/model/BillingCustomerId.java +++ b/paas/src/main/java/org/thingsboard/client/model/BillingCustomerId.java @@ -21,56 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; +import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * BillingCustomerId */ @JsonPropertyOrder({ - BillingCustomerId.JSON_PROPERTY_ID }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class BillingCustomerId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class BillingCustomerId extends EntityId { public BillingCustomerId() { } + @Override public BillingCustomerId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; + @Override + public BillingCustomerId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - /** * Return true if this BillingCustomerId object is equal to o. */ @@ -82,20 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - BillingCustomerId billingCustomerId = (BillingCustomerId) o; - return Objects.equals(this.id, billingCustomerId.id); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BillingCustomerId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -148,7 +142,18 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); } + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("BillingCustomerId", BillingCustomerId.class); + JSON.registerDiscriminator(BillingCustomerId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/CouponId.java b/paas/src/main/java/org/thingsboard/client/model/CouponId.java index a51eae5b..b5efe5a0 100644 --- a/paas/src/main/java/org/thingsboard/client/model/CouponId.java +++ b/paas/src/main/java/org/thingsboard/client/model/CouponId.java @@ -21,56 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; +import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * CouponId */ @JsonPropertyOrder({ - CouponId.JSON_PROPERTY_ID }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class CouponId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class CouponId extends EntityId { public CouponId() { } + @Override public CouponId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; + @Override + public CouponId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - /** * Return true if this CouponId object is equal to o. */ @@ -82,20 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CouponId couponId = (CouponId) o; - return Objects.equals(this.id, couponId.id); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CouponId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -148,7 +142,18 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); } + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CouponId", CouponId.class); + JSON.registerDiscriminator(CouponId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityGroupInfoOwnerIdsInner.java b/paas/src/main/java/org/thingsboard/client/model/EntityGroupInfoOwnerIdsInner.java index 49a5da68..f5d9e6d3 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityGroupInfoOwnerIdsInner.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityGroupInfoOwnerIdsInner.java @@ -35,9 +35,11 @@ import org.thingsboard.client.model.ApiUsageStateId; import org.thingsboard.client.model.AssetId; import org.thingsboard.client.model.AssetProfileId; +import org.thingsboard.client.model.BillingCustomerId; import org.thingsboard.client.model.BlobEntityId; import org.thingsboard.client.model.CalculatedFieldId; import org.thingsboard.client.model.ConverterId; +import org.thingsboard.client.model.CouponId; import org.thingsboard.client.model.CustomerId; import org.thingsboard.client.model.DashboardId; import org.thingsboard.client.model.DeviceId; @@ -59,6 +61,7 @@ import org.thingsboard.client.model.NotificationTemplateId; import org.thingsboard.client.model.OAuth2ClientId; import org.thingsboard.client.model.OtaPackageId; +import org.thingsboard.client.model.ProductId; import org.thingsboard.client.model.QueueId; import org.thingsboard.client.model.QueueStatsId; import org.thingsboard.client.model.ReportId; @@ -69,6 +72,9 @@ import org.thingsboard.client.model.RuleNodeId; import org.thingsboard.client.model.SchedulerEventId; import org.thingsboard.client.model.SecretId; +import org.thingsboard.client.model.SubscriptionAddonId; +import org.thingsboard.client.model.SubscriptionId; +import org.thingsboard.client.model.SubscriptionPlanId; import org.thingsboard.client.model.TbResourceId; import org.thingsboard.client.model.TenantId; import org.thingsboard.client.model.TenantProfileId; @@ -321,6 +327,32 @@ public EntityGroupInfoOwnerIdsInner deserialize(JsonParser jp, DeserializationCo log.log(Level.FINER, "Input data does not match schema 'AssetProfileId'", e); } + // deserialize BillingCustomerId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (BillingCustomerId.class.equals(Integer.class) || BillingCustomerId.class.equals(Long.class) || BillingCustomerId.class.equals(Float.class) || BillingCustomerId.class.equals(Double.class) || BillingCustomerId.class.equals(Boolean.class) || BillingCustomerId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((BillingCustomerId.class.equals(Integer.class) || BillingCustomerId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((BillingCustomerId.class.equals(Float.class) || BillingCustomerId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (BillingCustomerId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (BillingCustomerId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(BillingCustomerId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'BillingCustomerId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'BillingCustomerId'", e); + } + // deserialize BlobEntityId try { boolean attemptParsing = true; @@ -399,6 +431,32 @@ public EntityGroupInfoOwnerIdsInner deserialize(JsonParser jp, DeserializationCo log.log(Level.FINER, "Input data does not match schema 'ConverterId'", e); } + // deserialize CouponId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CouponId.class.equals(Integer.class) || CouponId.class.equals(Long.class) || CouponId.class.equals(Float.class) || CouponId.class.equals(Double.class) || CouponId.class.equals(Boolean.class) || CouponId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CouponId.class.equals(Integer.class) || CouponId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CouponId.class.equals(Float.class) || CouponId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CouponId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CouponId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CouponId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CouponId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CouponId'", e); + } + // deserialize CustomerId try { boolean attemptParsing = true; @@ -919,6 +977,32 @@ public EntityGroupInfoOwnerIdsInner deserialize(JsonParser jp, DeserializationCo log.log(Level.FINER, "Input data does not match schema 'OtaPackageId'", e); } + // deserialize ProductId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ProductId.class.equals(Integer.class) || ProductId.class.equals(Long.class) || ProductId.class.equals(Float.class) || ProductId.class.equals(Double.class) || ProductId.class.equals(Boolean.class) || ProductId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ProductId.class.equals(Integer.class) || ProductId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ProductId.class.equals(Float.class) || ProductId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (ProductId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ProductId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ProductId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'ProductId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ProductId'", e); + } + // deserialize QueueId try { boolean attemptParsing = true; @@ -1179,6 +1263,84 @@ public EntityGroupInfoOwnerIdsInner deserialize(JsonParser jp, DeserializationCo log.log(Level.FINER, "Input data does not match schema 'SecretId'", e); } + // deserialize SubscriptionAddonId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SubscriptionAddonId.class.equals(Integer.class) || SubscriptionAddonId.class.equals(Long.class) || SubscriptionAddonId.class.equals(Float.class) || SubscriptionAddonId.class.equals(Double.class) || SubscriptionAddonId.class.equals(Boolean.class) || SubscriptionAddonId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SubscriptionAddonId.class.equals(Integer.class) || SubscriptionAddonId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SubscriptionAddonId.class.equals(Float.class) || SubscriptionAddonId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (SubscriptionAddonId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SubscriptionAddonId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(SubscriptionAddonId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'SubscriptionAddonId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SubscriptionAddonId'", e); + } + + // deserialize SubscriptionId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SubscriptionId.class.equals(Integer.class) || SubscriptionId.class.equals(Long.class) || SubscriptionId.class.equals(Float.class) || SubscriptionId.class.equals(Double.class) || SubscriptionId.class.equals(Boolean.class) || SubscriptionId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SubscriptionId.class.equals(Integer.class) || SubscriptionId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SubscriptionId.class.equals(Float.class) || SubscriptionId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (SubscriptionId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SubscriptionId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(SubscriptionId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'SubscriptionId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SubscriptionId'", e); + } + + // deserialize SubscriptionPlanId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SubscriptionPlanId.class.equals(Integer.class) || SubscriptionPlanId.class.equals(Long.class) || SubscriptionPlanId.class.equals(Float.class) || SubscriptionPlanId.class.equals(Double.class) || SubscriptionPlanId.class.equals(Boolean.class) || SubscriptionPlanId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SubscriptionPlanId.class.equals(Integer.class) || SubscriptionPlanId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SubscriptionPlanId.class.equals(Float.class) || SubscriptionPlanId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (SubscriptionPlanId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SubscriptionPlanId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(SubscriptionPlanId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'SubscriptionPlanId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SubscriptionPlanId'", e); + } + // deserialize TbResourceId try { boolean attemptParsing = true; @@ -1394,6 +1556,11 @@ public EntityGroupInfoOwnerIdsInner(AssetProfileId o) { setActualInstance(o); } + public EntityGroupInfoOwnerIdsInner(BillingCustomerId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public EntityGroupInfoOwnerIdsInner(BlobEntityId o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -1409,6 +1576,11 @@ public EntityGroupInfoOwnerIdsInner(ConverterId o) { setActualInstance(o); } + public EntityGroupInfoOwnerIdsInner(CouponId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public EntityGroupInfoOwnerIdsInner(CustomerId o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -1509,6 +1681,11 @@ public EntityGroupInfoOwnerIdsInner(OtaPackageId o) { setActualInstance(o); } + public EntityGroupInfoOwnerIdsInner(ProductId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public EntityGroupInfoOwnerIdsInner(QueueId o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -1559,6 +1736,21 @@ public EntityGroupInfoOwnerIdsInner(SecretId o) { setActualInstance(o); } + public EntityGroupInfoOwnerIdsInner(SubscriptionAddonId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(SubscriptionId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EntityGroupInfoOwnerIdsInner(SubscriptionPlanId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public EntityGroupInfoOwnerIdsInner(TbResourceId o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -1597,9 +1789,11 @@ public EntityGroupInfoOwnerIdsInner(WidgetsBundleId o) { schemas.put("ApiUsageStateId", ApiUsageStateId.class); schemas.put("AssetId", AssetId.class); schemas.put("AssetProfileId", AssetProfileId.class); + schemas.put("BillingCustomerId", BillingCustomerId.class); schemas.put("BlobEntityId", BlobEntityId.class); schemas.put("CalculatedFieldId", CalculatedFieldId.class); schemas.put("ConverterId", ConverterId.class); + schemas.put("CouponId", CouponId.class); schemas.put("CustomerId", CustomerId.class); schemas.put("DashboardId", DashboardId.class); schemas.put("DeviceId", DeviceId.class); @@ -1620,6 +1814,7 @@ public EntityGroupInfoOwnerIdsInner(WidgetsBundleId o) { schemas.put("NotificationTemplateId", NotificationTemplateId.class); schemas.put("OAuth2ClientId", OAuth2ClientId.class); schemas.put("OtaPackageId", OtaPackageId.class); + schemas.put("ProductId", ProductId.class); schemas.put("QueueId", QueueId.class); schemas.put("QueueStatsId", QueueStatsId.class); schemas.put("ReportId", ReportId.class); @@ -1630,6 +1825,9 @@ public EntityGroupInfoOwnerIdsInner(WidgetsBundleId o) { schemas.put("RuleNodeId", RuleNodeId.class); schemas.put("SchedulerEventId", SchedulerEventId.class); schemas.put("SecretId", SecretId.class); + schemas.put("SubscriptionAddonId", SubscriptionAddonId.class); + schemas.put("SubscriptionId", SubscriptionId.class); + schemas.put("SubscriptionPlanId", SubscriptionPlanId.class); schemas.put("TbResourceId", TbResourceId.class); schemas.put("TenantId", TenantId.class); schemas.put("TenantProfileId", TenantProfileId.class); @@ -1647,7 +1845,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BlobEntityId, CalculatedFieldId, ConverterId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId + * AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BillingCustomerId, BlobEntityId, CalculatedFieldId, ConverterId, CouponId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, ProductId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, SubscriptionAddonId, SubscriptionId, SubscriptionPlanId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId * * It could be an instance of the 'oneOf' schemas. * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). @@ -1689,6 +1887,11 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(BillingCustomerId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(BlobEntityId.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -1704,6 +1907,11 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(CouponId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(CustomerId.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -1804,6 +2012,11 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(ProductId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(QueueId.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -1854,6 +2067,21 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(SubscriptionAddonId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(SubscriptionId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(SubscriptionPlanId.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(TbResourceId.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -1884,14 +2112,14 @@ public void setActualInstance(Object instance) { return; } - throw new RuntimeException("Invalid instance type. Must be AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BlobEntityId, CalculatedFieldId, ConverterId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId"); + throw new RuntimeException("Invalid instance type. Must be AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BillingCustomerId, BlobEntityId, CalculatedFieldId, ConverterId, CouponId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, ProductId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, SubscriptionAddonId, SubscriptionId, SubscriptionPlanId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId"); } /** * Get the actual instance, which can be the following: - * AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BlobEntityId, CalculatedFieldId, ConverterId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId + * AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BillingCustomerId, BlobEntityId, CalculatedFieldId, ConverterId, CouponId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, ProductId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, SubscriptionAddonId, SubscriptionId, SubscriptionPlanId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId * - * @return The actual instance (AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BlobEntityId, CalculatedFieldId, ConverterId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId) + * @return The actual instance (AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BillingCustomerId, BlobEntityId, CalculatedFieldId, ConverterId, CouponId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, ProductId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, SubscriptionAddonId, SubscriptionId, SubscriptionPlanId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId) */ @Override public Object getActualInstance() { @@ -1975,6 +2203,17 @@ public AssetProfileId getAssetProfileId() throws ClassCastException { return (AssetProfileId)super.getActualInstance(); } + /** + * Get the actual instance of `BillingCustomerId`. If the actual instance is not `BillingCustomerId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `BillingCustomerId` + * @throws ClassCastException if the instance is not `BillingCustomerId` + */ + public BillingCustomerId getBillingCustomerId() throws ClassCastException { + return (BillingCustomerId)super.getActualInstance(); + } + /** * Get the actual instance of `BlobEntityId`. If the actual instance is not `BlobEntityId`, * the ClassCastException will be thrown. @@ -2008,6 +2247,17 @@ public ConverterId getConverterId() throws ClassCastException { return (ConverterId)super.getActualInstance(); } + /** + * Get the actual instance of `CouponId`. If the actual instance is not `CouponId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CouponId` + * @throws ClassCastException if the instance is not `CouponId` + */ + public CouponId getCouponId() throws ClassCastException { + return (CouponId)super.getActualInstance(); + } + /** * Get the actual instance of `CustomerId`. If the actual instance is not `CustomerId`, * the ClassCastException will be thrown. @@ -2228,6 +2478,17 @@ public OtaPackageId getOtaPackageId() throws ClassCastException { return (OtaPackageId)super.getActualInstance(); } + /** + * Get the actual instance of `ProductId`. If the actual instance is not `ProductId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ProductId` + * @throws ClassCastException if the instance is not `ProductId` + */ + public ProductId getProductId() throws ClassCastException { + return (ProductId)super.getActualInstance(); + } + /** * Get the actual instance of `QueueId`. If the actual instance is not `QueueId`, * the ClassCastException will be thrown. @@ -2338,6 +2599,39 @@ public SecretId getSecretId() throws ClassCastException { return (SecretId)super.getActualInstance(); } + /** + * Get the actual instance of `SubscriptionAddonId`. If the actual instance is not `SubscriptionAddonId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SubscriptionAddonId` + * @throws ClassCastException if the instance is not `SubscriptionAddonId` + */ + public SubscriptionAddonId getSubscriptionAddonId() throws ClassCastException { + return (SubscriptionAddonId)super.getActualInstance(); + } + + /** + * Get the actual instance of `SubscriptionId`. If the actual instance is not `SubscriptionId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SubscriptionId` + * @throws ClassCastException if the instance is not `SubscriptionId` + */ + public SubscriptionId getSubscriptionId() throws ClassCastException { + return (SubscriptionId)super.getActualInstance(); + } + + /** + * Get the actual instance of `SubscriptionPlanId`. If the actual instance is not `SubscriptionPlanId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SubscriptionPlanId` + * @throws ClassCastException if the instance is not `SubscriptionPlanId` + */ + public SubscriptionPlanId getSubscriptionPlanId() throws ClassCastException { + return (SubscriptionPlanId)super.getActualInstance(); + } + /** * Get the actual instance of `TbResourceId`. If the actual instance is not `TbResourceId`, * the ClassCastException will be thrown. @@ -2480,237 +2774,273 @@ public String toUrlQueryString(String prefix) { } return joiner.toString(); } + if (getActualInstance() instanceof BillingCustomerId) { + if (getActualInstance() != null) { + joiner.add(((BillingCustomerId)getActualInstance()).toUrlQueryString(prefix + "one_of_7" + suffix)); + } + return joiner.toString(); + } if (getActualInstance() instanceof BlobEntityId) { if (getActualInstance() != null) { - joiner.add(((BlobEntityId)getActualInstance()).toUrlQueryString(prefix + "one_of_7" + suffix)); + joiner.add(((BlobEntityId)getActualInstance()).toUrlQueryString(prefix + "one_of_8" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof CalculatedFieldId) { if (getActualInstance() != null) { - joiner.add(((CalculatedFieldId)getActualInstance()).toUrlQueryString(prefix + "one_of_8" + suffix)); + joiner.add(((CalculatedFieldId)getActualInstance()).toUrlQueryString(prefix + "one_of_9" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof ConverterId) { if (getActualInstance() != null) { - joiner.add(((ConverterId)getActualInstance()).toUrlQueryString(prefix + "one_of_9" + suffix)); + joiner.add(((ConverterId)getActualInstance()).toUrlQueryString(prefix + "one_of_10" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CouponId) { + if (getActualInstance() != null) { + joiner.add(((CouponId)getActualInstance()).toUrlQueryString(prefix + "one_of_11" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof CustomerId) { if (getActualInstance() != null) { - joiner.add(((CustomerId)getActualInstance()).toUrlQueryString(prefix + "one_of_10" + suffix)); + joiner.add(((CustomerId)getActualInstance()).toUrlQueryString(prefix + "one_of_12" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof DashboardId) { if (getActualInstance() != null) { - joiner.add(((DashboardId)getActualInstance()).toUrlQueryString(prefix + "one_of_11" + suffix)); + joiner.add(((DashboardId)getActualInstance()).toUrlQueryString(prefix + "one_of_13" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof DeviceId) { if (getActualInstance() != null) { - joiner.add(((DeviceId)getActualInstance()).toUrlQueryString(prefix + "one_of_12" + suffix)); + joiner.add(((DeviceId)getActualInstance()).toUrlQueryString(prefix + "one_of_14" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof DeviceProfileId) { if (getActualInstance() != null) { - joiner.add(((DeviceProfileId)getActualInstance()).toUrlQueryString(prefix + "one_of_13" + suffix)); + joiner.add(((DeviceProfileId)getActualInstance()).toUrlQueryString(prefix + "one_of_15" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof DomainId) { if (getActualInstance() != null) { - joiner.add(((DomainId)getActualInstance()).toUrlQueryString(prefix + "one_of_14" + suffix)); + joiner.add(((DomainId)getActualInstance()).toUrlQueryString(prefix + "one_of_16" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof EdgeId) { if (getActualInstance() != null) { - joiner.add(((EdgeId)getActualInstance()).toUrlQueryString(prefix + "one_of_15" + suffix)); + joiner.add(((EdgeId)getActualInstance()).toUrlQueryString(prefix + "one_of_17" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof EntityGroupId) { if (getActualInstance() != null) { - joiner.add(((EntityGroupId)getActualInstance()).toUrlQueryString(prefix + "one_of_16" + suffix)); + joiner.add(((EntityGroupId)getActualInstance()).toUrlQueryString(prefix + "one_of_18" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof EntityViewId) { if (getActualInstance() != null) { - joiner.add(((EntityViewId)getActualInstance()).toUrlQueryString(prefix + "one_of_17" + suffix)); + joiner.add(((EntityViewId)getActualInstance()).toUrlQueryString(prefix + "one_of_19" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof GroupPermissionId) { if (getActualInstance() != null) { - joiner.add(((GroupPermissionId)getActualInstance()).toUrlQueryString(prefix + "one_of_18" + suffix)); + joiner.add(((GroupPermissionId)getActualInstance()).toUrlQueryString(prefix + "one_of_20" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof IntegrationId) { if (getActualInstance() != null) { - joiner.add(((IntegrationId)getActualInstance()).toUrlQueryString(prefix + "one_of_19" + suffix)); + joiner.add(((IntegrationId)getActualInstance()).toUrlQueryString(prefix + "one_of_21" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof JobId) { if (getActualInstance() != null) { - joiner.add(((JobId)getActualInstance()).toUrlQueryString(prefix + "one_of_20" + suffix)); + joiner.add(((JobId)getActualInstance()).toUrlQueryString(prefix + "one_of_22" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof MobileAppBundleId) { if (getActualInstance() != null) { - joiner.add(((MobileAppBundleId)getActualInstance()).toUrlQueryString(prefix + "one_of_21" + suffix)); + joiner.add(((MobileAppBundleId)getActualInstance()).toUrlQueryString(prefix + "one_of_23" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof MobileAppId) { if (getActualInstance() != null) { - joiner.add(((MobileAppId)getActualInstance()).toUrlQueryString(prefix + "one_of_22" + suffix)); + joiner.add(((MobileAppId)getActualInstance()).toUrlQueryString(prefix + "one_of_24" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof NotificationId) { if (getActualInstance() != null) { - joiner.add(((NotificationId)getActualInstance()).toUrlQueryString(prefix + "one_of_23" + suffix)); + joiner.add(((NotificationId)getActualInstance()).toUrlQueryString(prefix + "one_of_25" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof NotificationRequestId) { if (getActualInstance() != null) { - joiner.add(((NotificationRequestId)getActualInstance()).toUrlQueryString(prefix + "one_of_24" + suffix)); + joiner.add(((NotificationRequestId)getActualInstance()).toUrlQueryString(prefix + "one_of_26" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof NotificationRuleId) { if (getActualInstance() != null) { - joiner.add(((NotificationRuleId)getActualInstance()).toUrlQueryString(prefix + "one_of_25" + suffix)); + joiner.add(((NotificationRuleId)getActualInstance()).toUrlQueryString(prefix + "one_of_27" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof NotificationTargetId) { if (getActualInstance() != null) { - joiner.add(((NotificationTargetId)getActualInstance()).toUrlQueryString(prefix + "one_of_26" + suffix)); + joiner.add(((NotificationTargetId)getActualInstance()).toUrlQueryString(prefix + "one_of_28" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof NotificationTemplateId) { if (getActualInstance() != null) { - joiner.add(((NotificationTemplateId)getActualInstance()).toUrlQueryString(prefix + "one_of_27" + suffix)); + joiner.add(((NotificationTemplateId)getActualInstance()).toUrlQueryString(prefix + "one_of_29" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof OAuth2ClientId) { if (getActualInstance() != null) { - joiner.add(((OAuth2ClientId)getActualInstance()).toUrlQueryString(prefix + "one_of_28" + suffix)); + joiner.add(((OAuth2ClientId)getActualInstance()).toUrlQueryString(prefix + "one_of_30" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof OtaPackageId) { if (getActualInstance() != null) { - joiner.add(((OtaPackageId)getActualInstance()).toUrlQueryString(prefix + "one_of_29" + suffix)); + joiner.add(((OtaPackageId)getActualInstance()).toUrlQueryString(prefix + "one_of_31" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ProductId) { + if (getActualInstance() != null) { + joiner.add(((ProductId)getActualInstance()).toUrlQueryString(prefix + "one_of_32" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof QueueId) { if (getActualInstance() != null) { - joiner.add(((QueueId)getActualInstance()).toUrlQueryString(prefix + "one_of_30" + suffix)); + joiner.add(((QueueId)getActualInstance()).toUrlQueryString(prefix + "one_of_33" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof QueueStatsId) { if (getActualInstance() != null) { - joiner.add(((QueueStatsId)getActualInstance()).toUrlQueryString(prefix + "one_of_31" + suffix)); + joiner.add(((QueueStatsId)getActualInstance()).toUrlQueryString(prefix + "one_of_34" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof ReportId) { if (getActualInstance() != null) { - joiner.add(((ReportId)getActualInstance()).toUrlQueryString(prefix + "one_of_32" + suffix)); + joiner.add(((ReportId)getActualInstance()).toUrlQueryString(prefix + "one_of_35" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof ReportTemplateId) { if (getActualInstance() != null) { - joiner.add(((ReportTemplateId)getActualInstance()).toUrlQueryString(prefix + "one_of_33" + suffix)); + joiner.add(((ReportTemplateId)getActualInstance()).toUrlQueryString(prefix + "one_of_36" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof RoleId) { if (getActualInstance() != null) { - joiner.add(((RoleId)getActualInstance()).toUrlQueryString(prefix + "one_of_34" + suffix)); + joiner.add(((RoleId)getActualInstance()).toUrlQueryString(prefix + "one_of_37" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof RpcId) { if (getActualInstance() != null) { - joiner.add(((RpcId)getActualInstance()).toUrlQueryString(prefix + "one_of_35" + suffix)); + joiner.add(((RpcId)getActualInstance()).toUrlQueryString(prefix + "one_of_38" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof RuleChainId) { if (getActualInstance() != null) { - joiner.add(((RuleChainId)getActualInstance()).toUrlQueryString(prefix + "one_of_36" + suffix)); + joiner.add(((RuleChainId)getActualInstance()).toUrlQueryString(prefix + "one_of_39" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof RuleNodeId) { if (getActualInstance() != null) { - joiner.add(((RuleNodeId)getActualInstance()).toUrlQueryString(prefix + "one_of_37" + suffix)); + joiner.add(((RuleNodeId)getActualInstance()).toUrlQueryString(prefix + "one_of_40" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof SchedulerEventId) { if (getActualInstance() != null) { - joiner.add(((SchedulerEventId)getActualInstance()).toUrlQueryString(prefix + "one_of_38" + suffix)); + joiner.add(((SchedulerEventId)getActualInstance()).toUrlQueryString(prefix + "one_of_41" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof SecretId) { if (getActualInstance() != null) { - joiner.add(((SecretId)getActualInstance()).toUrlQueryString(prefix + "one_of_39" + suffix)); + joiner.add(((SecretId)getActualInstance()).toUrlQueryString(prefix + "one_of_42" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof SubscriptionAddonId) { + if (getActualInstance() != null) { + joiner.add(((SubscriptionAddonId)getActualInstance()).toUrlQueryString(prefix + "one_of_43" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof SubscriptionId) { + if (getActualInstance() != null) { + joiner.add(((SubscriptionId)getActualInstance()).toUrlQueryString(prefix + "one_of_44" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof SubscriptionPlanId) { + if (getActualInstance() != null) { + joiner.add(((SubscriptionPlanId)getActualInstance()).toUrlQueryString(prefix + "one_of_45" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof TbResourceId) { if (getActualInstance() != null) { - joiner.add(((TbResourceId)getActualInstance()).toUrlQueryString(prefix + "one_of_40" + suffix)); + joiner.add(((TbResourceId)getActualInstance()).toUrlQueryString(prefix + "one_of_46" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof TenantId) { if (getActualInstance() != null) { - joiner.add(((TenantId)getActualInstance()).toUrlQueryString(prefix + "one_of_41" + suffix)); + joiner.add(((TenantId)getActualInstance()).toUrlQueryString(prefix + "one_of_47" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof TenantProfileId) { if (getActualInstance() != null) { - joiner.add(((TenantProfileId)getActualInstance()).toUrlQueryString(prefix + "one_of_42" + suffix)); + joiner.add(((TenantProfileId)getActualInstance()).toUrlQueryString(prefix + "one_of_48" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof UserId) { if (getActualInstance() != null) { - joiner.add(((UserId)getActualInstance()).toUrlQueryString(prefix + "one_of_43" + suffix)); + joiner.add(((UserId)getActualInstance()).toUrlQueryString(prefix + "one_of_49" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof WidgetTypeId) { if (getActualInstance() != null) { - joiner.add(((WidgetTypeId)getActualInstance()).toUrlQueryString(prefix + "one_of_44" + suffix)); + joiner.add(((WidgetTypeId)getActualInstance()).toUrlQueryString(prefix + "one_of_50" + suffix)); } return joiner.toString(); } if (getActualInstance() instanceof WidgetsBundleId) { if (getActualInstance() != null) { - joiner.add(((WidgetsBundleId)getActualInstance()).toUrlQueryString(prefix + "one_of_45" + suffix)); + joiner.add(((WidgetsBundleId)getActualInstance()).toUrlQueryString(prefix + "one_of_51" + suffix)); } return joiner.toString(); } diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityId.java b/paas/src/main/java/org/thingsboard/client/model/EntityId.java index 026d4143..758b8e9d 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityId.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityId.java @@ -58,9 +58,11 @@ @JsonSubTypes.Type(value = ApiUsageStateId.class, name = "API_USAGE_STATE"), @JsonSubTypes.Type(value = AssetId.class, name = "ASSET"), @JsonSubTypes.Type(value = AssetProfileId.class, name = "ASSET_PROFILE"), + @JsonSubTypes.Type(value = BillingCustomerId.class, name = "BILLING_CUSTOMER"), @JsonSubTypes.Type(value = BlobEntityId.class, name = "BLOB_ENTITY"), @JsonSubTypes.Type(value = CalculatedFieldId.class, name = "CALCULATED_FIELD"), @JsonSubTypes.Type(value = ConverterId.class, name = "CONVERTER"), + @JsonSubTypes.Type(value = CouponId.class, name = "COUPON"), @JsonSubTypes.Type(value = CustomerId.class, name = "CUSTOMER"), @JsonSubTypes.Type(value = DashboardId.class, name = "DASHBOARD"), @JsonSubTypes.Type(value = DeviceId.class, name = "DEVICE"), @@ -81,6 +83,7 @@ @JsonSubTypes.Type(value = NotificationTemplateId.class, name = "NOTIFICATION_TEMPLATE"), @JsonSubTypes.Type(value = OAuth2ClientId.class, name = "OAUTH2_CLIENT"), @JsonSubTypes.Type(value = OtaPackageId.class, name = "OTA_PACKAGE"), + @JsonSubTypes.Type(value = ProductId.class, name = "PRODUCT"), @JsonSubTypes.Type(value = QueueId.class, name = "QUEUE"), @JsonSubTypes.Type(value = QueueStatsId.class, name = "QUEUE_STATS"), @JsonSubTypes.Type(value = ReportId.class, name = "REPORT"), @@ -91,6 +94,9 @@ @JsonSubTypes.Type(value = RuleNodeId.class, name = "RULE_NODE"), @JsonSubTypes.Type(value = SchedulerEventId.class, name = "SCHEDULER_EVENT"), @JsonSubTypes.Type(value = SecretId.class, name = "SECRET"), + @JsonSubTypes.Type(value = SubscriptionId.class, name = "SUBSCRIPTION"), + @JsonSubTypes.Type(value = SubscriptionAddonId.class, name = "SUBSCRIPTION_ADDON"), + @JsonSubTypes.Type(value = SubscriptionPlanId.class, name = "SUBSCRIPTION_PLAN"), @JsonSubTypes.Type(value = TbResourceId.class, name = "TB_RESOURCE"), @JsonSubTypes.Type(value = TenantId.class, name = "TENANT"), @JsonSubTypes.Type(value = TenantProfileId.class, name = "TENANT_PROFILE"), @@ -255,9 +261,11 @@ public String toUrlQueryString(String prefix) { mappings.put("API_USAGE_STATE", ApiUsageStateId.class); mappings.put("ASSET", AssetId.class); mappings.put("ASSET_PROFILE", AssetProfileId.class); + mappings.put("BILLING_CUSTOMER", BillingCustomerId.class); mappings.put("BLOB_ENTITY", BlobEntityId.class); mappings.put("CALCULATED_FIELD", CalculatedFieldId.class); mappings.put("CONVERTER", ConverterId.class); + mappings.put("COUPON", CouponId.class); mappings.put("CUSTOMER", CustomerId.class); mappings.put("DASHBOARD", DashboardId.class); mappings.put("DEVICE", DeviceId.class); @@ -278,6 +286,7 @@ public String toUrlQueryString(String prefix) { mappings.put("NOTIFICATION_TEMPLATE", NotificationTemplateId.class); mappings.put("OAUTH2_CLIENT", OAuth2ClientId.class); mappings.put("OTA_PACKAGE", OtaPackageId.class); + mappings.put("PRODUCT", ProductId.class); mappings.put("QUEUE", QueueId.class); mappings.put("QUEUE_STATS", QueueStatsId.class); mappings.put("REPORT", ReportId.class); @@ -288,6 +297,9 @@ public String toUrlQueryString(String prefix) { mappings.put("RULE_NODE", RuleNodeId.class); mappings.put("SCHEDULER_EVENT", SchedulerEventId.class); mappings.put("SECRET", SecretId.class); + mappings.put("SUBSCRIPTION", SubscriptionId.class); + mappings.put("SUBSCRIPTION_ADDON", SubscriptionAddonId.class); + mappings.put("SUBSCRIPTION_PLAN", SubscriptionPlanId.class); mappings.put("TB_RESOURCE", TbResourceId.class); mappings.put("TENANT", TenantId.class); mappings.put("TENANT_PROFILE", TenantProfileId.class); diff --git a/paas/src/main/java/org/thingsboard/client/model/ProductId.java b/paas/src/main/java/org/thingsboard/client/model/ProductId.java new file mode 100644 index 00000000..dfe6455f --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/ProductId.java @@ -0,0 +1,159 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.thingsboard.client.model.EntityId; +import org.thingsboard.client.model.EntityType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * ProductId + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class ProductId extends EntityId { + public ProductId() { + } + + @Override + public ProductId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); + return this; + } + + @Override + public ProductId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + /** + * Return true if this ProductId object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ProductId", ProductId.class); + JSON.registerDiscriminator(ProductId.class, "entityType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/SubscriptionAddonId.java b/paas/src/main/java/org/thingsboard/client/model/SubscriptionAddonId.java new file mode 100644 index 00000000..03a91dc5 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/SubscriptionAddonId.java @@ -0,0 +1,159 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.thingsboard.client.model.EntityId; +import org.thingsboard.client.model.EntityType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * SubscriptionAddonId + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class SubscriptionAddonId extends EntityId { + public SubscriptionAddonId() { + } + + @Override + public SubscriptionAddonId id(@javax.annotation.Nonnull UUID id) { + this.setId(id); + return this; + } + + @Override + public SubscriptionAddonId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + /** + * Return true if this SubscriptionAddonId object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SubscriptionAddonId {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("SubscriptionAddonId", SubscriptionAddonId.class); + JSON.registerDiscriminator(SubscriptionAddonId.class, "entityType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/SubscriptionId.java b/paas/src/main/java/org/thingsboard/client/model/SubscriptionId.java index 1d64ed8f..adfafd6f 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SubscriptionId.java +++ b/paas/src/main/java/org/thingsboard/client/model/SubscriptionId.java @@ -21,56 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; +import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * SubscriptionId */ @JsonPropertyOrder({ - SubscriptionId.JSON_PROPERTY_ID }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class SubscriptionId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class SubscriptionId extends EntityId { public SubscriptionId() { } + @Override public SubscriptionId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; + @Override + public SubscriptionId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - /** * Return true if this SubscriptionId object is equal to o. */ @@ -82,20 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SubscriptionId subscriptionId = (SubscriptionId) o; - return Objects.equals(this.id, subscriptionId.id); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SubscriptionId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -148,7 +142,18 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); } + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("SubscriptionId", SubscriptionId.class); + JSON.registerDiscriminator(SubscriptionId.class, "entityType", mappings); +} } diff --git a/paas/src/main/java/org/thingsboard/client/model/SubscriptionPlanId.java b/paas/src/main/java/org/thingsboard/client/model/SubscriptionPlanId.java index bf5e6c59..63836ed4 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SubscriptionPlanId.java +++ b/paas/src/main/java/org/thingsboard/client/model/SubscriptionPlanId.java @@ -21,56 +21,51 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import java.util.UUID; +import org.thingsboard.client.model.EntityId; +import org.thingsboard.client.model.EntityType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** * SubscriptionPlanId */ @JsonPropertyOrder({ - SubscriptionPlanId.JSON_PROPERTY_ID }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class SubscriptionPlanId { - public static final String JSON_PROPERTY_ID = "id"; - @javax.annotation.Nonnull - private UUID id; +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) +public class SubscriptionPlanId extends EntityId { public SubscriptionPlanId() { } + @Override public SubscriptionPlanId id(@javax.annotation.Nonnull UUID id) { - this.id = id; + this.setId(id); return this; } - /** - * ID of the entity, time-based UUID v1 - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; + @Override + public SubscriptionPlanId entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; } - /** * Return true if this SubscriptionPlanId object is equal to o. */ @@ -82,20 +77,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SubscriptionPlanId subscriptionPlanId = (SubscriptionPlanId) o; - return Objects.equals(this.id, subscriptionPlanId.id); + return super.equals(o); } @Override public int hashCode() { - return Objects.hash(id); + return Objects.hash(super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SubscriptionPlanId {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -148,7 +142,18 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); } + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + return joiner.toString(); } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("SubscriptionPlanId", SubscriptionPlanId.class); + JSON.registerDiscriminator(SubscriptionPlanId.class, "entityType", mappings); +} }